From 9d99ef687736586159e947fe47f7882d79a62f72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Mon, 12 Aug 2019 12:40:10 +0200 Subject: [PATCH] Modernize spec file --- .gitignore | 1 + TECkit_2_5_1-includes.patch | 11 -- ...D41BC02EB807D405EFFAF6C9183BEA0288CDEE.gpg | Bin 0 -> 2267 bytes sources | 1 + teckit-2.5.9-Correct-indentation.patch | 49 ++++++ teckit.rpmlintrc | 2 + teckit.spec | 141 +++++++++++++----- 7 files changed, 155 insertions(+), 50 deletions(-) delete mode 100644 TECkit_2_5_1-includes.patch create mode 100644 gpgkey-15D41BC02EB807D405EFFAF6C9183BEA0288CDEE.gpg create mode 100644 teckit-2.5.9-Correct-indentation.patch create mode 100644 teckit.rpmlintrc diff --git a/.gitignore b/.gitignore index 5c44dbc..63605ae 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ TECkit_2_5_1.tar.gz /teckit-2.5.7.tar.gz /teckit-2.5.9.tar.gz +/teckit-2.5.9.tar.gz.asc diff --git a/TECkit_2_5_1-includes.patch b/TECkit_2_5_1-includes.patch deleted file mode 100644 index 3787f2c..0000000 --- a/TECkit_2_5_1-includes.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -ru TECkit_2_5_1.orig/source/Compiler.cpp TECkit_2_5_1/source/Compiler.cpp ---- TECkit_2_5_1.orig/source/Compiler.cpp 2009-03-05 10:29:22.000000000 +0000 -+++ TECkit_2_5_1/source/Compiler.cpp 2009-03-05 10:29:50.000000000 +0000 -@@ -33,6 +33,7 @@ - #include - #include - #include -+#include - - #include "zlib.h" - diff --git a/gpgkey-15D41BC02EB807D405EFFAF6C9183BEA0288CDEE.gpg b/gpgkey-15D41BC02EB807D405EFFAF6C9183BEA0288CDEE.gpg new file mode 100644 index 0000000000000000000000000000000000000000..2596bad8798b12768bfb259259c9e771fb87561b GIT binary patch literal 2267 zcmV<12qgEJ0u2OM=ga2-5CF7(e4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:104:5: warning: this 'while' clause does not guard... [-Wmisleading-indentation] + 104 | while (in != end && !(in.error() || out.error())) + | ^~~~~ +../SFconv/SFconv.cpp:107:2: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'while' + 107 | if (in.error() || out.error()) { + | ^~ + +This patch fixes it. + +Signed-off-by: Petr Písař +--- + SFconv/SFconv.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/SFconv/SFconv.cpp b/SFconv/SFconv.cpp +index eeb4490..df6f8a4 100644 +--- a/SFconv/SFconv.cpp ++++ b/SFconv/SFconv.cpp +@@ -101,7 +101,7 @@ Utf8ToString(const char* s) + utf16::iterator out = buf; + utf8::const_iterator in = s, + end = s + len; +- while (in != end && !(in.error() || out.error())) ++ while (in != end && !(in.error() || out.error())) + *out++ = *in++; + + if (in.error() || out.error()) { +@@ -109,7 +109,7 @@ Utf8ToString(const char* s) + exit(1); + } + +- ustring ustr(buf, out - buf); ++ ustring ustr(buf, out - buf); + delete[] buf; + return ustr; + } +-- +2.21.0 + diff --git a/teckit.rpmlintrc b/teckit.rpmlintrc new file mode 100644 index 0000000..f1056b6 --- /dev/null +++ b/teckit.rpmlintrc @@ -0,0 +1,2 @@ +from Config import * +addFilter("unversioned-explicit-provides bundels\(graphite2\)"); diff --git a/teckit.spec b/teckit.spec index 1a02087..50e4415 100644 --- a/teckit.spec +++ b/teckit.spec @@ -1,68 +1,126 @@ Name: teckit Version: 2.5.9 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Conversion library and mapping compiler -License: LGPLv2+ or CPL -URL: http://scripts.sil.org/teckit +# COPYING: links to license/LICENSING.txt +# license/License_CPLv05.txt: CPLv0.5 text +# license/License_LGPLv21.txt: LGPLv2 text +# license/LICENSING.txt: license declarations +# SFconv/UtfCodec.cpp: LGPLv2+ or GPLv2+ or MPL(?version) (bundled Graphite2) +# SFconv/UtfCodec.h: LGPLv2+ or GPLv2+ or MPL(?version) (bundled Graphite2) +# , +# graphite2 package uses "MPL" +# source/Engine.cpp: LGPLv2+ or CPL +# source/TECkit_Format.h: LGPLv2+ or CPL +## Not in any binary package +# aclocal.m4: FSFULLR +# compile: GPLv2+ with exceptions +# config.guess: GPLv3+ with exceptions +# config.sub: GPLv3+ with exceptions +# configure: FSFUL and GPLv2+ with exceptions +# depcomp: GPLv2+ with exceptions +# install-sh: MIT +# lib/Makefile.in: FSFULLR +# ltmain.sh: GPLv2+ with exceptions and GPLv3+ with exceptions and GPLv3+ +# m4/libtool.m4: FSFULL and FSFULLR and GPLv2+ with exceptions +# m4/ltoptions.m4: FSFULLR +# m4/ltsugar.m4: FSFULLR +# m4/ltversion.m4: FSFULLR +# m4/lt~obsolete.m4: FSFULLR +# Makefile.in: FSFULLR +# missing: GPLv2+ with exceptions +# test-driver: GPLv2+ with exceptions +# test/Makefile.in: FSFULLR +## Unbundled +# SFconv/expat/xmlparse/hashtable.c: MPLv1.1 of GPL+ (bundled expat) +# SFconv/expat/xmlparse/xmlparse.c: MPLv1.1 of GPL+ (bundled expat) +# zlib-1.2.3: zlib (see nonexistent zlib.h, reported to +# ) +License: (LGPLv2+ or CPL) and (LGPLv2+ or GPLv2+ or MPLv2.0 or MPLv1.1) +URL: https://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=teckit Source0: https://github.com/silnrsi/teckit/releases/download/v%{version}/teckit-%{version}.tar.gz +Source1: https://github.com/silnrsi/teckit/releases/download/v%{version}/teckit-%{version}.tar.gz.asc +# Exported from ppisar's keyring +Source2: gpgkey-15D41BC02EB807D405EFFAF6C9183BEA0288CDEE.gpg +# Fix a compiler warning about a misindentation, +# +Patch0: teckit-2.5.9-Correct-indentation.patch +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: coreutils +BuildRequires: expat-devel +# gcc is not needed, the only source/NormalizationData.c is included into +# a C++ source/Engine.cpp compilation unit. BuildRequires: gcc-c++ -BuildRequires: expat-devel zlib-devel libtool -Patch0: TECkit_2_5_1-includes.patch +BuildRequires: gnupg2 +BuildRequires: libtool +BuildRequires: make +BuildRequires: zlib-devel +# Tests: +BuildRequires: perl-interpreter +BuildRequires: perl(strict) +BuildRequires: perl(warnings) +Provides: bundels(graphite2) %description -TECkit is a low-level toolkit intended to be used by other -applications that need to perform encoding conversions (e.g., when -importing legacy data into a Unicode-based application). The -primary component of the TECkit package is therefore a library that -performs conversions; this is the "TECkit engine". The engine -relies on mapping tables in a specific binary format (for which -documentation is available); there is a compiler that creates such -tables from a human-readable mapping description (a simple text file). +TECkit is a low-level toolkit intended to be used by other applications that +need to perform encoding conversions (e.g., when importing legacy data into +a Unicode-based application). The primary component of the TECkit package is +therefore a library that performs conversions; this is the "TECkit engine". +The engine relies on mapping tables in a specific binary format (for which +documentation is available); there is a compiler that creates such tables from +a human-readable mapping description (a simple text file). %package devel -Summary: Conversion library and mapping compiler +Summary: Developmental files for TECkit library +License: LGPLv2+ or CPL Requires: %{name}%{?_isa} = %{version}-%{release} %description devel -TECkit is a low-level toolkit intended to be used by other -applications that need to perform encoding conversions (e.g., when -importing legacy data into a Unicode-based application). The -primary component of the TECkit package is therefore a library that -performs conversions; this is the "TECkit engine". The engine -relies on mapping tables in a specific binary format (for which -documentation is available); there is a compiler that creates such -tables from a human-readable mapping description (a simple text file). +Header files, pkg-config module, and documentation for developing application +that use TECkit, a character encoding and mapping, library. %prep +%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}' %setup -q -%patch0 -p1 -b .includes - -%{__rm} -r zlib* +%patch0 -p1 +# Remove bundled libraries +rm -r zlib-*/*.c SFconv/expat +# Regenerate build script +autoreconf -fi %build -%configure --disable-static -make %{_smp_mflags} V=1 +%configure \ + --disable-debug \ + --disable-final \ + --without-old-lib-names \ + --disable-profile \ + --disable-profilefn \ + --enable-shared \ + --disable-static \ + --with-system-zlib \ + --disable-tetex-build +%{make_build} %install -make install DESTDIR=%{buildroot} -%{__rm} -f %{buildroot}%{_libdir}/*.la +%{make_install} +rm -f %{buildroot}%{_libdir}/*.la %check -make check - -%ldconfig_scriptlets - -%ldconfig_scriptlets devel +%{make_build} check %files -%license COPYING -%doc AUTHORS INSTALL NEWS README -%license license/{LICENSING.txt,License_CPLv05.txt,License_LGPLv21.txt} +# COPYING is unhelpful +%license license/* +# ChangeLog is unhelpful +%doc AUTHORS NEWS README %{_bindir}/sfconv %{_bindir}/teckit_compile %{_bindir}/txtconv -%{_libdir}/libTECkit.so.* -%{_libdir}/libTECkit_Compiler.so.* +%{_libdir}/libTECkit.so.0 +%{_libdir}/libTECkit.so.0.* +%{_libdir}/libTECkit_Compiler.so.0 +%{_libdir}/libTECkit_Compiler.so.0.* %{_mandir}/man1/* %files devel @@ -73,6 +131,11 @@ make check %{_libdir}/pkgconfig/teckit.pc %changelog +* Mon Aug 12 2019 Petr Pisar - 2.5.9-2 +- Modernize spec file +- License corrected to + ((LGPLv2+ or CPL) and (LGPLv2+ or GPLv2+ or MPLv2.0 or MPLv1.1)) + * Sat Aug 10 2019 Tom Callaway - 2.5.9-1 - update to 2.5.9