libarchive/libarchive.spec

168 lines
3.5 KiB
RPMSpec
Raw Normal View History

2020-01-09 11:53:31 +08:00
%bcond_with check
2019-09-30 10:54:48 -04:00
Name: libarchive
2020-01-09 11:53:31 +08:00
Version: 3.4.1
Release: 1
2019-09-30 10:54:48 -04:00
Summary: Multi-format archive and compression library
License: BSD
URL: https://www.%{name}.org/
Source0: https://www.%{name}.org/downloads/%{name}-%{version}.tar.gz
2019-11-06 19:36:55 +08:00
2019-09-30 10:54:48 -04:00
BuildRequires: gcc bison sharutils zlib-devel bzip2-devel xz-devel
BuildRequires: lzo-devel e2fsprogs-devel libacl-devel libattr-devel
BuildRequires: openssl-devel libxml2-devel lz4-devel automake libzstd-devel
Provides: bsdtar bsdcpio bsdcat
Obsoletes: bsdtar bsdcpio bsdcat
%description
%{name} is an open-source BSD-licensed C programming library that
provides streaming access to a variety of different archive formats,
including tar, cpio, pax, zip, and ISO9660 images. The distribution
also includes bsdtar and bsdcpio, full-featured implementations of
tar and cpio that use %{name}.
%package devel
Summary: Development files for %{name}
Requires: %{name} = %{version}-%{release}
%description devel
%{name}-devel contains the header files for developing
applications that want to make use of %{name}.
%package_help
%prep
%autosetup -n %{name}-%{version} -p1
%build
%configure --disable-rpath
%disable_rpath
%make_build
%install
%make_install
%delete_la
replace ()
{
filename=$1
file=`basename "$filename"`
binary=${file%%.*}
pattern=${binary##bsd}
awk "
/^.Dt ${pattern^^} 1/ {
print \".Dt ${binary^^} 1\";
next;
}
!stop && /^.Nm $pattern/ {
print \".Nm $binary\" ;
stop = 1 ;
next;
}
1;
" "$filename" > "$filename.new"
mv "$filename".new "$filename"
}
for manpage in bsdtar.1 bsdcpio.1
do
installed_manpage=`find "$RPM_BUILD_ROOT" -name "$manpage"`
replace "$installed_manpage"
done
%check
%if %{with check}
logfiles ()
{
find -name '*_test.log' -or -name test-suite.log
}
tempdirs ()
{
cat `logfiles` \
| awk "match(\$0, /[^[:space:]]*`date -I`[^[:space:]]*/) { print substr(\$0, RSTART, RLENGTH); }" \
| sort | uniq
}
cat_logs ()
{
for i in `logfiles`
do
echo "=== $i ==="
cat "$i"
done
}
run_testsuite ()
{
rc=0
LD_LIBRARY_PATH=`pwd`/.libs make %{?_smp_mflags} check -j1 || {
cat_logs
for i in `tempdirs`; do
if test -d "$i" ; then
find $i -printf "%p\n ~> a: %a\n ~> c: %c\n ~> t: %t\n ~> %s B\n"
cat $i/*.log
fi
done
return 1
}
cat_logs
}
run_testsuite
%endif
%ldconfig_scriptlets
%files
%defattr(-,root,root)
%{!?_licensedir:%global license %%doc}
%license COPYING
%{_libdir}/%{name}.so.13*
%{_bindir}/bsdtar
%{_bindir}/bsdcpio
%{_bindir}/bsdcat
%files devel
%defattr(-,root,root)
%{_includedir}/*.h
%{_libdir}/%{name}.so
%{_libdir}/pkgconfig/%{name}.pc
%{_libdir}/*.a
%files help
%defattr(-,root,root)
%doc NEWS README.md
%{_mandir}/man1/*
%{_mandir}/man3/*
%{_mandir}/man5/*
%changelog
2020-01-09 11:55:04 +08:00
* Wed Jan 8 2020 openEuler Buildteam <buildteam@openeuler.org> - 3.4.1-1
2020-01-09 11:53:31 +08:00
- Type:bugfix
- ID:NA
- SUG:NA
- DESC: update to 3.4.1
* Fri Jan 3 2020 openEuler Buildteam <buildteam@openeuler.org> - 3.4.0-3
2020-01-03 11:49:56 +08:00
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:bugfix about CVE-2019-19221.patch
2019-11-06 19:36:55 +08:00
* Wed Oct 9 2019 openEuler Buildteam <buildteam@openeuler.org> - 3.4.0-2
- Type:bugfix
- Id:NA
- SUG:NA
- DESC:delete the comment for patch0
2019-09-30 10:54:48 -04:00
* Mon Sep 16 2019 openEuler Buildteam <buildteam@openeuler.org> - 3.4.0-1
- Package init