diff --git a/libplist.changes b/libplist.changes index 4be0233..489fd3f 100644 --- a/libplist.changes +++ b/libplist.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Apr 1 00:17:48 CEST 2010 - vuntz@opensuse.org + +- Clean up packaging, based on what I did in multimedia:libs. + ------------------------------------------------------------------- Thu Mar 25 11:14:40 CET 2010 - meissner@suse.de diff --git a/libplist.spec b/libplist.spec index ae789bf..664d237 100644 --- a/libplist.spec +++ b/libplist.spec @@ -15,215 +15,136 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # -# norootforbuild Name: libplist -%define _name libplist1 Version: 1.2 -Release: 1 +Release: 2 License: LGPL v2.1 or GPL v2 -BuildRequires: cmake gcc-c++ glib2-devel libxml2-devel python-devel swig -%if 0%{?opensuse_bs} -%if %{defined fedora_version} || %{defined mandriva_version} -BuildRequires: pkgconfig python -%{!?py_ver: %global py_ver %(%{__python} -c "import sys; print sys.version[0:3]")} -%{!?py_sitedir: %global py_sitedir %(%{__python} -c "import distutils.sysconfig; print distutils.sysconfig.get_python_lib(plat_specific=1)")} -%else -BuildRequires: pkg-config -%endif -%endif -Source: %{name}-%{version}.tar.bz2 -Group: System/Libraries -Summary: A library to handle binary or XML Apple Property List files +Summary: Library for handling Apple Binary and XML Property Lists Url: http://github.com/JonathanBeck/libplist +Group: System/Libraries +Source: %{name}-%{version}.tar.bz2 +BuildRequires: cmake +BuildRequires: gcc-c++ +BuildRequires: glib2-devel +BuildRequires: libxml2-devel +BuildRequires: python-devel +BuildRequires: swig BuildRoot: %{_tmppath}/%{name}-%{version}-build -AutoReqProv: on %description -libplist is a library to handle the Apple Property List format (.plist) whereas -it's binary or XML. - - - -Authors: --------- - Jonathan Beck - Zach C. - -%package -n %{_name} - +libplist is a library for handling Apple Binary and XML Property Lists. +%package -n libplist1 License: LGPL v2.1 or GPL v2 -Summary: A library to handle binary or XML Apple Property List files +Summary: Library for handling Apple Binary and XML Property Lists Group: System/Libraries -Provides: %{name} = %{version} -Obsoletes: %{name} < %{version} - -%description -n %{_name} -libplist is a library to handle the Apple Property List format (.plist) whereas -it's binary or XML. - - - -Authors: --------- - Jonathan Beck - Zach C. - -%package -n %{name}++1 +Provides: libplist = %{version} +Obsoletes: libplist < %{version} +%description -n libplist1 +libplist is a library for handling Apple Binary and XML Property Lists. +%package -n libplist++1 License: LGPL v2.1 or GPL v2 -Summary: A library to handle binary or XML Apple Property List files +Summary: Library for handling Apple Binary and XML Property Lists Group: System/Libraries -Provides: %{name}++ = %{version} -Obsoletes: %{name}++ < %{version} +Provides: libplist++ = %{version} +Obsoletes: libplist++ < %{version} -%description -n %{name}++1 -libplist is a library to handle the Apple Property List format (.plist) whereas -it's binary or XML. - - - -Authors: --------- - Jonathan Beck - Zach C. - -%package -n %{name}++-devel - - -License: LGPL v2.1 or GPL v2 -Summary: Development files for %{_name}++ -Group: Development/Libraries/C and C++ -Requires: %{name}++ = %{version} -Requires: libxml2-devel glib2-devel - -%description -n %{name}++-devel -libplist is a library to handle the Apple Property List format (.plist) whereas -it's binary or XML. - - - -Authors: --------- - Jonathan Beck - Zach C. +%description -n libplist++1 +libplist is a library for handling Apple Binary and XML Property Lists. %package -n plutil License: LGPL v2.1 or GPL v2 -Summary: A library to handle binary or XML Apple Property List files +Summary: Library for handling Apple Binary and XML Property Lists Group: System/Libraries -Requires: %{_name} = %{version} +Requires: libplist1 = %{version} %description -n plutil -An utility to convert PList files from binary to XML and from XML to binary. +libplist is a library for handling Apple Binary and XML Property Lists. - - -Authors: --------- - Jonathan Beck - Zach C. +This package contains an utility to convert PList files from binary to XML and +from XML to binary. %package devel License: LGPL v2.1 or GPL v2 - -Summary: Development files for %{_name} +Summary: Library for handling Apple Binary and XML Property Lists -- Development Files Group: Development/Libraries/C and C++ -Requires: %{name} = %{version} -Requires: libxml2-devel glib2-devel +Requires: libplist1 = %{version} +Requires: glib2-devel +Requires: libxml2-devel %description devel -The %{name}-devel package contains libraries and header files for -developing applications that use %{_name}. +libplist is a library for handling Apple Binary and XML Property Lists. +This package contains the development files for C. +%package -n libplist++-devel +License: LGPL v2.1 or GPL v2 +Summary: Library for handling Apple Binary and XML Property Lists -- Development Files +Group: Development/Libraries/C and C++ +Requires: libplist++1 = %{version} +Requires: glib2-devel +Requires: libplist-devel +Requires: libxml2-devel -Authors: --------- - Jonathan Beck - Zach C. +%description -n libplist++-devel +libplist is a library for handling Apple Binary and XML Property Lists. + +This package contains the development files for C++. %package -n python-plist License: LGPL v2.1 or GPL v2 - -Summary: Python bindings for %{_name} +Summary: Library for handling Apple Binary and XML Property Lists -- Python Bindings Group: Development/Languages/Python -Requires: %{_name} = %{version} -%if %{defined suse_version} +Requires: libplist1 = %{version} %{py_requires} -%endif %description -n python-plist -Contains Python bindings for developing applications that use %{_name}. +libplist is a library for handling Apple Binary and XML Property Lists. - - -Authors: --------- - Jonathan Beck - Zach C. - -%if %{defined suse_version} -%endif +This package contains the python bindings. %prep %setup -q %build -mkdir build -cd build -export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" +export CFLAGS="%{optflags} -fno-strict-aliasing" cmake -DCMAKE_INSTALL_PREFIX=%{_prefix} \ -DCMAKE_INSTALL_LIBDIR=%{_lib} \ -DCMAKE_VERBOSE_MAKEFILE=TRUE \ - -DCMAKE_C_FLAGS_RELEASE:STRING="%{optflags}" \ - -DCMAKE_CXX_FLAGS_RELEASE:STRING="%{optflags}" \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_SKIP_RPATH=1 \ - -DBUILD_TESTING=OFF \ -DPYTHON_VERSION=%{py_ver} \ -DPYTHON_SITEDIR=%{py_sitedir} \ - .. + . make %{?jobs:-j%jobs} %install -cd build -%{__make} install DESTDIR=$RPM_BUILD_ROOT -rm $RPM_BUILD_ROOT%{_bindir}/plutil -mv $RPM_BUILD_ROOT%{_bindir}/plutil-%{version} $RPM_BUILD_ROOT%{_bindir}/plutil -rm -rf $RPM_BUILD_ROOT%{_libdir}/%{name}.*a* -%if %{defined mandriva_version} -%if 0%{?mandriva_version} == 2009 -%ifarch x86_64 -mkdir -p $RPM_BUILD_ROOT%{py_sitedir}/ -mv $RPM_BUILD_ROOT%{_libdir}/python%{py_ver}/site-packages/%{name} $RPM_BUILD_ROOT%{py_sitedir}/%{name} -%endif -%endif -%endif +%makeinstall +rm %{buildroot}%{_bindir}/plutil +mv %{buildroot}%{_bindir}/plutil-%{version} %{buildroot}%{_bindir}/plutil %clean -rm -rf $RPM_BUILD_ROOT +rm -rf %{buildroot} -%post -n %{_name} -p /sbin/ldconfig +%post -n libplist1 -p /sbin/ldconfig -%postun -n %{_name} -p /sbin/ldconfig +%postun -n libplist1 -p /sbin/ldconfig -%post -n %{name}++1 -p /sbin/ldconfig +%post -n libplist++1 -p /sbin/ldconfig -%postun -n %{name}++1 -p /sbin/ldconfig +%postun -n libplist++1 -p /sbin/ldconfig -%files -n %{_name} +%files -n libplist1 %defattr(-,root,root) -%doc AUTHORS COPYING README -%{_libdir}/%{name}.so.* +%doc AUTHORS COPYING.LESSER README +%{_libdir}/libplist.so.* -%files -n %{name}++1 +%files -n libplist++1 %defattr(-,root,root) -%doc AUTHORS COPYING README -%{_libdir}/%{name}++.so.* +%doc AUTHORS COPYING.LESSER README +%{_libdir}/libplist++.so.* %files -n plutil %defattr(-,root,root) @@ -233,10 +154,10 @@ rm -rf $RPM_BUILD_ROOT %defattr(-,root,root,-) %dir %{_includedir}/plist %{_includedir}/plist/plist.h -%{_libdir}/%{name}.so -%{_libdir}/pkgconfig/%{name}.pc +%{_libdir}/libplist.so +%{_libdir}/pkgconfig/libplist.pc -%files -n %{name}++-devel +%files -n libplist++-devel %defattr(-,root,root,-) %dir %{_includedir}/plist %{_includedir}/plist/plist++.h @@ -250,14 +171,13 @@ rm -rf $RPM_BUILD_ROOT %{_includedir}/plist/Real.h %{_includedir}/plist/String.h %{_includedir}/plist/Structure.h -%{_libdir}/%{name}++.so -%{_libdir}/pkgconfig/%{name}++.pc +%{_libdir}/libplist++.so +%{_libdir}/pkgconfig/libplist++.pc %files -n python-plist %defattr(-,root,root,-) -%dir %{py_sitedir}/plist -%{py_sitedir}/plist/* -%dir %{_includedir}/plist/swig -%{_includedir}/plist/swig/plist.i +%{py_sitedir}/plist/ +%dir %{_includedir}/plist +%{_includedir}/plist/swig/ %changelog