[packages/storj-uplink-c] - new

qboosh qboosh at pld-linux.org
Sat Dec 12 15:32:33 CET 2020


commit 0f3e2d8d3591b6b5c228172c9861aec74b112432
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sat Dec 12 15:32:56 2020 +0100

    - new

 storj-uplink-c-libdir.patch | 30 +++++++++++++++
 storj-uplink-c.spec         | 92 +++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 122 insertions(+)
---
diff --git a/storj-uplink-c.spec b/storj-uplink-c.spec
new file mode 100644
index 0000000..833ef11
--- /dev/null
+++ b/storj-uplink-c.spec
@@ -0,0 +1,92 @@
+#
+# Conditional build:
+%bcond_with	gpl2	# GPL v2 compatible package (drop Apache v2 licensed components)
+
+Summary:	C library for Storj V3 Network
+Summary(pl.UTF-8):	Biblioteka C do sieci Storj V3
+Name:		storj-uplink-c
+Version:	1.2.0
+Release:	1
+License:	MIT, other (used go components)
+Group:		Libraries
+#Source0Download: https://github.com/storj/uplink-c/releases
+Source0:	https://github.com/storj/uplink-c/archive/v%{version}/uplink-c-%{version}.tar.gz
+# Source0-md5:	fd3b321db1b48839f58ca8da896f17b1
+Patch0:		%{name}-libdir.patch
+URL:		https://github.com/storj/uplink-c
+BuildRequires:	golang >= 1.13
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+C library for Storj V3 Network.
+
+%description -l pl.UTF-8
+Biblioteka C do sieci Storj V3.
+
+%package devel
+Summary:	Header files for Storj uplink library
+Summary(pl.UTF-8):	Pliki nagłówkowe biblioteki Storj uplink
+Group:		Development/Libraries
+Requires:	%{name} = %{version}-%{release}
+
+%description devel
+Header files for Storj uplink library.
+
+%description devel -l pl.UTF-8
+Pliki nagłówkowe biblioteki Storj uplink.
+
+%package static
+Summary:	Static Storj uplink library
+Summary(pl.UTF-8):	Statyczna biblioteka Storj uplink
+Group:		Development/Libraries
+Requires:	%{name}-devel = %{version}-%{release}
+
+%description static
+Static Storj uplink library.
+
+%description static -l pl.UTF-8
+Statyczna biblioteka Storj uplink.
+
+%prep
+%setup -q -n uplink-c-%{version}
+%patch0 -p1
+
+cat > scripts/version <<EOF
+#!/bin/sh
+echo %{version}
+EOF
+
+sed -i -e 's,^prefix=.*,prefix=%{_prefix},' \
+	-e 's,^libdir=.*,libdir=%{_libdir},' scripts/gen-pkg-config
+
+%build
+%{__make} build \
+	%{?with_gpl2:GPL2=true}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} install \
+	DESTDIR=$RPM_BUILD_ROOT \
+	PREFIX=%{_prefix} \
+	LIBDIR=%{_libdir}
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post	-p /sbin/ldconfig
+%postun	-p /sbin/ldconfig
+
+%files
+%defattr(644,root,root,755)
+%doc LICENSE README.md
+%attr(755,root,root) %{_libdir}/libuplink.so
+
+%files devel
+%defattr(644,root,root,755)
+%{_includedir}/uplink
+%{_pkgconfigdir}/libuplink.pc
+
+%files static
+%defattr(644,root,root,755)
+%{_libdir}/libuplink.a
diff --git a/storj-uplink-c-libdir.patch b/storj-uplink-c-libdir.patch
new file mode 100644
index 0000000..2d51c07
--- /dev/null
+++ b/storj-uplink-c-libdir.patch
@@ -0,0 +1,30 @@
+--- uplink-c-1.2.0/Makefile.orig	2020-12-04 17:39:34.000000000 +0100
++++ uplink-c-1.2.0/Makefile	2020-12-12 15:20:02.404070490 +0100
+@@ -2,7 +2,9 @@
+ 
+ SHELL ?= bash
+ 
+-DESTDIR ?= /usr/local
++DESTDIR ?=
++PREFIX ?= /usr/local
++LIBDIR ?= $(PREFIX)/lib
+ GPL2 ?= false
+ 
+ ifeq (${GPL2},true)
+@@ -62,10 +64,9 @@
+ .PHONY: install
+ install: build ## install library and headers
+ 	install -d \
+-		${DESTDIR}/include/uplink \
+-		${DESTDIR}/lib \
+-		${DESTDIR}/lib/pkgconfig
+-	install .build/libuplink.so ${DESTDIR}/lib
+-	install .build/libuplink.a ${DESTDIR}/lib
+-	install -m 644 .build/uplink/* ${DESTDIR}/include/uplink
+-	install -m 644 .build/libuplink.pc ${DESTDIR}/lib/pkgconfig
++		${DESTDIR}${PREFIX}/include/uplink \
++		${DESTDIR}${LIBDIR}/pkgconfig
++	install .build/libuplink.so ${DESTDIR}${LIBDIR}
++	install .build/libuplink.a ${DESTDIR}${LIBDIR}
++	install -m 644 .build/uplink/* ${DESTDIR}${PREFIX}/include/uplink
++	install -m 644 .build/libuplink.pc ${DESTDIR}${LIBDIR}/pkgconfig
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/storj-uplink-c.git/commitdiff/0f3e2d8d3591b6b5c228172c9861aec74b112432



More information about the pld-cvs-commit mailing list