From 986d045b8b257ccdabd7c501137eb3920b998ee5 Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Mon, 26 Nov 2012 17:10:31 +0000 Subject: [PATCH 1/2] Added obsoletes/provides as required for the Fedora package review --- .gitignore | 1 + PackageKit-Qt.spec | 71 ++++++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 73 insertions(+) create mode 100644 PackageKit-Qt.spec diff --git a/.gitignore b/.gitignore index e69de29..5e1b7f5 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/PackageKit-Qt-0.8.6.tar.gz diff --git a/PackageKit-Qt.spec b/PackageKit-Qt.spec new file mode 100644 index 0000000..ace18a8 --- /dev/null +++ b/PackageKit-Qt.spec @@ -0,0 +1,71 @@ +Summary: Qt support library for PackageKit +Name: PackageKit-Qt +Version: 0.8.6 +Release: 2%{?dist} +License: LGPLv2+ +URL: http://www.packagekit.org +Source0: http://www.packagekit.org/releases/%{name}-%{version}.tar.gz + +BuildRequires: cmake +BuildRequires: libtool +BuildRequires: qt-devel + +Obsoletes: PackageKit-qt < 0.8.6 +Provides: PackageKit-qt = %{version}-%{release} +Provides: PackageKit-qt%{?_isa} = %{version}-%{release} + +# required for /usr/share/dbus-1/interfaces/*.xml +BuildRequires: PackageKit + +%description +PackageKit-qt is a Qt support library for PackageKit + +%package devel +Summary: Development headers for PackageKit-Qt +Requires: %{name} = %{version}-%{release} + +Obsoletes: PackageKit-qt-devel < 0.8.6 +Provides: PackageKit-qt-devel = %{version}-%{release} + +%description devel +Development headers and libraries for PackageKit-Qt. + +%prep +%setup -q + +%build +# cannot do in-tree build +mkdir build +cd build +%cmake -DCMAKE_INSTALL_LIBDIR=%{_libdir} ../ +make %{?_smp_mflags} + +%install +cd build +make install DESTDIR=$RPM_BUILD_ROOT + +%post -p /sbin/ldconfig + +%postun -p /sbin/ldconfig + +%files +%defattr(-,root,root,-) +%doc AUTHORS NEWS COPYING +%{_libdir}/*libpackagekit-qt2.so.* + +%files devel +%defattr(-,root,root,-) +%doc AUTHORS NEWS COPYING +%{_libdir}/libpackagekit-qt2.so +%{_libdir}/pkgconfig/packagekit-qt2.pc +%dir %{_includedir}/PackageKit/packagekit-qt2 +%{_includedir}/PackageKit/packagekit-qt2/* +%dir %{_libdir}/cmake/packagekit-qt2 +%{_libdir}/cmake/packagekit-qt2/*.cmake + +%changelog +* Mon Nov 26 2012 Richard Hughes 0.8.6-2 +- Added obsoletes/provides as required for the Fedora package review + +* Mon Nov 26 2012 Richard Hughes 0.8.6-1 +- Initial version for Fedora package review diff --git a/sources b/sources index e69de29..5cabcbe 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +41f6fa67e980733d7d8a2cd881bbe5b4 PackageKit-Qt-0.8.6.tar.gz From 25cff5c75d3703f11d55cf3275ba468ad36022e9 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Mon, 26 Nov 2012 13:29:19 -0600 Subject: [PATCH 2/2] 0.8.6-3 - fixup dir ownership - use pkgconfig-style deps - tighten subpkg dep via %?_isa --- PackageKit-Qt.spec | 51 +++++++++++++++++++++++++++------------------- 1 file changed, 30 insertions(+), 21 deletions(-) diff --git a/PackageKit-Qt.spec b/PackageKit-Qt.spec index ace18a8..98ab581 100644 --- a/PackageKit-Qt.spec +++ b/PackageKit-Qt.spec @@ -1,14 +1,14 @@ Summary: Qt support library for PackageKit Name: PackageKit-Qt Version: 0.8.6 -Release: 2%{?dist} +Release: 3%{?dist} + License: LGPLv2+ -URL: http://www.packagekit.org +URL: http://www.packagekit.org/ Source0: http://www.packagekit.org/releases/%{name}-%{version}.tar.gz BuildRequires: cmake -BuildRequires: libtool -BuildRequires: qt-devel +BuildRequires: pkgconfig(QtDBus) pkgconfig(QtSql) Obsoletes: PackageKit-qt < 0.8.6 Provides: PackageKit-qt = %{version}-%{release} @@ -22,7 +22,7 @@ PackageKit-qt is a Qt support library for PackageKit %package devel Summary: Development headers for PackageKit-Qt -Requires: %{name} = %{version}-%{release} +Requires: %{name}%{?_isa} = %{version}-%{release} Obsoletes: PackageKit-qt-devel < 0.8.6 Provides: PackageKit-qt-devel = %{version}-%{release} @@ -30,40 +30,49 @@ Provides: PackageKit-qt-devel = %{version}-%{release} %description devel Development headers and libraries for PackageKit-Qt. + %prep %setup -q + %build -# cannot do in-tree build -mkdir build -cd build -%cmake -DCMAKE_INSTALL_LIBDIR=%{_libdir} ../ -make %{?_smp_mflags} +mkdir -p %{_target_platform} +pushd %{_target_platform} +%{cmake} \ + -DCMAKE_INSTALL_LIBDIR:PATH=%{_libdir} \ + .. +popd + +make %{?_smp_mflags} -C %{_target_platform} + %install -cd build -make install DESTDIR=$RPM_BUILD_ROOT +make install/fast DESTDIR=%{buildroot} -C %{_target_platform} -%post -p /sbin/ldconfig +%post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files -%defattr(-,root,root,-) %doc AUTHORS NEWS COPYING -%{_libdir}/*libpackagekit-qt2.so.* +%{_libdir}/libpackagekit-qt2.so.%{version} +%{_libdir}/libpackagekit-qt2.so.5* %files devel -%defattr(-,root,root,-) -%doc AUTHORS NEWS COPYING %{_libdir}/libpackagekit-qt2.so %{_libdir}/pkgconfig/packagekit-qt2.pc -%dir %{_includedir}/PackageKit/packagekit-qt2 -%{_includedir}/PackageKit/packagekit-qt2/* -%dir %{_libdir}/cmake/packagekit-qt2 -%{_libdir}/cmake/packagekit-qt2/*.cmake +%dir %{_includedir}/PackageKit +%{_includedir}/PackageKit/packagekit-qt2/ +%dir %{_libdir}/cmake +%{_libdir}/cmake/packagekit-qt2/ + %changelog +* Mon Nov 26 2012 Rex Dieter 0.8.6-3 +- fixup dir ownership +- use pkgconfig-style deps +- tighten subpkg dep via %%?_isa + * Mon Nov 26 2012 Richard Hughes 0.8.6-2 - Added obsoletes/provides as required for the Fedora package review