[packages/bctoolbox] - disable installation completeness check in packaged cmake files, added -static, release 2

qboosh qboosh at pld-linux.org
Mon Apr 22 20:18:28 CEST 2019


commit 581c6399e6f7dfeef2508d9c35176a00b4bd95f4
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Mon Apr 22 20:18:43 2019 +0200

    - disable installation completeness check in packaged cmake files, added -static, release 2

 bctoolbox.spec | 61 +++++++++++++++++++++++++++++++++++++++++++++++-----------
 1 file changed, 50 insertions(+), 11 deletions(-)
---
diff --git a/bctoolbox.spec b/bctoolbox.spec
index cbfef1e..0839ae9 100644
--- a/bctoolbox.spec
+++ b/bctoolbox.spec
@@ -1,28 +1,55 @@
+#
+# Conditional build:
+%bcond_without	static_libs	# static libraries
+
 Summary:	Utility library for software from Belledonne Communications
+Summary(pl.UTF-8):	Biblioteka narzędziowa dla oprogramowania firmy Belledonne Communications
 Name:		bctoolbox
 Version:	0.6.0
-Release:	1
+Release:	2
 License:	GPL v2+
 Group:		Libraries
 Source0:	https://linphone.org/releases/sources/bctoolbox/%{name}-%{version}.tar.gz
 # Source0-md5:	aeeac76938dd3b82a17ff498f81caef2
 URL:		https://linphone.org/
 BuildRequires:	bcunit-devel
-BuildRequires:	cmake
+BuildRequires:	cmake >= 2.8.12
+BuildRequires:	libstdc++-devel >= 6:4.7
 BuildRequires:	mbedtls-devel
+BuildRequires:	sed >= 4.0
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
 Utilities library used by Belledonne Communications softwares like
 belle-sip, mediastreamer2 and linphone.
 
+%description -l pl.UTF-8
+Biblioteka narzędziowa używana w oprogramowaniu firmy Belledonne
+Communications, takim jak belle-sip, mediastreamer2 czy linphone.
+
 %package devel
-Summary:	Header files and develpment documentation for bctoolbox
+Summary:	Header files for bctoolbox libraries
+Summary(pl.UTF-8):	Pliki nagłówkowe bibliotek bctoolbox
 Group:		Development/Libraries
-Requires:	%{name} = %{epoch}:%{version}-%{release}
+Requires:	%{name} = %{version}-%{release}
 
 %description devel
-Header files and develpment documentation for bctoolbox.
+Header files for bctoolbox libraries.
+
+%description devel -l pl.UTF-8
+Pliki nagłówkowe bibliotek bctoolbox.
+
+%package static
+Summary:	Static bctoolbox libraries
+Summary(pl.UTF-8):	Statyczne biblioteki bctoolbox
+Group:		Development/Libraries
+Requires:	%{name}-devel = %{version}-%{release}
+
+%description static
+Static bctoolbox libraries.
+
+%description static -l pl.UTF-8
+Statyczne biblioteki bctoolbox.
 
 %prep
 %setup -q
@@ -30,7 +57,8 @@ Header files and develpment documentation for bctoolbox.
 %build
 install -d build
 cd build
-%{cmake} ..
+%cmake .. \
+	%{!?with_static_libs:-DENABLE_STATIC=OFF}
 
 %{__make}
 
@@ -40,17 +68,20 @@ rm -rf $RPM_BUILD_ROOT
 %{__make} -C build install \
 	DESTDIR=$RPM_BUILD_ROOT
 
+# disable completeness check incompatible with split packaging
+%{__sed} -i -e '/^foreach(target .*IMPORT_CHECK_TARGETS/,/^endforeach/d; /^unset(_IMPORT_CHECK_TARGETS)/d' $RPM_BUILD_ROOT%{_datadir}/bctoolbox/cmake/BcToolboxTargets.cmake
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-%post   -p /sbin/ldconfig
-%postun -p /sbin/ldconfig
+%post	-p /sbin/ldconfig
+%postun	-p /sbin/ldconfig
 
 %files
 %defattr(644,root,root,755)
 %doc AUTHORS NEWS README.md
-%attr(755,root,root) %{_libdir}/libbctoolbox.so.*
-%attr(755,root,root) %{_libdir}/libbctoolbox-tester.so.*
+%attr(755,root,root) %{_libdir}/libbctoolbox.so.1
+%attr(755,root,root) %{_libdir}/libbctoolbox-tester.so.1
 
 %files devel
 %defattr(644,root,root,755)
@@ -59,4 +90,12 @@ rm -rf $RPM_BUILD_ROOT
 %{_includedir}/bctoolbox
 %{_pkgconfigdir}/bctoolbox.pc
 %{_pkgconfigdir}/bctoolbox-tester.pc
-%{_datadir}/bctoolbox
+%dir %{_datadir}/bctoolbox
+%{_datadir}/bctoolbox/cmake
+
+%if %{with static_libs}
+%files static
+%defattr(644,root,root,755)
+%{_libdir}/libbctoolbox.a
+%{_libdir}/libbctoolbox-tester.a
+%endif
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/bctoolbox.git/commitdiff/581c6399e6f7dfeef2508d9c35176a00b4bd95f4



More information about the pld-cvs-commit mailing list