From 0f3e2d8d3591b6b5c228172c9861aec74b112432 Mon Sep 17 00:00:00 2001 From: Jakub Bogusz Date: Sat, 12 Dec 2020 15:32:56 +0100 Subject: [PATCH] - new --- storj-uplink-c-libdir.patch | 30 ++++++++++++ storj-uplink-c.spec | 92 +++++++++++++++++++++++++++++++++++++ 2 files changed, 122 insertions(+) create mode 100644 storj-uplink-c-libdir.patch create mode 100644 storj-uplink-c.spec 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 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 <