libtar/libtar.spec
2020-09-14 16:35:07 +08:00

80 lines
2.1 KiB
RPMSpec

Name: libtar
Version: 1.2.20
Release: 18
Summary: Library for manipulating tar files from within C programs.
License: BSD
URL: http://repo.or.cz/libtar.git
Source: http://repo.or.cz/libtar.git/snapshot/refs/tags/v1.2.20.tar.gz#/libtar-v1.2.20.tar.gz
Patch0: libtar-1.2.11-missing-protos.patch
Patch1: libtar-1.2.11-mem-deref.patch
Patch2: libtar-1.2.20-fix-resource-leaks.patch
Patch3: libtar-1.2.11-bz729009.patch
Patch4: libtar-1.2.20-no-static-buffer.patch
Patch5: CVE-2013-4420.patch
BuildRequires: libtool git gdb
%description
Libtar is a C library for manipulating POSIX tar files. It handles adding
and extracting files to/from a tar archive. Requires gcc, make, and zlib.
%package devel
Summary: Development files for %{name}
Requires: %{name} = %{version}-%{release}
%description devel
Libraries and header files of %{name} are all in the %{name}-devel package.
%package help
Summary: Help manual for %{name}
%description help
The %{name}-help package conatins man manual etc
%prep
%autosetup -n %{name}-v%{version} -p1 -Sgit
# set correct version for .so build
%global ltversion %(echo %{version} | tr '.' ':')
sed -i 's/-rpath $(libdir)/-rpath $(libdir) -version-number %{ltversion}/' \
lib/Makefile.in
autoreconf --force --install
%build
%configure --disable-static
%make_build
%install
%make_install
# Without this we get no debuginfo and stripping
chmod +x $RPM_BUILD_ROOT%{_libdir}/libtar.so.%{version}
rm $RPM_BUILD_ROOT%{_libdir}/*.la
%ldconfig_scriptlets
%files
%doc TODO README ChangeLog*
%license COPYRIGHT
%{_bindir}/%{name}
%{_libdir}/lib*.so.*
%files devel
%{_includedir}/libtar.h
%{_includedir}/libtar_listhash.h
%{_libdir}/lib*.so
%files help
%{_mandir}/man3/*.3*
%changelog
* Mon Sep 14 2020 shixuantong <shixuantong@huawei.com> - 1.2.20-18
- fix CVE-2013-4420
* Wed Dec 18 2019 openEuler Buildteam <buildteam@openeuler.org> - 1.2.20-17
- update license info
* Fri Oct 18 2019 openEuler Buildteam <buildteam@openeuler.org> - 1.2.20-16
- Package init