diff --git a/generate-pdf.sh b/generate-pdf.sh new file mode 100644 index 0000000000000000000000000000000000000000..38df6b762282fb8a637f3bc5f3eb370d0816ce09 --- /dev/null +++ b/generate-pdf.sh @@ -0,0 +1,30 @@ +#! /bin/sh + +# This script builds the PDF version of the libconfig documentation. +# Inspired by the PostgreSQL package. + +set -e + +# Pass package version and name optionally as argument +VERSION=$1 +PKGNAME=${2-libconfig} + +test -z "$VERSION" && VERSION=`awk '/^Version:/ { print $2; }' "$PKGNAME".spec` + +TARGETFILE=`readlink -f "$PKGNAME-$VERSION.pdf"` +test -f "$TARGETFILE" && echo "$TARGETFILE exists" && exit 1 + +echo Building $TARGETFILE ... + +tar xf "$PKGNAME"-$VERSION.tar.* +cd "$PKGNAME"-$VERSION + +# Apply any patches that affect the PDF documentation +# patch -p1 < ../xxx.patch + +# Build the PDF docs +./configure >/dev/null +make pdf +mv -f doc/libconfig.pdf "$TARGETFILE" + +exit 0 diff --git a/libconfig-1.5.tar.gz b/libconfig-1.5.tar.gz deleted file mode 100644 index 4d6c4d72c88cfd34ed7d38844a49bf47d08105b1..0000000000000000000000000000000000000000 Binary files a/libconfig-1.5.tar.gz and /dev/null differ diff --git a/libconfig.pdf b/libconfig-1.7.2.pdf similarity index 100% rename from libconfig.pdf rename to libconfig-1.7.2.pdf diff --git a/libconfig-1.7.2.tar.gz b/libconfig-1.7.2.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..7baedb959f2ef5e6893c525781fefdd4df99eaac Binary files /dev/null and b/libconfig-1.7.2.tar.gz differ diff --git a/libconfig.spec b/libconfig.spec index 7c7dfc5abc8c4760959fcd47a47958cb8d3e0529..89c468526cd24ccb3906d47ecbf3a30bab1fe0d1 100644 --- a/libconfig.spec +++ b/libconfig.spec @@ -1,18 +1,22 @@ %define anolis_release .0.1 +%bcond_without check + Name: libconfig Summary: C/C++ configuration file library -Version: 1.5 +Version: 1.7.2 Release: 9%{anolis_release}%{?dist} License: LGPLv2+ -Group: System Environment/Libraries -Source0: http://www.hyperrealm.com/libconfig/libconfig-%{version}.tar.gz -# Generated from libconfig 1.5 on Fedora 23 x86_64 (2015-12-17) -Source1: libconfig.pdf URL: http://www.hyperrealm.com/libconfig/ -BuildRequires: texinfo-tex, tex(ecbx1095.tfm), tex(ecrm1095.tfm), tex(cm-super-t1.enc) -BuildRequires: bison, flex +Source0: https://hyperrealm.github.io/%name/dist/%name-%version.tar.gz +# Generated from libconfig 1.7.2 on Fedora 28 x86_64 (2018-07-18) +Source1: libconfig-%version.pdf +# Helper script to generate Source1 (locally) +Source2: generate-pdf.sh -Requires: glibc +BuildRequires: gcc, gcc-c++ +BuildRequires: texinfo +BuildRequires: bison, flex +BuildRequires: make %description Libconfig is a simple library for manipulating structured configuration @@ -20,75 +24,113 @@ files. This file format is more compact and more readable than XML. And unlike XML, it is type-aware, so it is not necessary to do string parsing in application code. -%package doc -Summary: Documents for %{name} -BuildArch: noarch -Requires: %{name} = %{version}-%{release} - - -%description doc -Doc pages for %{name}. %package devel Summary: Development files for libconfig -Group: Development/Libraries -Requires: %{name} = %{version}-%{release} -Requires: pkgconfig -Requires(post): /sbin/install-info -Requires(preun): /sbin/install-info +Requires: %{name}%{?_isa} = %{version}-%{release} %description devel Development libraries and headers for developing software against libconfig. +%package doc +Summary: Documents for %{name} +BuildArch: noarch +Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release} + +%description doc +Doc pages for %{name}. + %prep %setup -q iconv -f iso-8859-1 -t utf-8 -o AUTHORS{.utf8,} mv AUTHORS{.utf8,} + %build -%configure --disable-static +%configure \ + --disable-silent-rules \ + --disable-static + make %{?_smp_mflags} -make pdf + %install -make DESTDIR=$RPM_BUILD_ROOT install +%make_install rm -rf $RPM_BUILD_ROOT%{_libdir}/*.la rm -rf $RPM_BUILD_ROOT%{_infodir}/dir -# Need to use a pre-built copy to support multilib -rm -rf doc/libconfig.pdf install -p %{SOURCE1} doc/ -%check -./tests/libconfig_tests -%ldconfig_scriptlets +%if %{with check} +%check +make check +%endif -%post devel -/sbin/install-info %{_infodir}/%{name}.info %{_infodir}/dir || : -%preun devel -if [ $1 = 0 ]; then - /sbin/install-info --delete %{_infodir}/%{name}.info %{_infodir}/dir || : -fi +%ldconfig_scriptlets %files -%{_libdir}/libconfig*.so.* +%license COPYING.LIB +%{_libdir}/libconfig*.so.11* -%files doc -%doc AUTHORS ChangeLog COPYING.LIB README %files devel -%doc doc/libconfig.pdf +%doc doc/libconfig-%version.pdf %{_includedir}/libconfig* +%{_libdir}/cmake/%{name} +%{_libdir}/cmake/%{name}++ %{_libdir}/libconfig*.so %{_libdir}/pkgconfig/libconfig*.pc %{_infodir}/libconfig.info* +%files doc +%doc AUTHORS ChangeLog README + %changelog -* Mon Jul 17 2022 mgb01105731 - 1.5-9.0.1 +* Fri Nov 25 2022 Xiaoping Liu - 1.7.2-9.0.1 - Add doc sub package +* Mon Aug 09 2021 Mohan Boddu - 1.7.2-9 +- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags + Related: rhbz#1991688 + +* Fri Apr 16 2021 Mohan Boddu - 1.7.2-8 +- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937 + +* Tue Jan 26 2021 Fedora Release Engineering - 1.7.2-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Tue Jul 28 2020 Fedora Release Engineering - 1.7.2-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Wed Jan 29 2020 Fedora Release Engineering - 1.7.2-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Thu Jul 25 2019 Fedora Release Engineering - 1.7.2-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Fri Feb 01 2019 Fedora Release Engineering - 1.7.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Tue Jul 24 2018 Rex Dieter - 1.7.2-2 +- %%files: track library sonames, so bumps aren't a surprise +- %%build: --disable-silent-rules +- -devel: tighten subpkg dep with %%_isa, drop hard-coded pkgconfig dep +- use %%make_build %%make_install %%ldconfig_scriptlets + +* Mon Jul 23 2018 Pavel Raiskup - 1.7.2-1 +- new upstream release (rhbz#1602423) + +* Mon Jul 23 2018 Pavel Raiskup - 1.5-12 +- cleanup + +* Sun Jul 22 2018 Peter Robinson 1.5-11 +- Add missing gcc-c++ dep, spec cleanups + +* Fri Jul 13 2018 Fedora Release Engineering - 1.5-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + * Wed Feb 07 2018 Fedora Release Engineering - 1.5-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild