]>
Commit | Line | Data |
---|---|---|
077e9b87 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without apidocs # do not build and package API docs | |
7f316357 | 4 | |
077e9b87 JB |
5 | Summary: C library and tools for Amazon S3 access |
6 | Summary(pl.UTF-8): Biblioteka C i narzędzia do dostępu do Amazon S3 | |
7 | Name: libs3 | |
e1576b75 JB |
8 | Version: 4.1 |
9 | %define gitref 287e4bee6fd430ffb52604049de80a27a77ff6b4 | |
10 | %define snap 20190410 | |
11 | %define rel 1 | |
12 | Release: 0.%{snap}.%{rel} | |
13 | License: LGPL v3+ or GPL v2 with OpenSSL exception | |
077e9b87 | 14 | Group: Libraries |
e1576b75 JB |
15 | #Source0Download: https://github.com/bji/libs3/releases |
16 | Source0: https://github.com/bji/libs3/archive/%{gitref}/%{name}-%{snap}.tar.gz | |
17 | # Source0-md5: e5600266b8430bdf5dd8d44869857b32 | |
e3493c15 | 18 | Patch0: %{name}-make.patch |
8e086a84 | 19 | URL: https://github.com/bji/libs3 |
077e9b87 JB |
20 | BuildRequires: curl-devel |
21 | %{?with_apidocs:BuildRequires: doxygen} | |
e1576b75 | 22 | BuildRequires: libxml2-devel >= 2 |
077e9b87 JB |
23 | BuildRequires: openssl-devel |
24 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
25 | ||
26 | %description | |
27 | This package includes the libs3 shared library needed to run | |
7f316357 ER |
28 | applications using libs3 and additionally contains the s3 utility for |
29 | accessing Amazon S3. | |
077e9b87 JB |
30 | |
31 | %description -l pl.UTF-8 | |
32 | Ten pakiet zawiera bibliotekę współdzieloną libs3 niezbędną do | |
7f316357 ER |
33 | uruchamiania aplikacji wykorzystujących libs3 oraz dodatkowo narzędzie |
34 | s3 pozwalające na dostęp do Amazon S3. | |
077e9b87 JB |
35 | |
36 | %package devel | |
37 | Summary: Header files for libs3 library | |
38 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libs3 | |
39 | Group: Development/Libraries | |
40 | Requires: %{name} = %{version}-%{release} | |
41 | Requires: curl-devel | |
e1576b75 | 42 | Requires: libxml2-devel >= 2 |
077e9b87 JB |
43 | Requires: openssl-devel |
44 | ||
45 | %description devel | |
46 | Header files for libs3 library. | |
47 | ||
48 | %description devel -l pl.UTF-8 | |
49 | Pliki nagłówkowe biblioteki libs3. | |
50 | ||
51 | %package static | |
52 | Summary: Static libs3 library | |
53 | Summary(pl.UTF-8): Statyczna biblioteka libs3 | |
54 | Group: Development/Libraries | |
55 | Requires: %{name}-devel = %{version}-%{release} | |
56 | ||
57 | %description static | |
58 | Static libs3 library. | |
59 | ||
60 | %description static -l pl.UTF-8 | |
61 | Statyczna biblioteka libs3. | |
62 | ||
63 | %package apidocs | |
64 | Summary: libs3 API documentation | |
65 | Summary(pl.UTF-8): Dokumentacja API biblioteki libs3 | |
66 | Group: Documentation | |
e1576b75 | 67 | %if "%{_rpmversion}" >= "4.6" |
7f316357 ER |
68 | BuildArch: noarch |
69 | %endif | |
077e9b87 JB |
70 | |
71 | %description apidocs | |
72 | API and internal documentation for libs3 library. | |
73 | ||
74 | %description apidocs -l pl.UTF-8 | |
75 | Dokumentacja API biblioteki libs3. | |
76 | ||
77 | %prep | |
e1576b75 | 78 | %setup -q -n %{name}-%{gitref} |
e3493c15 | 79 | %patch0 -p1 |
077e9b87 JB |
80 | |
81 | %build | |
e3493c15 | 82 | CFLAGS="%{rpmcflags} %{rpmcppflags}" \ |
077e9b87 | 83 | %{__make} exported \ |
e3493c15 JB |
84 | CC="%{__cc}" \ |
85 | LDOPTS="%{rpmldflags}" \ | |
077e9b87 JB |
86 | VERBOSE=1 |
87 | ||
88 | %{?with_apidocs:doxygen} | |
89 | ||
90 | %install | |
91 | rm -rf $RPM_BUILD_ROOT | |
92 | ||
93 | %{__make} install \ | |
e1576b75 JB |
94 | DESTDIR=$RPM_BUILD_ROOT%{_prefix} \ |
95 | LIBDIR=$RPM_BUILD_ROOT%{_libdir} | |
077e9b87 | 96 | |
e3493c15 JB |
97 | # let rpm generate dependencies |
98 | chmod 755 $RPM_BUILD_ROOT%{_libdir}/libs3.so* | |
99 | ||
077e9b87 JB |
100 | %clean |
101 | rm -rf $RPM_BUILD_ROOT | |
102 | ||
103 | %post -p /sbin/ldconfig | |
104 | %postun -p /sbin/ldconfig | |
105 | ||
106 | %files | |
107 | %defattr(644,root,root,755) | |
108 | %doc ChangeLog LICENSE README TODO | |
109 | %attr(755,root,root) %{_bindir}/s3 | |
110 | %attr(755,root,root) %{_libdir}/libs3.so.*.* | |
e1576b75 | 111 | %attr(755,root,root) %ghost %{_libdir}/libs3.so.4 |
077e9b87 JB |
112 | |
113 | %files devel | |
114 | %defattr(644,root,root,755) | |
115 | %attr(755,root,root) %{_libdir}/libs3.so | |
116 | %{_includedir}/libs3.h | |
117 | ||
118 | %files static | |
119 | %defattr(644,root,root,755) | |
120 | %{_libdir}/libs3.a | |
121 | ||
122 | %if %{with apidocs} | |
123 | %files apidocs | |
124 | %defattr(644,root,root,755) | |
e1576b75 | 125 | %doc dox/html/*.{css,html,js,png} |
077e9b87 | 126 | %endif |