From b8db0f805fb09785036d709acdbaa413adb511d1c5ab107fb832203123f15093 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismail=20D=C3=B6nmez?= Date: Mon, 27 Feb 2012 15:50:50 +0000 Subject: [PATCH] Accepting request 107176 from home:saschpe:branches:multimedia:libs - Spec file cleanup: * Use original tarball * Move COPYING, README into lib packages (legal requirement) * Move CHANGELOG and TODO into devel packages (not needed by users) * Move examples into doc package, and recommend it for both devel packages * Ran spec cleaner and removed unneeded rpmlintrc OBS-URL: https://build.opensuse.org/request/show/107176 OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/libconfig?expand=0&rev=2 --- libconfig-1.4.8.tar.bz2 | 3 - libconfig-1.4.8.tar.gz | 3 + libconfig-rpmlintrc | 10 --- libconfig.changes | 10 +++ libconfig.spec | 155 ++++++++++++++++++---------------------- 5 files changed, 84 insertions(+), 97 deletions(-) delete mode 100644 libconfig-1.4.8.tar.bz2 create mode 100644 libconfig-1.4.8.tar.gz delete mode 100644 libconfig-rpmlintrc diff --git a/libconfig-1.4.8.tar.bz2 b/libconfig-1.4.8.tar.bz2 deleted file mode 100644 index a940dab..0000000 --- a/libconfig-1.4.8.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b536a51f822507026d5e0fa278a8aac6b282c2685bf2f375dc48c4ae4da7c0b1 -size 531972 diff --git a/libconfig-1.4.8.tar.gz b/libconfig-1.4.8.tar.gz new file mode 100644 index 0000000..780f086 --- /dev/null +++ b/libconfig-1.4.8.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:18b1509fbf438a8c7f9b0af32284e458189b5f6dfd044f898926109f3c3c01ed +size 645823 diff --git a/libconfig-rpmlintrc b/libconfig-rpmlintrc deleted file mode 100644 index 69abd0b..0000000 --- a/libconfig-rpmlintrc +++ /dev/null @@ -1,10 +0,0 @@ -# This line is mandatory to access the configuration functions -from Config import * - -addFilter("source-or-patch-not-bzipped") -addFilter("shared-lib-calls-exit") - -# libconfigduo -#addFilter("no-binary") -addFilter("shlib-policy-missing-lib") -addFilter("shlib-policy-nonversioned-dir") \ No newline at end of file diff --git a/libconfig.changes b/libconfig.changes index cb75a82..a3b22c2 100644 --- a/libconfig.changes +++ b/libconfig.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Mon Feb 27 13:44:20 UTC 2012 - saschpe@suse.de + +- Spec file cleanup: + * Use original tarball + * Move COPYING, README into lib packages (legal requirement) + * Move CHANGELOG and TODO into devel packages (not needed by users) + * Move examples into doc package, and recommend it for both devel packages + * Ran spec cleaner and removed unneeded rpmlintrc + ------------------------------------------------------------------- Sat Feb 25 07:03:32 UTC 2012 - davejplater@gmail.com diff --git a/libconfig.spec b/libconfig.spec index 613fb8a..178d822 100644 --- a/libconfig.spec +++ b/libconfig.spec @@ -1,7 +1,7 @@ # -# spec file for package libconfig++ (Version 1.4.5) +# spec file for package libconfig # -# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -15,31 +15,26 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # -# norootforbuild -%define _prefix /usr -%define _libname libconfig -%define _SO_nr 9 - -Name: libconfig -Summary: A simple library for manipulating structured configuration files -Version: 1.4.8 -Release: 0 -License: LGPL-2.1+ -Group: System/Libraries -URL: http://www.hyperrealm.com/main.php?s=libconfig -# http://www.hyperrealm.com/libconfig/ -Source: %{name}-%{version}.tar.bz2 -Source90: %{name}-rpmlintrc -BuildRoot: %{_tmppath}/%{name}-%{version}-build -Requires(pre): info -BuildRequires: bison -BuildRequires: flex -BuildRequires: gcc-c++ -BuildRequires: texinfo -BuildRequires: texlive-latex -BuildRequires: texlive -BuildRequires: pkg-config fdupes +Name: libconfig +Version: 1.4.8 +Release: 0 +%define _soversion 9 +Summary: A simple library for manipulating structured configuration files +License: LGPL-2.1+ +Group: System/Libraries +Url: http://www.hyperrealm.com/main.php?s=libconfig +Source: http://www.hyperrealm.com/libconfig/libconfig-%{version}.tar.gz +BuildRequires: bison +BuildRequires: fdupes +BuildRequires: flex +BuildRequires: gcc-c++ +BuildRequires: pkg-config +BuildRequires: texinfo +BuildRequires: texlive +BuildRequires: texlive-latex +BuildRoot: %{_tmppath}/%{name}-%{version}-build +Requires(pre): info %description Libconfig is a simple library for manipulating structured @@ -58,11 +53,11 @@ The library includes bindings for both the C and C++ languages. It works on POSIX-compliant UNIX systems (GNU/Linux, Mac OS X, Solaris, FreeBSD) and Windows (2000, XP and later). -%package -n %{_libname}%{_SO_nr} -Summary: Shared libraries for libconfig -Group: System/Libraries +%package -n libconfig%{_soversion} +Summary: Shared libraries for libconfig +Group: System/Libraries -%description -n %{_libname}%{_SO_nr} +%description -n libconfig%{_soversion} Libconfig is a simple library for manipulating structured configuration files, like this one: test.cfg. This file format is more compact and more readable than XML. And unlike XML, it @@ -71,12 +66,13 @@ application code. This package contains the shared libraries for libconfig. -%package -n %{_libname}-devel -Summary: C-Bindings development files for libconfig -Group: Development/Languages/C and C++ -Requires: %{_libname}%{_SO_nr} = %{version} +%package devel +Summary: C-Bindings development files for libconfig +Group: Development/Languages/C and C++ +Requires: libconfig%{_soversion} = %{version} +Recommends: libconfig-doc = %{version} -%description -n %{_libname}-devel +%description devel Libconfig is a simple library for manipulating structured configuration files, like this one: test.cfg. This file format is more compact and more readable than XML. And unlike XML, it @@ -85,11 +81,11 @@ application code. This package contains the C-bindings development files. -%package -n %{_libname}++%{_SO_nr} -Summary: Shared libraries for libconfig -Group: System/Libraries +%package -n libconfig++%{_soversion} +Summary: Shared libraries for libconfig +Group: System/Libraries -%description -n %{_libname}++%{_SO_nr} +%description -n libconfig++%{_soversion} Libconfig is a simple library for manipulating structured configuration files, like this one: test.cfg. This file format is more compact and more readable than XML. And unlike XML, it @@ -98,13 +94,14 @@ application code. This package contains the shared libraries for libconfig. -%package -n %{_libname}++-devel -Summary: C++-Bindings development files for libconfig -Group: Development/Languages/C and C++ -Requires: %{_libname}++%{_SO_nr} = %{version} -Requires: %{_libname}-devel = %{version} +%package -n libconfig++-devel +Summary: C++-Bindings development files for libconfig +Group: Development/Languages/C and C++ +Requires: libconfig++%{_soversion} = %{version} +Requires: libconfig-devel = %{version} +Recommends: libconfig-doc = %{version} -%description -n %{_libname}++-devel +%description -n libconfig++-devel Libconfig is a simple library for manipulating structured configuration files, like this one: test.cfg. This file format is more compact and more readable than XML. And unlike XML, it @@ -114,8 +111,8 @@ application code. This package contains the C++-bindings development files. %package doc -Summary: Documentation files for libconfig -Group: Documentation/Other +Summary: Documentation files for libconfig +Group: Documentation/Other %description doc Documentation files for package libconfig. @@ -126,35 +123,27 @@ Documentation files for package libconfig. %build %configure -%__make pdf -%__make html +make pdf +make html make %{?_smp_flags} %install -%makeinstall - +%make_install # clean up pushd examples - %__make clean - find . -name '*.vcproj' | xargs %__rm + make clean + find . -name '*.vcproj' -o -name '.deps' |xargs rm -r popd -%__rm %{buildroot}%{_libdir}/*.a -%__rm %{buildroot}%{_libdir}/*.la +rm %{buildroot}%{_libdir}/*.{l,}a +%fdupes -s examples %{buildroot}%{_docdir} -for i in `find . -name '.deps' -print`; do \ -rm -rfv ${i}; done +%post -n libconfig%{_soversion} -p /sbin/ldconfig -%fdupes -s examples/ +%postun -n libconfig%{_soversion} -p /sbin/ldconfig -%fdupes -s %{buildroot}%{_docdir} +%post -n libconfig++%{_soversion} -p /sbin/ldconfig -%post -n %{_libname}%{_SO_nr} -p /sbin/ldconfig - -%postun -n %{_libname}%{_SO_nr} -p /sbin/ldconfig - -%post -n %{_libname}++%{_SO_nr} -p /sbin/ldconfig - -%postun -n %{_libname}++%{_SO_nr} -p /sbin/ldconfig +%postun -n libconfig++%{_soversion} -p /sbin/ldconfig %post doc %install_info --info-dir=%{_infodir} %{_infodir}/libconfig.info.gz @@ -162,35 +151,33 @@ rm -rfv ${i}; done %postun doc %install_info_delete --info-dir=%{_infodir} %{_infodir}/libconfig.info.gz -%files -%defattr(-,root,root) -%doc AUTHORS ChangeLog COPYING* README TODO -%doc examples - %files doc %defattr(-,root,root) -%doc doc/*.html -%doc doc/*.pdf -%{_infodir}/%{_libname}.info.gz +%doc doc/*.html doc/*.pdf examples +%{_infodir}/libconfig.info.gz -%files -n %{_libname}%{_SO_nr} +%files -n libconfig%{_soversion} %defattr(-,root,root) +%doc AUTHORS COPYING* README %{_libdir}/libconfig.so.* -%files -n %{_libname}++%{_SO_nr} +%files -n libconfig++%{_soversion} %defattr(-,root,root) +%doc AUTHORS COPYING* README %{_libdir}/libconfig++.so.* -%files -n %{_libname}-devel +%files devel %defattr(-,root,root) -%{_includedir}/%{_libname}.h -%{_libdir}/%{_libname}.so -%{_libdir}/pkgconfig/%{_libname}.pc +%doc ChangeLog TODO +%{_includedir}/libconfig.h +%{_libdir}/libconfig.so +%{_libdir}/pkgconfig/libconfig.pc -%files -n %{_libname}++-devel +%files -n libconfig++-devel %defattr(-,root,root) -%{_includedir}/%{_libname}.h++ -%{_libdir}/%{_libname}++.so -%{_libdir}/pkgconfig/%{_libname}++.pc +%doc ChangeLog TODO +%{_includedir}/libconfig.h++ +%{_libdir}/libconfig++.so +%{_libdir}/pkgconfig/libconfig++.pc %changelog