]>
Commit | Line | Data |
---|---|---|
b74af457 | 1 | # |
2 | # Conditional build: | |
3 | %bcond_without static_libs # don't build static libraries | |
892cabbc ER |
4 | |
5 | Summary: Multi-format archive and compression library | |
da147f22 | 6 | Summary(pl.UTF-8): Biblioteka do archiwizacji i kompresji w wielu formatach |
ac600a23 | 7 | Name: libarchive |
00e5cded | 8 | Version: 3.4.2 |
b28cb0a8 | 9 | Release: 1 |
ac600a23 AG |
10 | License: BSD |
11 | Group: Libraries | |
00e5cded JB |
12 | Source0: http://www.libarchive.org/downloads/%{name}-%{version}.tar.xz |
13 | # Source0-md5: 50abb48fe21135ff3b18679d07d8093e | |
417d5b05 | 14 | Patch0: %{name}-man_progname.patch |
ef8c2e9a | 15 | URL: http://www.libarchive.org/ |
e8285c16 JB |
16 | BuildRequires: acl-devel |
17 | BuildRequires: attr-devel | |
ac600a23 | 18 | BuildRequires: bzip2-devel |
e8285c16 | 19 | # for <ext2fs/ext2_fs.h> |
1f60048e | 20 | BuildRequires: e2fsprogs-devel |
b28cb0a8 | 21 | BuildRequires: libb2-devel |
d9046622 JB |
22 | BuildRequires: libxml2-devel >= 2 |
23 | BuildRequires: lz4-devel >= r131 | |
92d2b5ad | 24 | BuildRequires: lzo-devel >= 2 |
12667120 | 25 | BuildRequires: nettle-devel |
d9046622 | 26 | BuildRequires: pkgconfig |
3c25a433 | 27 | BuildRequires: richacl-devel |
00e5cded JB |
28 | BuildRequires: tar >= 1:1.22 |
29 | BuildRequires: xz | |
b28cb0a8 | 30 | BuildRequires: xz-devel >= 1:5.2 |
ac600a23 | 31 | BuildRequires: zlib-devel |
b28cb0a8 | 32 | BuildRequires: zstd-devel |
d9046622 | 33 | Requires: lz4-libs >= r131 |
b28cb0a8 | 34 | Requires: xz-libs >= 1:5.2 |
ac600a23 AG |
35 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
36 | ||
37 | %description | |
38 | Libarchive is a programming library that can create and read several | |
39 | different streaming archive formats, including most popular TAR | |
892cabbc ER |
40 | variants, several CPIO formats, and both BSD and GNU ar variants. It |
41 | can also write SHAR archives and read ISO9660 CDROM images and ZIP | |
42 | archives. | |
43 | ||
44 | See README for complete format support. | |
ac600a23 | 45 | |
36ad161a | 46 | %description -l pl.UTF-8 |
da147f22 JB |
47 | Libarchive to biblioteka potrafiąca tworzyć i odczytywać kilka różnych |
48 | formatów archiwów strumieniowych, w tym najbardziej popularne warianty | |
49 | archiwów TAR, kilka formatów CPIO oraz warianty BSD oraz GNU archiwów | |
50 | ar. Potrafi także zapisywać archiwa SHAR oraz odczytywać obrazy CDROM | |
51 | ISO9660 i archiwa ZIP. | |
52 | ||
53 | Pełny wykaz obsługiwanych formatów znajduje się w pliku README. | |
ac600a23 AG |
54 | |
55 | %package devel | |
56 | Summary: Header files for libarchive library | |
34f03146 | 57 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libarchive |
ac600a23 AG |
58 | Group: Development/Libraries |
59 | Requires: %{name} = %{version}-%{release} | |
e8285c16 JB |
60 | Requires: acl-devel |
61 | Requires: attr-devel | |
62 | Requires: bzip2-devel | |
b28cb0a8 | 63 | Requires: libb2-devel |
92831ec2 | 64 | Requires: libxml2-devel |
d9046622 | 65 | Requires: lz4-devel >= r131 |
12667120 | 66 | Requires: nettle-devel |
b28cb0a8 JB |
67 | Requires: richacl-devel |
68 | Requires: xz-devel >= 1:5.2 | |
e8285c16 | 69 | Requires: zlib-devel |
b28cb0a8 | 70 | Requires: zstd-devel |
ac600a23 AG |
71 | |
72 | %description devel | |
73 | Header files for libarchive library. | |
74 | ||
36ad161a JR |
75 | %description devel -l pl.UTF-8 |
76 | Pliki nagłówkowe biblioteki libarchive. | |
ac600a23 AG |
77 | |
78 | %package static | |
79 | Summary: Static libarchive library | |
34f03146 | 80 | Summary(pl.UTF-8): Statyczna biblioteka libarchive |
ac600a23 AG |
81 | Group: Development/Libraries |
82 | Requires: %{name}-devel = %{version}-%{release} | |
83 | ||
84 | %description static | |
85 | Static libarchive library. | |
86 | ||
36ad161a | 87 | %description static -l pl.UTF-8 |
ac600a23 AG |
88 | Statyczna biblioteka libarchive. |
89 | ||
d9046622 JB |
90 | %package -n bsdcat |
91 | Summary: bsdcat - cat(1) implementation based on libarchive | |
92 | Summary(pl.UTF-8): bsdcat - implementacja programu cat(1) oparta na libarchive | |
93 | Group: Applications/Archiving | |
94 | Requires: %{name} = %{version}-%{release} | |
95 | ||
96 | %description -n bsdcat | |
97 | bsdcat - cat(1) implementation based on libarchive. | |
98 | ||
99 | %description -n bsdcat -l pl.UTF-8 | |
100 | bsdcat - implementacja programu cat(1), oparta na libarchive. | |
101 | ||
92831ec2 MB |
102 | %package -n bsdcpio |
103 | Summary: bsdcpio - cpio(1) implementation based on libarchive | |
104 | Summary(pl.UTF-8): bsdcpio - implementacja programu cpio(1) oparta na libarchive | |
105 | Group: Applications/Archiving | |
106 | Requires: %{name} = %{version}-%{release} | |
107 | ||
108 | %description -n bsdcpio | |
109 | bsdcpio - cpio(1) implementation based on libarchive. | |
110 | ||
111 | %description -n bsdcpio -l pl.UTF-8 | |
112 | bsdcpio - implementacja programu cpio(1), oparta na libarchive. | |
113 | ||
1f60048e | 114 | %package -n bsdtar |
115 | Summary: bsdtar - tar(1) implementation based on libarchive | |
34f03146 | 116 | Summary(pl.UTF-8): bsdtar - implementacja programu tar(1) oparta na libarchive |
1f60048e | 117 | Group: Applications/Archiving |
118 | Requires: %{name} = %{version}-%{release} | |
119 | ||
120 | %description -n bsdtar | |
121 | bsdtar - tar(1) implementation based on libarchive. | |
122 | ||
36ad161a | 123 | %description -n bsdtar -l pl.UTF-8 |
1f60048e | 124 | bsdtar - implementacja programu tar(1), oparta na libarchive. |
125 | ||
ac600a23 AG |
126 | %prep |
127 | %setup -q | |
1f60048e | 128 | %patch0 -p1 |
ac600a23 AG |
129 | |
130 | %build | |
e377f8a5 | 131 | CPPFLAGS="%{rpmcppflags} -I/usr/include/lz4" |
7458d87c | 132 | # disable openssl, nettle has all necessary functionality |
b74af457 | 133 | %configure \ |
92d2b5ad | 134 | --disable-silent-rules \ |
d9046622 | 135 | --enable-bsdcat=shared \ |
12667120 JB |
136 | --enable-bsdcpio=shared \ |
137 | --enable-bsdtar=shared \ | |
7458d87c JB |
138 | --enable-static%{!?with_static_libs:=no} \ |
139 | --with-lzo2 \ | |
140 | --without-openssl | |
8e860f08 | 141 | %{__make} -j1 |
ac600a23 AG |
142 | |
143 | %install | |
144 | rm -rf $RPM_BUILD_ROOT | |
145 | %{__make} install \ | |
146 | DESTDIR=$RPM_BUILD_ROOT | |
147 | ||
7458d87c JB |
148 | # obsoleted by pkg-config |
149 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libarchive.la | |
150 | ||
ca4812a2 JB |
151 | %clean |
152 | rm -rf $RPM_BUILD_ROOT | |
153 | ||
ac600a23 AG |
154 | %post -p /sbin/ldconfig |
155 | %postun -p /sbin/ldconfig | |
156 | ||
157 | %files | |
158 | %defattr(644,root,root,755) | |
e377f8a5 | 159 | %doc NEWS COPYING |
ac600a23 | 160 | %attr(755,root,root) %{_libdir}/libarchive.so.*.*.* |
92d2b5ad | 161 | %attr(755,root,root) %ghost %{_libdir}/libarchive.so.13 |
ac600a23 AG |
162 | |
163 | %files devel | |
164 | %defattr(644,root,root,755) | |
165 | %attr(755,root,root) %{_libdir}/libarchive.so | |
c2f290c1 JB |
166 | %{_includedir}/archive*.h |
167 | %{_mandir}/man3/archive_*.3* | |
168 | %{_mandir}/man3/libarchive.3* | |
92d2b5ad | 169 | %{_mandir}/man3/libarchive_changes.3* |
c2f290c1 JB |
170 | %{_mandir}/man3/libarchive_internals.3* |
171 | %{_mandir}/man5/libarchive-formats.5* | |
172 | %{_mandir}/man5/cpio.5* | |
173 | %{_mandir}/man5/mtree.5* | |
174 | %{_mandir}/man5/tar.5* | |
92831ec2 | 175 | %{_pkgconfigdir}/libarchive.pc |
ac600a23 | 176 | |
b74af457 | 177 | %if %{with static_libs} |
ac600a23 AG |
178 | %files static |
179 | %defattr(644,root,root,755) | |
180 | %{_libdir}/libarchive.a | |
b74af457 | 181 | %endif |
1f60048e | 182 | |
d9046622 JB |
183 | %files -n bsdcat |
184 | %defattr(644,root,root,755) | |
185 | %attr(755,root,root) %{_bindir}/bsdcat | |
186 | %{_mandir}/man1/bsdcat.1* | |
187 | ||
92831ec2 MB |
188 | %files -n bsdcpio |
189 | %defattr(644,root,root,755) | |
190 | %attr(755,root,root) %{_bindir}/bsdcpio | |
191 | %{_mandir}/man1/bsdcpio.1* | |
192 | ||
1f60048e | 193 | %files -n bsdtar |
194 | %defattr(644,root,root,755) | |
195 | %attr(755,root,root) %{_bindir}/bsdtar | |
196 | %{_mandir}/man1/bsdtar.1* |