3 %bcond_with gpl2 # GPL v2 compatible package (drop Apache v2 licensed components)
5 Summary: C library for Storj V3 Network
6 Summary(pl.UTF-8): Biblioteka C do sieci Storj V3
10 License: MIT, other (used go components)
12 #Source0Download: https://github.com/storj/uplink-c/releases
13 Source0: https://github.com/storj/uplink-c/archive/v%{version}/uplink-c-%{version}.tar.gz
14 # Source0-md5: fd3b321db1b48839f58ca8da896f17b1
15 Patch0: %{name}-libdir.patch
16 URL: https://github.com/storj/uplink-c
17 BuildRequires: golang >= 1.13
18 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
21 C library for Storj V3 Network.
23 %description -l pl.UTF-8
24 Biblioteka C do sieci Storj V3.
27 Summary: Header files for Storj uplink library
28 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki Storj uplink
29 Group: Development/Libraries
30 Requires: %{name} = %{version}-%{release}
33 Header files for Storj uplink library.
35 %description devel -l pl.UTF-8
36 Pliki nagłówkowe biblioteki Storj uplink.
39 Summary: Static Storj uplink library
40 Summary(pl.UTF-8): Statyczna biblioteka Storj uplink
41 Group: Development/Libraries
42 Requires: %{name}-devel = %{version}-%{release}
45 Static Storj uplink library.
47 %description static -l pl.UTF-8
48 Statyczna biblioteka Storj uplink.
51 %setup -q -n uplink-c-%{version}
54 cat > scripts/version <<EOF
59 sed -i -e 's,^prefix=.*,prefix=%{_prefix},' \
60 -e 's,^libdir=.*,libdir=%{_libdir},' scripts/gen-pkg-config
64 %{?with_gpl2:GPL2=true}
67 rm -rf $RPM_BUILD_ROOT
70 DESTDIR=$RPM_BUILD_ROOT \
75 rm -rf $RPM_BUILD_ROOT
77 %post -p /sbin/ldconfig
78 %postun -p /sbin/ldconfig
81 %defattr(644,root,root,755)
82 %doc LICENSE README.md
83 %attr(755,root,root) %{_libdir}/libuplink.so
86 %defattr(644,root,root,755)
88 %{_pkgconfigdir}/libuplink.pc
91 %defattr(644,root,root,755)
92 %{_libdir}/libuplink.a