[packages/openpace] - new

qboosh qboosh at pld-linux.org
Sat Nov 25 23:14:18 CET 2017


commit 959fb1b83731c47389c0c5baa7b819b358432927
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sat Nov 25 23:15:07 2017 +0100

    - new

 openpace-optflags.patch |  38 ++++++++
 openpace-ruby.patch     |  11 +++
 openpace.spec           | 245 ++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 294 insertions(+)
---
diff --git a/openpace.spec b/openpace.spec
new file mode 100644
index 0000000..2648b5d
--- /dev/null
+++ b/openpace.spec
@@ -0,0 +1,245 @@
+#
+# Conditional build:
+%bcond_without	static_libs	# static library
+# bindings
+%bcond_with	golang		# Go binding [only gccgo build is supported]
+%bcond_without	java		# Java binding
+%bcond_without	python		# Python binding
+%bcond_without	ruby		# Ruby binding
+#
+Summary:	Cryptographic library for EAC version 2
+Summary(pl.UTF-8):	Biblioteka kryptograficzna do EAC v2
+Name:		openpace
+Version:	1.0.2
+Release:	1
+License:	GPL v3+
+Group:		Libraries
+#Source0Download: https://github.com/frankmorgner/openpace/releases
+Source0:	https://github.com/frankmorgner/openpace/releases/download/%{version}/%{name}-%{version}.tar.gz
+# Source0-md5:	2fbd4d27d4726efe19417b471319c3a9
+Patch0:		%{name}-optflags.patch
+Patch1:		%{name}-ruby.patch
+URL:		https://frankmorgner.github.io/openpace/
+BuildRequires:	autoconf >= 2.67
+BuildRequires:	automake
+BuildRequires:	doxygen
+%{?with_golang:BuildRequires:	gcc-go}
+BuildRequires:	help2man
+%{?with_java:BuildRequires:	jdk}
+BuildRequires:	libtool
+BuildRequires:	openssl-devel >= 1.0.2
+BuildRequires:	pkgconfig
+%{?with_python:BuildRequires:	python-devel >= 2}
+%{?with_ruby:BuildRequires:	ruby-devel}
+BuildRequires:	sphinx-pdg
+BuildRequires:	swig
+Requires:	openssl >= 1.0.2
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+Cryptographic library for EAC version 2.
+
+%description -l pl.UTF-8
+Biblioteka kryptograficzna do EAC v2.
+
+%package devel
+Summary:	Header files for OpenPACE library
+Summary(pl.UTF-8):	Pliki nagłówkowe biblioteki OpenPACE
+Group:		Development/Libraries
+Requires:	%{name} = %{version}-%{release}
+Requires:	openssl-devel >= 1.0.2
+
+%description devel
+Header files for OpenPACE library.
+
+%description devel -l pl.UTF-8
+Pliki nagłówkowe biblioteki OpenPACE.
+
+%package static
+Summary:	Static OpenPACE library
+Summary(pl.UTF-8):	Statyczna biblioteka OpenPACE
+Group:		Development/Libraries
+Requires:	%{name}-devel = %{version}-%{release}
+
+%description static
+Static OpenPACE library.
+
+%description static -l pl.UTF-8
+Statyczna biblioteka OpenPACE.
+
+%package apidocs
+Summary:	API documentation for OpenPACE library
+Summary(pl.UTF-8):	Dokumentacja API biblioteki OpenPACE
+Group:		Documentation
+%if "%{_rpmversion}" >= "5"
+BuildArch:	noarch
+%endif
+
+%description apidocs
+API documentation for OpenPACE library.
+
+%description apidocs -l pl.UTF-8
+Dokumentacja API biblioteki OpenPACE.
+
+%package -n golang-openpace
+Summary:	Go language binding for OpenPACE library
+Summary(pl.UTF-8):	Wiązania języka Go do biblioteki OpenPACE
+Group:		Development/Languages
+Requires:	%{name} = %{version}-%{release}
+
+%description -n golang-openpace
+Go language binding for OpenPACE library.
+
+%description -n golang-openpace -l pl.UTF-8
+Wiązania języka Go do biblioteki OpenPACE.
+
+%package -n java-openpace
+Summary:	Java binding for OpenPACE library
+Summary(pl.UTF-8):	Wiązania Javy do biblioteki OpenPACE
+Group:		Development/Languages/Java
+Requires:	%{name} = %{version}-%{release}
+Requires:	jre
+
+%description -n java-openpace
+Java binding for OpenPACE library.
+
+%description -n java-openpace -l pl.UTF-8
+Wiązania Javy do biblioteki OpenPACE.
+
+%package -n python-openpace
+Summary:	Python binding for OpenPACE library
+Summary(pl.UTF-8):	Wiązania Pythona do biblioteki OpenPACE
+Group:		Development/Languages/Python
+Requires:	%{name} = %{version}-%{release}
+Requires:	python-modules
+
+%description -n python-openpace
+Python binding for OpenPACE library.
+
+%description -n python-openpace -l pl.UTF-8
+Wiązania Pythona do biblioteki OpenPACE.
+
+%package -n ruby-openpace
+Summary:	Ruby binding for OpenPACE library
+Summary(pl.UTF-8):	Wiązania języka Ruby do biblioteki OpenPACE
+Group:		Development/Languages
+Requires:	%{name} = %{version}-%{release}
+Requires:	ruby
+
+%description -n ruby-openpace
+Ruby binding for OpenPACE library.
+
+%description -n ruby-openpace -l pl.UTF-8
+Wiązania języka Ruby do biblioteki OpenPACE.
+
+%prep
+%setup -q
+%patch0 -p1
+%patch1 -p1
+
+# outdated versions
+%{__rm} -r docs/_static/{bootstrap-2.3.2,bootswatch-2.3.2}
+
+%build
+%{__libtoolize}
+%{__aclocal} -I m4
+%{__autoconf}
+%{__autoheader}
+%{__automake}
+%configure \
+	JAVAC=javac \
+	%{?with_golang:--enable-go} \
+	%{?with_java:--enable-java} \
+	%{?with_python:--enable-python} \
+	%{?with_ruby:--enable-ruby} \
+	--disable-silent-rules \
+	%{!?with_static_libs:--disable-static}
+%{__make}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} install \
+	DESTDIR=$RPM_BUILD_ROOT
+
+# junk
+%{__rm} $RPM_BUILD_ROOT%{_bindir}/example
+%{__rm} docs/_static/Makefile*
+# obsoleted by pkg-config
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/lib*eac.la
+
+%if %{with python}
+%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
+%py_postclean
+%endif
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post	-p /sbin/ldconfig
+%postun	-p /sbin/ldconfig
+
+%files
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/cvc-create
+%attr(755,root,root) %{_bindir}/cvc-print
+%attr(755,root,root) %{_bindir}/eactest
+%attr(755,root,root) %{_libdir}/libeac.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libeac.so.2
+%dir %{_sysconfdir}/eac
+%dir %{_sysconfdir}/eac/cvc
+%{_sysconfdir}/eac/cvc/DECVC*
+%dir %{_sysconfdir}/eac/x509
+%{_sysconfdir}/eac/x509/*
+%{_mandir}/man1/cvc-create.1*
+%{_mandir}/man1/cvc-print.1*
+
+%files devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libeac.so
+%{_includedir}/eac
+%{_pkgconfigdir}/libeac.pc
+
+%if %{with static_libs}
+%files static
+%defattr(644,root,root,755)
+%{_libdir}/libeac.a
+%endif
+
+%files apidocs
+%defattr(644,root,root,755)
+%doc docs/{_static,*.html,*.js}
+
+%if %{with golang}
+%files -n golang-openpace
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libgeac.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libgeac.so.0
+%attr(755,root,root) %{_libdir}/libgeac.so
+%endif
+
+%if %{with java}
+%files -n java-openpace
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libjeac.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libjeac.so.0
+%attr(755,root,root) %{_libdir}/libjeac.so
+%dir %{_datadir}/openpace
+%{_datadir}/openpace/java
+%endif
+
+%if %{with python}
+%files -n python-openpace
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/cvc_rehash
+%attr(755,root,root) %{py_sitedir}/_eac.so
+%{py_sitedir}/chat.py[co]
+%{py_sitedir}/eac.py[co]
+%{py_sitedir}/OpenPACE-%{version}-py*.egg-info
+%endif
+
+%if %{with ruby}
+%files -n ruby-openpace
+%defattr(644,root,root,755)
+%attr(755,root,root) %{ruby_vendorarchdir}/eac.so
+%endif
diff --git a/openpace-optflags.patch b/openpace-optflags.patch
new file mode 100644
index 0000000..56734f8
--- /dev/null
+++ b/openpace-optflags.patch
@@ -0,0 +1,38 @@
+--- openpace-1.0.2/bindings/python/Makefile.am.orig	2016-06-09 12:23:01.000000000 +0200
++++ openpace-1.0.2/bindings/python/Makefile.am	2017-11-25 21:09:35.571413585 +0100
+@@ -13,11 +13,11 @@
+ bin_SCRIPTS = cvc_rehash
+ 
+ do_subst=$(SED)\
+-	-e's,[@]CFLAGS[@],$(CFLAGS),g'\
+-	-e's,[@]CPPFLAGS[@],$(CPPFLAGS),g'\
+-	-e's,[@]CRYPTO_CFLAGS[@],$(CRYPTO_CFLAGS),g'\
+-	-e's,[@]CRYPTO_LIBS[@],'"$(CRYPTO_LIBS)"',g'\
+-	-e's,[@]LIBS[@],$(LIBS),g'\
++	-e's^[@]CFLAGS[@]^$(CFLAGS)^g'\
++	-e's^[@]CPPFLAGS[@]^$(CPPFLAGS)^g'\
++	-e's^[@]CRYPTO_CFLAGS[@]^$(CRYPTO_CFLAGS)^g'\
++	-e's^[@]CRYPTO_LIBS[@]^'"$(CRYPTO_LIBS)"'^g'\
++	-e's^[@]LIBS[@]^$(LIBS)^g'\
+ 	-e's,[@]OPENPACE_CFLAGS[@],-I$(top_srcdir)/src,g'\
+ 	-e's,[@]OPENPACE_LIBS[@],-L$(top_builddir)/src/.libs -leac,g'\
+ 	-e's,[@]PACKAGE_NAME[@],$(PACKAGE_NAME),g'\
+--- openpace-1.0.2/bindings/ruby/Makefile.am.orig	2017-07-20 13:34:57.000000000 +0200
++++ openpace-1.0.2/bindings/ruby/Makefile.am	2017-11-25 21:12:17.738078402 +0100
+@@ -12,11 +12,11 @@
+ 
+ do_subst=$(SED)\
+ 	-e's,[@]prefix[@],$(prefix),g'\
+-	-e's,[@]CFLAGS[@],$(CFLAGS),g'\
+-	-e's,[@]LDFLAGS[@],$(LDFLAGS),g'\
+-	-e's,[@]CPPFLAGS[@],$(CPPFLAGS),g'\
+-	-e's,[@]CRYPTO_CFLAGS[@],$(CRYPTO_CFLAGS),g'\
+-	-e's,[@]CRYPTO_LIBS[@],'"$(CRYPTO_LIBS)"',g'\
++	-e's^[@]CFLAGS[@]^$(CFLAGS)^g'\
++	-e's^[@]LDFLAGS[@]^$(LDFLAGS)^g'\
++	-e's^[@]CPPFLAGS[@]^$(CPPFLAGS)^g'\
++	-e's^[@]CRYPTO_CFLAGS[@]^$(CRYPTO_CFLAGS)^g'\
++	-e's^[@]CRYPTO_LIBS[@]^'"$(CRYPTO_LIBS)"'^g'\
+ 	-e's,[@]OPENPACE_CFLAGS[@],-I$(abs_top_srcdir)/src,g'\
+ 	-e's,[@]OPENPACE_LIBS[@],$(abs_top_builddir)/src/.libs/libeac.so,g'
+ 
diff --git a/openpace-ruby.patch b/openpace-ruby.patch
new file mode 100644
index 0000000..8c27fa8
--- /dev/null
+++ b/openpace-ruby.patch
@@ -0,0 +1,11 @@
+--- openpace-1.0.2/bindings/ruby/Makefile.am.orig	2017-11-25 21:42:23.171391118 +0100
++++ openpace-1.0.2/bindings/ruby/Makefile.am	2017-11-25 22:17:17.931367201 +0100
+@@ -30,7 +30,7 @@
+ 	$(SWIG) -ruby -outdir $(builddir) -o eac_wrap.c -I$(srcdir)/.. $(srcdir)/../eac.i
+ 
+ ext/Makefile: ext/extconf.rb eac_wrap.c $(top_builddir)/src/libeac.la
+-	cd ext && $(RUBY) extconf.rb
++	cd ext && $(RUBY) extconf.rb --vendor
+ 	echo '' >> ext/Makefile
+ 	echo 'uninstall:' >> ext/Makefile
+ 	echo '	$$(RM) $$(RUBYARCHDIR)/$$(DLLIB)' >> ext/Makefile
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/openpace.git/commitdiff/959fb1b83731c47389c0c5baa7b819b358432927



More information about the pld-cvs-commit mailing list