121 lines
3.9 KiB
RPMSpec
121 lines
3.9 KiB
RPMSpec
#
|
|
# spec file for package libmspack
|
|
#
|
|
# Copyright (c) 2022-2023 ZhuningOS
|
|
#
|
|
|
|
|
|
# "alpha" in the version string just says that it is an alpha version.
|
|
%define _version %{version}alpha
|
|
Name: libmspack
|
|
Version: 0.6
|
|
Release: 3.14.1
|
|
Summary: Library That Implements Different Microsoft Compressions
|
|
License: LGPL-2.1
|
|
Group: Development/Libraries/C and C++
|
|
Url: http://www.cabextract.org.uk/libmspack/
|
|
Source: http://www.cabextract.org.uk/libmspack/%{name}-%{_version}.tar.gz
|
|
Source2: baselibs.conf
|
|
# PATCH-FIX-UPSTREAM libmspack-resize-buffer.patch https://github.com/kyz/libmspack/commit/40ef1b4093d77ad3a5cfcee1f5cb6108b3a3bcc2 -- CAB block input buffer is one byte too small.
|
|
Patch0: %{name}-resize-buffer.patch
|
|
# PATCH-FIX-UPSTREAM libmspack-fix-bounds-checking.patch https://github.com/kyz/libmspack/commit/72e70a921f0f07fee748aec2274b30784e1d312a -- Fix off-by-one bounds check.
|
|
Patch1: %{name}-fix-bounds-checking.patch
|
|
# PATCH-FIX-UPSTREAM libmspack-reject-blank-filenames.patch https://github.com/kyz/libmspack/commit/8759da8db6ec9e866cb8eb143313f397f925bb4f -- Avoid returning etries that are blank.
|
|
Patch2: %{name}-reject-blank-filenames.patch
|
|
Patch3: %{name}-failing-tests.patch
|
|
Patch4: libmspack-0.6alpha-CVE-2019-1010305.patch
|
|
Patch5: libmspack-CVE-2018-14679.patch
|
|
Patch6: libmspack-CVE-2018-14681.patch
|
|
Patch7: libmspack-CVE-2018-14682.patch
|
|
# PATCH-FIX-UPSTREAM cve-2018-18586.patch https://github.com/kyz/libmspack/commit/7cadd489698be117c47efcadd742651594429e6d
|
|
Patch8: cve-2018-18586.patch
|
|
BuildRequires: pkgconfig
|
|
|
|
%description
|
|
The purpose of libmspack is to provide both compression and
|
|
decompression of some loosely related file formats used by Microsoft.
|
|
Currently the most common formats are implemented.
|
|
|
|
%package -n libmspack0
|
|
Summary: Library That Implements Different Microsoft Compressions
|
|
# OpenSUSE <= 10.3, SLES <= 10:
|
|
Group: System/Libraries
|
|
Provides: libmspack = %{version}-%{release}
|
|
Obsoletes: libmspack < %{version}-%{release}
|
|
|
|
%description -n libmspack0
|
|
The purpose of libmspack is to provide both compression and
|
|
decompression of some loosely related file formats used by Microsoft.
|
|
Currently the most common formats are implemented.
|
|
|
|
%package devel
|
|
Summary: Static libraries, header files and documentation for libmspack
|
|
Group: Development/Libraries/C and C++
|
|
Requires: libmspack0 = %{version}
|
|
|
|
%description devel
|
|
The libmspack-devel package contains the header files and static
|
|
libraries necessary for developing programs using libmspack.
|
|
|
|
%package -n mspack-tools
|
|
Summary: Library That Implements Different Microsoft Compressions
|
|
Group: Productivity/File utilities
|
|
|
|
%description -n mspack-tools
|
|
The purpose of libmspack is to provide both compression and
|
|
decompression of some loosely related file formats used by Microsoft.
|
|
Currently the most common formats are implemented.
|
|
|
|
This subpacke provides useful programs that make use of libmspack.
|
|
* cabrip - Extracts any CAB files embedded in another file.
|
|
* chmextract - Extracts all files in a CHM file to disk.
|
|
* msexpand - Expands an SZDD or KWAJ file.
|
|
* oabextract - Extracts an Exchange Offline Address Book (.LZX) file.
|
|
|
|
|
|
%prep
|
|
%setup -q -n %{name}-%{_version}
|
|
%patch0 -p1
|
|
%patch1 -p1
|
|
%patch2 -p1
|
|
%patch3 -p1
|
|
%patch4 -p1
|
|
%patch5 -p1
|
|
%patch6 -p1
|
|
%patch7 -p1
|
|
%patch8 -p1
|
|
|
|
%build
|
|
%configure\
|
|
--disable-static
|
|
make %{?_smp_mflags}
|
|
|
|
%install
|
|
%make_install
|
|
rm %{buildroot}%{_libdir}/*.*a
|
|
|
|
%check
|
|
make %{?_smp_mflags} check
|
|
cd test
|
|
./cabd_test
|
|
cd ..
|
|
|
|
%post -n libmspack0 -p /sbin/ldconfig
|
|
%postun -n libmspack0 -p /sbin/ldconfig
|
|
|
|
%files -n mspack-tools
|
|
%{_bindir}/cabrip
|
|
%{_bindir}/chmextract
|
|
%{_bindir}/msexpand
|
|
%{_bindir}/oabextract
|
|
|
|
%files -n libmspack0
|
|
%doc AUTHORS COPYING.LIB ChangeLog README TODO
|
|
%{_libdir}/*.so.*
|
|
|
|
%files devel
|
|
%{_libdir}/*.so
|
|
%{_libdir}/pkgconfig/*.pc
|
|
%{_includedir}/*
|
|
|
|
%changelog
|