2011-12-06 17:03:17 +01:00
|
|
|
#
|
|
|
|
# spec file for package libarchive
|
|
|
|
#
|
2024-05-06 19:12:38 +02:00
|
|
|
# Copyright (c) 2024 SUSE LLC
|
2011-12-06 17:03:17 +01:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2018-09-14 08:58:06 +02:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2011-12-06 17:03:17 +01:00
|
|
|
#
|
|
|
|
|
|
|
|
|
2019-01-04 09:14:08 +01:00
|
|
|
%define somajor 13
|
|
|
|
%define libname libarchive%{somajor}
|
2013-11-25 12:03:08 +01:00
|
|
|
%if 0%{?centos_version} || 0%{?rhel_version}
|
2015-09-20 09:33:41 +02:00
|
|
|
%if 0%{?centos_version} <= 600 || 0%{?rhel_version <= 700}
|
2013-11-25 12:03:08 +01:00
|
|
|
%bcond_without static_libs
|
|
|
|
%bcond_with openssl
|
|
|
|
%bcond_with ext2fs
|
|
|
|
%endif
|
|
|
|
%else
|
|
|
|
%bcond_with static_libs
|
|
|
|
%bcond_without openssl
|
|
|
|
%bcond_without ext2fs
|
|
|
|
%endif
|
2011-12-06 17:03:17 +01:00
|
|
|
Name: libarchive
|
2024-05-06 19:12:38 +02:00
|
|
|
Version: 3.7.4
|
2011-12-06 17:03:17 +01:00
|
|
|
Release: 0
|
2024-05-06 19:12:38 +02:00
|
|
|
Summary: Utility and C library to create and read several streaming archive formats
|
2012-08-09 17:12:33 +02:00
|
|
|
License: BSD-2-Clause
|
2011-12-06 17:03:17 +01:00
|
|
|
Group: Productivity/Archiving/Compression
|
2021-01-12 09:32:24 +01:00
|
|
|
URL: https://www.libarchive.org/
|
2022-04-11 08:54:47 +02:00
|
|
|
Source0: https://github.com/libarchive/libarchive/releases/download/v%{version}/libarchive-%{version}.tar.xz
|
|
|
|
Source1: https://github.com/libarchive/libarchive/releases/download/v%{version}/libarchive-%{version}.tar.xz.asc
|
2019-06-13 11:45:04 +02:00
|
|
|
Source2: libarchive.keyring
|
|
|
|
Source1000: baselibs.conf
|
2019-08-22 09:41:07 +02:00
|
|
|
Patch1: lib-suffix.patch
|
2019-12-31 09:23:29 +01:00
|
|
|
Patch2: fix-soversion.patch
|
2024-05-22 15:51:29 +02:00
|
|
|
# PATCH-FIX-SUSE danilo.spinella@suse.com
|
|
|
|
# bsdunzip test fails because of a locale issue, set locale properly to fix it
|
|
|
|
# It will be fixed in the next release
|
|
|
|
Patch3: fix-bsdunzip-test.patch
|
2020-02-19 11:15:38 +01:00
|
|
|
BuildRequires: cmake
|
2013-06-17 14:30:00 +02:00
|
|
|
BuildRequires: libacl-devel
|
|
|
|
BuildRequires: libbz2-devel
|
2019-06-20 15:43:11 +02:00
|
|
|
BuildRequires: liblz4-devel
|
2019-01-04 09:14:08 +01:00
|
|
|
BuildRequires: libtool
|
|
|
|
BuildRequires: libxml2-devel
|
2019-06-20 15:43:11 +02:00
|
|
|
BuildRequires: libzstd-devel
|
2020-02-19 11:15:38 +01:00
|
|
|
BuildRequires: ninja
|
2019-01-04 09:14:08 +01:00
|
|
|
BuildRequires: pkgconfig
|
|
|
|
BuildRequires: xz-devel
|
|
|
|
BuildRequires: zlib-devel
|
2013-11-25 12:03:08 +01:00
|
|
|
%if %{with ext2fs}
|
2013-06-17 14:30:00 +02:00
|
|
|
BuildRequires: libext2fs-devel
|
2013-11-25 12:03:08 +01:00
|
|
|
%endif
|
|
|
|
%if %{with openssl}
|
2013-06-17 14:30:00 +02:00
|
|
|
BuildRequires: libopenssl-devel
|
2013-11-25 12:03:08 +01:00
|
|
|
%endif
|
2012-02-14 12:38:59 +01:00
|
|
|
|
2011-12-06 17:03:17 +01:00
|
|
|
%description
|
|
|
|
Libarchive is a programming library that can create and read several
|
|
|
|
different streaming archive formats, including most popular tar
|
|
|
|
variants and several cpio formats. It can also write shar archives and
|
2018-09-18 09:41:19 +02:00
|
|
|
read ISO-9660 CDROM images. The bsdtar program is an implementation of
|
2011-12-06 17:03:17 +01:00
|
|
|
tar(1) that is built on top of libarchive. It started as a test
|
|
|
|
harness, but has grown and is now the standard system tar for FreeBSD 5
|
|
|
|
and 6.
|
|
|
|
|
|
|
|
This package contains the bsdtar cmdline utility.
|
|
|
|
|
|
|
|
%package -n bsdtar
|
2018-09-18 09:41:19 +02:00
|
|
|
Summary: Utility to read several different streaming archive formats
|
2011-12-06 17:03:17 +01:00
|
|
|
Group: Productivity/Archiving/Compression
|
2019-01-04 09:14:08 +01:00
|
|
|
Requires: %{libname} >= %{version}
|
2011-12-06 17:03:17 +01:00
|
|
|
|
|
|
|
%description -n bsdtar
|
|
|
|
This package contains the bsdtar cmdline utility.
|
|
|
|
|
2013-02-13 09:06:32 +01:00
|
|
|
%package -n %{libname}
|
2011-12-06 17:03:17 +01:00
|
|
|
Summary: Library to work with several different streaming archive formats
|
2018-09-18 09:41:19 +02:00
|
|
|
Group: System/Libraries
|
2011-12-06 17:03:17 +01:00
|
|
|
|
2013-02-13 09:06:32 +01:00
|
|
|
%description -n %{libname}
|
2011-12-06 17:03:17 +01:00
|
|
|
Libarchive is a programming library that can create and read several
|
|
|
|
different streaming archive formats, including most popular tar
|
|
|
|
variants and several cpio formats. It can also write shar archives and
|
2018-09-18 09:41:19 +02:00
|
|
|
read ISO-9660 CDROM images. The bsdtar program is an implementation of
|
2011-12-06 17:03:17 +01:00
|
|
|
tar(1) that is built on top of libarchive. It started as a test
|
|
|
|
harness, but has grown and is now the standard system tar for FreeBSD 5
|
|
|
|
and 6.
|
|
|
|
|
|
|
|
The libarchive library offers a number of features that make it both
|
|
|
|
very flexible and very powerful.
|
|
|
|
|
|
|
|
- Automatic format detection: libarchive can automatically determine
|
|
|
|
both the compression and the archive format, regardless of the
|
|
|
|
data source. Most tar implementations do not automatically detect
|
|
|
|
the compression format, few implementation that can correctly do
|
|
|
|
this when reading from stdin or a socket. (The tar program
|
|
|
|
included with Gunnar Ritter's heirloom collection also does full
|
|
|
|
automatic format detection.)
|
|
|
|
|
|
|
|
- Writes POSIX formats: libarchive writes POSIX-standard formats,
|
|
|
|
including "ustar," "pax interchange format," and the POSIX "cpio"
|
|
|
|
format.
|
|
|
|
|
|
|
|
- Supports pax interchange format: Pax interchange format (which,
|
|
|
|
despite the name, is really an extended tar format) eliminates
|
|
|
|
almost all limitations of historic tar formats and provides a
|
|
|
|
standard method for incorporating vendor-specific extensions.
|
|
|
|
libarchive exploits this extension mechanism to support ACLs and
|
|
|
|
file flags, for example. (Joerg Schilling's star archiver is
|
|
|
|
another open-source tar program that supports pax interchange
|
|
|
|
format.)
|
|
|
|
|
|
|
|
- Reads popular formats: libarchive can read GNU tar, ustar, pax
|
|
|
|
interchange format, cpio, and older tar variants. The internal
|
|
|
|
architecture is easily extensible. The only requirement for
|
|
|
|
support is that it be possible to read the format without seeking
|
|
|
|
in the file. (For example, a format that includes a compressed
|
|
|
|
size field before the data cannot be correctly written without
|
|
|
|
seeking.)
|
|
|
|
|
|
|
|
- High-Level API: the libarchive API makes it fairly simple to build
|
|
|
|
an archive from a list of filenames or to extract the entries
|
|
|
|
from an archive. However, the API also provides extreme
|
|
|
|
flexibility with regards to data sources. For example, there are
|
|
|
|
generic hooks that allow you to write an archive to a socket or
|
|
|
|
read data from an archive entry into a memory buffer.
|
|
|
|
|
|
|
|
- Extensible. The internal design uses generic interfaces for
|
|
|
|
compression, archive format detection and decoding, and archive data
|
|
|
|
I/O. It should be very easy to add new formats, new compression
|
|
|
|
methods, or new ways of reading/writing archives.
|
|
|
|
|
|
|
|
%package -n libarchive-devel
|
|
|
|
Summary: Development files for libarchive
|
|
|
|
Group: Development/Libraries/C and C++
|
2019-01-04 09:14:08 +01:00
|
|
|
Requires: %{libname} = %{version}
|
|
|
|
Requires: glibc-devel
|
2011-12-06 17:03:17 +01:00
|
|
|
|
|
|
|
%description -n libarchive-devel
|
|
|
|
Libarchive is a programming library that can create and read several
|
|
|
|
different streaming archive formats, including most popular tar
|
|
|
|
variants and several cpio formats. It can also write shar archives and
|
2018-09-18 09:41:19 +02:00
|
|
|
read ISO-9660 CDROM images. The bsdtar program is an implementation of
|
2011-12-06 17:03:17 +01:00
|
|
|
tar(1) that is built on top of libarchive. It started as a test
|
|
|
|
harness, but has grown and is now the standard system tar for FreeBSD 5
|
|
|
|
and 6.
|
|
|
|
|
|
|
|
This package contains the development files.
|
|
|
|
|
2013-12-10 17:54:57 +01:00
|
|
|
%package static-devel
|
2018-09-18 09:41:19 +02:00
|
|
|
Summary: Static library for libarchive
|
2013-11-25 12:03:08 +01:00
|
|
|
Group: Development/Libraries/C and C++
|
2019-01-04 09:14:08 +01:00
|
|
|
Requires: %{name}-devel = %{version}
|
2013-11-25 12:03:08 +01:00
|
|
|
|
2013-12-10 17:54:57 +01:00
|
|
|
%description static-devel
|
2018-09-18 09:41:19 +02:00
|
|
|
Static library for libarchive
|
2013-11-25 12:03:08 +01:00
|
|
|
|
2011-12-06 17:03:17 +01:00
|
|
|
%prep
|
2012-08-08 20:32:19 +02:00
|
|
|
%setup -q
|
2019-08-22 09:41:07 +02:00
|
|
|
%autopatch -p1
|
2015-03-05 15:27:10 +01:00
|
|
|
|
2011-12-06 17:03:17 +01:00
|
|
|
%build
|
2020-02-19 11:15:38 +01:00
|
|
|
%define __builder ninja
|
|
|
|
%cmake
|
|
|
|
%cmake_build
|
2011-12-06 17:03:17 +01:00
|
|
|
|
|
|
|
%check
|
2023-12-30 08:16:07 +01:00
|
|
|
exclude=""
|
|
|
|
%ifarch %arm %ix86 ppc s390
|
|
|
|
exclude="-E test_write_filter"
|
|
|
|
%endif
|
|
|
|
%ctest $exclude
|
2011-12-06 17:03:17 +01:00
|
|
|
|
|
|
|
%install
|
2020-02-19 11:15:38 +01:00
|
|
|
%cmake_install
|
2019-08-22 09:41:07 +02:00
|
|
|
|
2019-01-04 09:14:08 +01:00
|
|
|
find %{buildroot} -type f -name "*.la" -delete -print
|
2020-02-19 11:15:38 +01:00
|
|
|
rm "%{buildroot}%{_libdir}/libarchive.a"
|
2011-12-06 17:03:17 +01:00
|
|
|
rm "%{buildroot}%{_mandir}/man5/"{tar,cpio,mtree}.5*
|
2013-08-22 15:45:54 +02:00
|
|
|
sed -i -e '/Libs.private/d' %{buildroot}%{_libdir}/pkgconfig/libarchive.pc
|
2011-12-06 17:03:17 +01:00
|
|
|
|
2013-02-13 09:06:32 +01:00
|
|
|
%post -n %{libname} -p /sbin/ldconfig
|
|
|
|
%postun -n %{libname} -p /sbin/ldconfig
|
2011-12-06 17:03:17 +01:00
|
|
|
|
|
|
|
%files -n bsdtar
|
2016-05-09 11:08:59 +02:00
|
|
|
%{_bindir}/bsdcat
|
2011-12-06 17:03:17 +01:00
|
|
|
%{_bindir}/bsdcpio
|
2016-05-09 11:08:59 +02:00
|
|
|
%{_bindir}/bsdtar
|
2023-07-24 13:39:13 +02:00
|
|
|
%{_bindir}/bsdunzip
|
2011-12-06 17:03:17 +01:00
|
|
|
%{_mandir}/man1/*
|
|
|
|
%{_mandir}/man5/*
|
|
|
|
|
2013-02-13 09:06:32 +01:00
|
|
|
%files -n %{libname}
|
2019-01-04 09:14:08 +01:00
|
|
|
%license COPYING
|
|
|
|
%doc NEWS
|
2011-12-06 17:03:17 +01:00
|
|
|
%{_libdir}/libarchive.so.*
|
|
|
|
|
|
|
|
%files -n libarchive-devel
|
2012-08-08 20:32:19 +02:00
|
|
|
%doc examples/
|
2011-12-06 17:03:17 +01:00
|
|
|
%{_mandir}/man3/*
|
|
|
|
%{_libdir}/libarchive.so
|
|
|
|
%{_includedir}/archive*
|
|
|
|
%{_libdir}/pkgconfig/libarchive.pc
|
|
|
|
|
2013-11-25 12:03:08 +01:00
|
|
|
%if %{with static_libs}
|
2013-12-10 17:54:57 +01:00
|
|
|
%files static-devel
|
2013-11-25 12:03:08 +01:00
|
|
|
%{_libdir}/%{name}.a
|
|
|
|
%endif
|
|
|
|
|
2011-12-06 17:03:17 +01:00
|
|
|
%changelog
|