[packages/owncloudclient] add doc and gui bconds

glen glen at pld-linux.org
Tue Apr 12 15:44:09 CEST 2016


commit 4bbe24d59b011491df53a410d1e745a79e0addf5
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Tue Apr 12 16:43:14 2016 +0300

    add doc and gui bconds

 owncloudclient.spec | 21 ++++++++++++++++++---
 1 file changed, 18 insertions(+), 3 deletions(-)
---
diff --git a/owncloudclient.spec b/owncloudclient.spec
index 3476071..79cd1b7 100644
--- a/owncloudclient.spec
+++ b/owncloudclient.spec
@@ -1,6 +1,13 @@
 #
 # Conditional build:
-%bcond_without	nautilus		# build Nautilus extension
+%bcond_without	nautilus	# build Nautilus extension
+%bcond_without	doc		# build docs
+%bcond_without	gui		# build only libraries
+
+%if %{without gui}
+%undefine	with_nautilus
+%undefine	with_doc
+%endif
 
 Summary:	The ownCloud client
 Name:		owncloudclient
@@ -92,28 +99,34 @@ cd build
 %cmake \
 	-DQTKEYCHAIN_INCLUDE_DIR=/usr/include/qtkeychain \
 	-DQTKEYCHAIN_LIBRARY=/usr/%{_lib}/libqtkeychain.so \
+	%{!?with_gui:-DBUILD_LIBRARIES_ONLY=ON} \
 	..
 %{__make}
 
+%if %{with doc}
 # documentation here?
 if [ -e conf.py ]; then
 	# for old cmake versions we need to move the conf.py.
 	mv conf.py doc/
 fi
-
 %{__make} doc
+%endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
 %{__make} -C build install \
 	DESTDIR=$RPM_BUILD_ROOT
 
+%if %{with nautilus}
 # nemo not in pld
 %{__rm} $RPM_BUILD_ROOT%{_datadir}/nemo-python/extensions/syncstate.py*
+%endif
 
+%if %{with doc}
 mv $RPM_BUILD_ROOT%{_docdir}/html ${RPM_BUILD_ROOT}%{_docdir}/%{name}
 mv $RPM_BUILD_ROOT%{_docdir}/latex ${RPM_BUILD_ROOT}%{_docdir}/%{name}
 rm $RPM_BUILD_ROOT%{_docdir}/%{name}/unthemed/.buildinfo
+%endif
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -129,6 +142,7 @@ fi
 %post	libs -p /sbin/ldconfig
 %postun	libs -p /sbin/ldconfig
 
+%if %{with gui}
 %files
 %defattr(644,root,root,755)
 %doc README.md COPYING
@@ -139,9 +153,10 @@ fi
 %{_desktopdir}/owncloud.desktop
 %{_iconsdir}/*/*/apps/*.png
 %{_datadir}/owncloud
-#%{_libdir}/owncloud/libocsync.so.*
+%{_libdir}/owncloud/libocsync.so.*
 %dir %{_libdir}/owncloud
 %{_mandir}/man1/owncloud*
+%endif
 
 %files libs
 %defattr(644,root,root,755)
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/owncloudclient.git/commitdiff/4bbe24d59b011491df53a410d1e745a79e0addf5



More information about the pld-cvs-commit mailing list