[polkit-qt] build polkit-qt5-1(-devel) here

Rex Dieter rdieter at fedoraproject.org
Fri Oct 24 19:28:38 UTC 2014


commit ba35ac775b120eb853d597b5144b718b223f9cc4
Author: Rex Dieter <rdieter at math.unl.edu>
Date:   Fri Oct 24 14:28:42 2014 -0500

    build polkit-qt5-1(-devel) here

 polkit-qt.spec |   76 ++++++++++++++++++++++++++++++++++++++++++++++++++------
 1 files changed, 68 insertions(+), 8 deletions(-)
---
diff --git a/polkit-qt.spec b/polkit-qt.spec
index 5e41e8b..df78f46 100644
--- a/polkit-qt.spec
+++ b/polkit-qt.spec
@@ -1,9 +1,10 @@
 
 %global rpm_macros_dir %(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{_sysconfdir}/rpm; echo $d)
+%global qt5 1
 
 Name:            polkit-qt
 Version:         0.112.0
-Release:         2%{?dist}
+Release:         3%{?dist}
 Summary:         Qt bindings for PolicyKit
 
 License:         GPLv2+
@@ -19,9 +20,12 @@ Source10:        macros.polkit-qt
 
 BuildRequires:   automoc4
 BuildRequires:   cmake
-BuildRequires:   polkit-devel >= 0.98
-BuildRequires:   qt4-devel
 BuildRequires:   doxygen
+BuildRequires:   pkgconfig(polkit-agent-1) pkgconfig(polkit-gobject-1)
+BuildRequires:   pkgconfig(QtDBus) pkgconfig(QtGui) pkgconfig(QtXml)
+%if 0%{?qt5}
+BuildRequires:   pkgconfig(Qt5DBus) pkgconfig(Qt5Gui) pkgconfig(Qt5Widgets) pkgconfig(Qt5Xml)
+%endif
 
 Obsoletes:       polkit-qt-examples < 0.10
 
@@ -44,6 +48,22 @@ BuildArch: noarch
 %description doc
 %{summary}.
 
+%if 0%{?qt5}
+%package -n polkit-qt5-1
+Summary: PolicyKit Qt5 bindings
+Provides: polkit-qt5 = %{version}-%{release}
+%description -n polkit-qt5-1
+Polkit-qt is a library that lets developers use the PolicyKit API
+through a nice Qt-styled API.
+
+%package -n polkit-qt5-1-devel
+Summary: Development files for PolicyKit Qt5 bindings
+Provides: polkit-qt5-devel = %{version}-%{release}
+Requires: %{name}%{?_isa} = %{version}-%{release}
+%description -n polkit-qt5-1-devel
+%{summary}.
+%endif
+
 
 %prep
 %setup -q -n %{name}-1-%{version}
@@ -55,23 +75,37 @@ BuildArch: noarch
 
 %build
 mkdir -p %{_target_platform}
-pushd %{_target_platform}
+pushd    %{_target_platform}
 %{cmake} \
-  -DUSE_QT4=true \
-  -DBUILD_EXAMPLES:BOOL=0 \
+  -DUSE_QT4:BOOL=ON -DUSE_QT5:BOOL=OFF \
+  -DBUILD_EXAMPLES:BOOL=OFF \
   -DDATA_INSTALL_DIR:PATH=%{_datadir} \
   ..
 popd
-
 make %{?_smp_mflags} -C %{_target_platform}
 
-doxygen %{SOURCE1}
+%if 0%{?qt5}
+mkdir -p %{_target_platform}-qt5
+pushd    %{_target_platform}-qt5
+%{cmake} \
+  -DUSE_QT4:BOOL=OFF -DUSE_QT5:BOOL=ON \
+  -DBUILD_EXAMPLES:BOOL=OFF \
+  -DDATA_INSTALL_DIR:PATH=%{_datadir} \
+  ..
+popd
+make %{?_smp_mflags} -C %{_target_platform}-qt5
+%endif
 
+## build docs
+doxygen %{SOURCE1}
 # Remove installdox file - it is not necessary here
 rm -fv html/installdox
 
 
 %install
+%if 0%{?qt5}
+make install/fast DESTDIR=%{buildroot} -C %{_target_platform}-qt5
+%endif
 make install/fast DESTDIR=%{buildroot} -C %{_target_platform}
 
 install -p -m644 -D %{SOURCE10} %{buildroot}%{rpm_macros_dir}/macros.polkit-qt
@@ -102,8 +136,34 @@ install -p -m644 -D %{SOURCE10} %{buildroot}%{rpm_macros_dir}/macros.polkit-qt
 %files doc
 %doc html/*
 
+%if 0%{?qt5}
+%post -n polkit-qt5-1 -p /sbin/ldconfig
+%postun -n polkit-qt5-1 -p /sbin/ldconfig
+
+%files -n polkit-qt5-1
+%doc AUTHORS COPYING README
+%{_libdir}/libpolkit-qt5-core-1.so.1*
+%{_libdir}/libpolkit-qt5-gui-1.so.1*
+%{_libdir}/libpolkit-qt5-agent-1.so.1*
+
+%files -n polkit-qt5-1-devel
+%{rpm_macros_dir}/macros.polkit-qt
+%{_includedir}/polkit-qt5-1/
+%{_libdir}/libpolkit-qt5-core-1.so
+%{_libdir}/libpolkit-qt5-gui-1.so
+%{_libdir}/libpolkit-qt5-agent-1.so
+%{_libdir}/pkgconfig/polkit-qt5-1.pc
+%{_libdir}/pkgconfig/polkit-qt5-core-1.pc
+%{_libdir}/pkgconfig/polkit-qt5-gui-1.pc
+%{_libdir}/pkgconfig/polkit-qt5-agent-1.pc
+%{_libdir}/cmake/PolkitQt5-1/
+%endif
+
 
 %changelog
+* Fri Oct 24 2014 Rex Dieter <rdieter at fedoraproject.org> 0.112.0-3
+- build polkit-qt5-1(-devel) here 
+
 * Sun Aug 17 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.112.0-2
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
 


More information about the scm-commits mailing list