[packages/ykpers] - updated to 1.19.0 - added -static

qboosh qboosh at pld-linux.org
Sat May 19 09:29:36 CEST 2018


commit 4a4d6a2318d247c3f511cc63e8046f601513360f
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sat May 19 09:30:26 2018 +0200

    - updated to 1.19.0
    - added -static

 ykpers.spec | 94 +++++++++++++++++++++++++++++++++++++++++++------------------
 1 file changed, 67 insertions(+), 27 deletions(-)
---
diff --git a/ykpers.spec b/ykpers.spec
index 40605a8..fff4046 100644
--- a/ykpers.spec
+++ b/ykpers.spec
@@ -1,30 +1,61 @@
-%bcond_without	tests
+#
+# Conditional build:
+%bcond_without	static_libs	# static library
+%bcond_without	tests		# unit tests
+
 Summary:	Yubikey personalization program
+Summary(pl.UTF-8):	Program do personalizacji urządzeń Yubikey
 Name:		ykpers
-Version:	1.18.0
-Release:	2
+Version:	1.19.0
+Release:	1
 License:	BSD
 Group:		Applications/System
-URL:		http://opensource.yubico.com/yubikey-personalization/
-Source0:	http://opensource.yubico.com/yubikey-personalization/releases/%{name}-%{version}.tar.gz
-# Source0-md5:	58e6a7011a3a02ae420a8eee0a442fb1
+Source0:	https://developers.yubico.com/yubikey-personalization/Releases/%{name}-%{version}.tar.gz
+# Source0-md5:	22084c0e55f3c3259963c0136adb3950
+URL:		https://developers.yubico.com/yubikey-personalization/
+BuildRequires:	asciidoc
 BuildRequires:	json-c-devel
-BuildRequires:	libusb-devel
-BuildRequires:	libyubikey-devel
-BuildRequires:	systemd-devel
+BuildRequires:	libusb-devel >=1.0
+BuildRequires:	libyubikey-devel >= 1.5
+BuildRequires:	pkgconfig
+BuildRequires:	udev-devel >= 1:1.188
+Requires:	libyubikey >= 1.5
+Conflicts:	udev-core < 1:1.188
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
 Yubico's YubiKey can be re-programmed with a new AES key. This is a
 library that makes this an easy task.
 
+%description
+Urządzenia Yubico YubiKey można ponownie zaprogramować nowym kluczem
+AES. Ta biblioteka pozwala zrobić to łatwo.
+
 %package devel
-Summary:	Development files for ykpers
+Summary:	Development files for ykpers library
+Summary(pl.UTF-8):	Pliki programistyczne biblioteki ykpers
 Group:		Development/Libraries
 Requires:	%{name} = %{version}-%{release}
 
 %description devel
-This package contains the header file needed to develop applications
-that use ykpers.
+This package contains the header files needed to develop applications
+that use ykpers library.
+
+%description devel -l pl.UTF-8
+Ten pakiet zawiera pliki nagłówkowe niezbędne do tworzenia aplikacji
+wykorzystujących bibliotekę ykpers.
+
+%package static
+Summary:	Static ykpers library
+Summary(pl.UTF-8):	Statyczna biblioteka ykpers
+Group:		Development/Libraries
+Requires:	%{name}-devel = %{version}-%{release}
+
+%description static
+Static ykpers library.
+
+%description static -l pl.UTF-8
+Statyczna biblioteka ykpers.
 
 %prep
 %setup -q
@@ -32,37 +63,41 @@ that use ykpers.
 %build
 %configure \
 	--disable-silent-rules \
-	--disable-static \
-	--with-udevrulesdir=/lib/udev/rules.d \
-	--with-backend=libusb
+	%{!?with_static_libs:--disable-static} \
+	--with-backend=libusb-1.0 \
+	--with-udevrulesdir=/lib/udev/rules.d
 %{__make}
 
 %if %{with tests}
-export LD_LIBRARY_PATH=$RPM_BUILD_DIR/%{name}-%{version}/.libs
-%{__make} check
+export LD_LIBRARY_PATH=$(pwd)/.libs
+# disable valgrind, it reports false positives from libc sscanf() and strdup()
+%{__make} check \
+	LOG_COMPILER=
 %endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
-%{__make} \
-	install \
+
+%{__make} install \
 	DESTDIR=$RPM_BUILD_ROOT
 
+# obsoleted by pkg-config
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/libykpers-1.la
+
 %clean
-%{__rm} -rf ${RPM_BUILD_ROOT}
+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 README ChangeLog NEWS
-%doc doc/Compatibility.asciidoc
+%doc AUTHORS COPYING ChangeLog NEWS README doc/Compatibility.asciidoc
 %attr(755,root,root) %{_bindir}/ykinfo
 %attr(755,root,root) %{_bindir}/ykpersonalize
 %attr(755,root,root) %{_bindir}/ykchalresp
-%attr(755,root,root) %ghost %{_libdir}/libykpers-1.so.1
 %attr(755,root,root) %{_libdir}/libykpers-1.so.*.*
+%attr(755,root,root) %ghost %{_libdir}/libykpers-1.so.1
 %{_mandir}/man1/ykpersonalize.1*
 %{_mandir}/man1/ykchalresp.1*
 %{_mandir}/man1/ykinfo.1*
@@ -71,7 +106,12 @@ rm -rf $RPM_BUILD_ROOT
 %files devel
 %defattr(644,root,root,755)
 %doc doc/USB-Hid-Issue.asciidoc
-%{_pkgconfigdir}/ykpers-1.pc
 %attr(755,root,root) %{_libdir}/libykpers-1.so
 %{_includedir}/ykpers-1
-%{_libdir}/libykpers-1.la
+%{_pkgconfigdir}/ykpers-1.pc
+
+%if %{with static_libs}
+%files static
+%defattr(644,root,root,755)
+%{_libdir}/libykpers-1.a
+%endif
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/ykpers.git/commitdiff/4a4d6a2318d247c3f511cc63e8046f601513360f



More information about the pld-cvs-commit mailing list