commit 6c695f248464ddec4786ba125bdeb3c08772bfc6
Author: Jakub Bogusz <[email protected]>
Date:   Fri May 29 18:14:35 2020 +0200

    - new
    - sh patch to remove bashisms from configure
    - doxygen patch to disable splitting apidocs into 4096 dirs

 libksi-doxygen.patch |  11 +++++
 libksi-sh.patch      |  31 ++++++++++++
 libksi.spec          | 137 +++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 179 insertions(+)
---
diff --git a/libksi.spec b/libksi.spec
new file mode 100644
index 0000000..190325c
--- /dev/null
+++ b/libksi.spec
@@ -0,0 +1,137 @@
+#
+# Conditional build
+%bcond_without apidocs         # API documentation
+%bcond_without static_libs     # static library
+
+Summary:       Guardtime KSI Client API for C
+Summary(pl.UTF-8):     API klienckie Guardtime KSI dla C
+Name:          libksi
+Version:       3.20.3025
+Release:       1
+License:       Apache v2.0
+Group:         Libraries
+#Source0Download: https://github.com/guardtime/libksi/releases
+Source0:       
https://github.com/guardtime/libksi/archive/v%{version}/%{name}-%{version}.tar.gz
+# Source0-md5: 260c5689fe6379376a9486b4ed64850d
+Patch0:                %{name}-sh.patch
+Patch1:                %{name}-doxygen.patch
+URL:           http://www.guardtime.com/
+BuildRequires: autoconf >= 2.50
+BuildRequires: automake
+BuildRequires: curl-devel
+%{?with_apidocs:BuildRequires: doxygen >= 1.8.0}
+BuildRequires: libtool
+BuildRequires: openssl-devel >= 0.9.8
+Requires:      ca-certificates
+Requires:      openssl >= 0.9.8
+BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+Client-side runtime library for accessing Guardtime's KSI Blockchain
+Service.
+
+%description -l pl.UTF-8
+Biblioteka kliencka do dostępu do usługi KSI Blockchain firmy
+Guardtime.
+
+%package devel
+Summary:       Header files for Guardtime KSI library
+Summary(pl.UTF-8):     Pliki nagłówkowe biblioteki Guardtime KSI
+Group:         Development/Libraries
+Requires:      %{name} = %{version}-%{release}
+Requires:      curl-devel
+Requires:      openssl-devel >= 0.9.8
+
+%description devel
+Client-side development headers for accessing Guardtime's KSI
+Blockchain Service.
+
+%description devel -l pl.UTF-8
+Pliki nagłówkowe biblioteki do dostępu do usługi KSI Blockchain
+firmy Guardtime.
+
+%package static
+Summary:       Static Gaurdtime KSI library
+Summary(pl.UTF-8):     Biblioteka statyczna Guardtime KSI
+Group:         Development/Libraries
+Requires:      %{name}-devel = %{version}-%{release}
+
+%description static
+Static Gaurdtime KSI library.
+
+%description static -l pl.UTF-8
+Biblioteka statyczna Guardtime KSI.
+
+%package apidocs
+Summary:       API documentation for Guardtime KSI library
+Summary(pl.UTF-8):     Dokumentacja API biblioteki Guardtime KSI
+Group:         Documentation
+
+%description apidocs
+API documentation for Guardtime KSI library.
+
+%description apidocs -l pl.UTF-8
+Dokumentacja API biblioteki Guardtime KSI.
+
+%prep
+%setup -q
+%patch0 -p1
+%patch1 -p1
+
+%build
+%{__libtoolize}
+%{__aclocal} -I m4
+%{__autoconf}
+%{__autoheader}
+%{__automake}
+%configure \
+       --disable-silent-rules \
+       %{!?with_static_libs:--disable-static} \
+       --with-cafile=/etc/certs/ca-certificates.crt
+
+%{__make}
+
+%if %{with apidocs}
+%{__make} -C doc htmldoc
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} install \
+       DESTDIR=$RPM_BUILD_ROOT
+
+# obsoleted by pkg-config
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/libksi.la
+# changelog packaged as %doc, license is generic Apache v2.0 text
+%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/libksi
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post  -p /sbin/ldconfig
+%postun        -p /sbin/ldconfig
+
+%files
+%defattr(644,root,root,755)
+%doc README.md changelog
+%attr(755,root,root) %{_libdir}/libksi.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libksi.so.13
+
+%files devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libksi.so
+%{_includedir}/ksi
+%{_pkgconfigdir}/libksi.pc
+
+%if %{with static_libs}
+%files static
+%defattr(644,root,root,755)
+%{_libdir}/libksi.a
+%endif
+
+%if %{with apidocs}
+%files apidocs
+%defattr(644,root,root,755)
+%doc doc/html/{search,*.css,*.html,*.js,*.png}
+%endif
diff --git a/libksi-doxygen.patch b/libksi-doxygen.patch
new file mode 100644
index 0000000..8df5e32
--- /dev/null
+++ b/libksi-doxygen.patch
@@ -0,0 +1,11 @@
+--- libksi-3.20.3025/doc/doxyfile.orig 2019-10-07 10:49:34.000000000 +0200
++++ libksi-3.20.3025/doc/doxyfile      2020-05-29 06:52:26.496011403 +0200
+@@ -87,7 +87,7 @@
+ # performance problems for the file system.
+ # The default value is: NO.
+ 
+-CREATE_SUBDIRS         = YES
++CREATE_SUBDIRS         = NO
+ 
+ # The OUTPUT_LANGUAGE tag is used to specify the language in which all
+ # documentation generated by doxygen is written. Doxygen will use this
diff --git a/libksi-sh.patch b/libksi-sh.patch
new file mode 100644
index 0000000..87b1c6b
--- /dev/null
+++ b/libksi-sh.patch
@@ -0,0 +1,31 @@
+--- libksi-3.20.3025/configure.ac.orig 2019-10-07 10:49:34.000000000 +0200
++++ libksi-3.20.3025/configure.ac      2020-05-29 06:31:15.506230279 +0200
+@@ -205,11 +205,11 @@
+ esac
+ 
+ # To ensure compatibility with Microsoft compiler.
+-CFLAGS+=" -Wdeclaration-after-statement"
++CFLAGS="$CFLAGS -Wdeclaration-after-statement"
+ # Add more warnings.
+-CFLAGS+=" -Wall"
++CFLAGS="$CFLAGS -Wall"
+ # Optimize for debugging.
+-#CFLAGS+=" -Og"
++#CFLAGS="$CFLAGS -Og"
+ 
+ AC_ARG_WITH(unit-test-xml,
+ [  --with-unit-test-xml=file          Specifies the target xml of unit 
tests.],
+@@ -219,10 +219,9 @@
+ 
+ AC_MSG_NOTICE([Update version.h])
+ rm -f src/ksi/version.h
+-VER=($(echo $PACKAGE_VERSION | tr "." " "))
+-VER_MAJOR=${VER[[0]]}
+-VER_MINOR=${VER[[1]]}
+-VER_BUILD=${VER[[2]]}
++VER_MAJOR=$(echo $PACKAGE_VERSION | cut -d. -f1)
++VER_MINOR=$(echo $PACKAGE_VERSION | cut -d. -f2)
++VER_BUILD=$(echo $PACKAGE_VERSION | cut -d. -f3)
+ AC_SUBST(VER_MAJOR)
+ AC_SUBST(VER_MINOR)
+ AC_SUBST(VER_BUILD)
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/libksi.git/commitdiff/6c695f248464ddec4786ba125bdeb3c08772bfc6

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to