- hack around cannot build out of src-tree
- provide -qt5, -doc here
- own %_datadir/accounts/{providers,services}
epel9
Rex Dieter 9 years ago
parent dbb7f2c155
commit 8e77ce6b9d

@ -4,7 +4,7 @@
Name: libaccounts-qt
Summary: Accounts framework Qt bindings
Version: 1.13
Release: 1%{?dist}
Release: 10%{?dist}
License: LGPLv2
URL: https://gitlab.com/accounts-sso/libaccounts-qt
@ -31,37 +31,81 @@ Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel
%{summary}.
%package qt5
Summary: Accounts framework Qt5 bindings
BuildRequires: pkgconfig(Qt5Gui)
%description qt5
%{summary}.
%package qt5-devel
Summary: Development files for %{name}
Requires: %{name}-qt5%{?_isa} = %{version}-%{release}
%description qt5-devel
%{summary}.
%package doc
Summary: User and developer documentation for %{name}
Obsoletes: libaccounts-qt5-doc < 1.13-10
Provides: libaccounts-qt5-doc = %{version}-%{release}
BuildArch: noarch
%description doc
%{summary}.
%prep
%setup -q -n libaccounts-qt-%{version}-%{commit0}
# See https://community.kde.org/KTp/Setting_up_KAccounts#libaccounts-qt
# "Note that at this very day libaccounts-qt qmake does **NOT** support compiling the library outside the source directory"
%patch1 -p1 -b .64bitarchs
%patch102 -p1 -b .0002
%patch105 -p1 -b .0005
# See https://community.kde.org/KTp/Setting_up_KAccounts#libaccounts-qt
# "Note that at this very day libaccounts-qt qmake does **NOT** support compiling the library outside the source directory"
## HACK ##
mkdir orig
mv * orig/ ||:
cp -a orig/ %{_target_platform}-qt4/
cp -a orig/ %{_target_platform}-qt5/
mv orig/* .
%build
pushd %{_target_platform}-qt4
%{qmake_qt4} \
QMF_INSTALL_ROOT=%{_prefix} \
CONFIG+=release \
accounts-qt.pro
make %{?_smp_mflags}
popd
pushd %{_target_platform}-qt5
%{qmake_qt5} \
QMF_INSTALL_ROOT=%{_prefix} \
CONFIG+=release \
accounts-qt.pro
make %{?_smp_mflags}
popd
%install
make install INSTALL_ROOT=%{buildroot}
make install INSTALL_ROOT=%{buildroot} -C %{_target_platform}-qt4
make install INSTALL_ROOT=%{buildroot} -C %{_target_platform}-qt5
# create/own dirs
mkdir -p %{buildroot}%{_datadir}/accounts/{providers,services}
## unpackaged files
rm -fv %{buildroot}%{_datadir}/doc/accounts-qt/html/installdox
#remove tests for now
rm -rfv %{buildroot}%{_datadir}/libaccounts-qt-tests
rm -fv %{buildroot}%{_bindir}/accountstest
# move installed docs to include them in subpackage via %%doc magic
rm -rf __tmp_doc ; mkdir __tmp_doc
mv %{buildroot}%{_docdir}/accounts-qt __tmp_doc
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
@ -69,16 +113,43 @@ mv %{buildroot}%{_docdir}/accounts-qt __tmp_doc
%files
%license COPYING
%{_libdir}/libaccounts-qt.so.*
%dir %{_datadir}/accounts/
%dir %{_datadir}/accounts/providers/
%dir %{_datadir}/accounts/services/
%files devel
%{_libdir}/libaccounts-qt.so
%{_includedir}/accounts-qt/
%{_libdir}/pkgconfig/accounts-qt.pc
%{_libdir}/cmake/AccountsQt/
%doc __tmp_doc/accounts-qt/*
%post qt5 -p /sbin/ldconfig
%postun qt5 -p /sbin/ldconfig
%files qt5
%license COPYING
%{_libdir}/libaccounts-qt5.so.*
%dir %{_datadir}/accounts/
%dir %{_datadir}/accounts/providers/
%dir %{_datadir}/accounts/services/
%files qt5-devel
%{_libdir}/libaccounts-qt5.so
%{_includedir}/accounts-qt5/
%{_libdir}/pkgconfig/accounts-qt5.pc
%{_libdir}/cmake/AccountsQt5
%files doc
%{_docdir}/accounts-qt/
%changelog
* Thu Oct 29 2015 Rex Dieter <rdieter@fedoraproject.org> - 1.13-10
- hack around cannot build out of src-tree
- provide -qt5, -doc here
- own %%_datadir/accounts/{providers,services}
* Mon Sep 28 2015 Rex Dieter <rdieter@fedoraproject.org> 1.13-1
- libaccounts-qt-1.13, merge improvements from libaccounts-qt5

Loading…
Cancel
Save