]> git.pld-linux.org Git - SPECS.git/blob - lib7zip.spec
SPECS updated Sat 31 Jul 20:26:02 CEST 2021
[SPECS.git] / lib7zip.spec
1 %define         p7zip_version   16.02
2 Summary:        A library using 7z.dll/7z.so (from 7-Zip) to handle different archive types
3 Summary(pl.UTF-8):      Biblioteka wykorzystująca 7z.dll/7z.so (z 7-zipa) do obsługi różnych rodzajów archiwów
4 Name:           lib7zip
5 Version:        3.0.0
6 Release:        1
7 License:        MPL v2.0
8 Group:          Libraries
9 #Source0Download: https://github.com/stonewell/lib7zip/releases
10 Source0:        https://github.com/stonewell/lib7zip/archive/%{version}/%{name}-%{version}.tar.gz
11 # Source0-md5:  2e7b0ec5f609f46f89e205a040a4aa5a
12 Source1:        http://downloads.sourceforge.net/p7zip/p7zip_%{p7zip_version}_src_all.tar.bz2
13 # Source1-md5:  a0128d661cfe7cc8c121e73519c54fbf
14 Patch0:         %{name}-install.patch
15 URL:            https://github.com/stonewell/lib7zip
16 BuildRequires:  cmake >= 2.8
17 # -std=c++14
18 BuildRequires:  libstdc++-devel >= 6:5.0
19 BuildRequires:  sed >= 4.0
20 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
21
22 %description
23 A library using 7z.dll/7z.so (from 7-Zip) to handle different archive
24 types.
25
26 %description -l pl.UTF-8
27 Biblioteka wykorzystująca 7z.dll/7z.so (z 7-zipa) do obsługi różnych
28 rodzajów archiwów.
29
30 %package devel
31 Summary:        Development files for lib7zip library
32 Summary(pl.UTF-8):      Pliki programistyczne biblioteki lib7zip
33 Group:          Development/Libraries
34 Requires:       %{name} = %{version}-%{release}
35 Requires:       libstdc++-devel >= 6:5.0
36
37 %description devel
38 Development files for lib7zip library.
39
40 %description devel -l pl.UTF-8
41 Pliki programistyczne biblioteki lib7zip.
42
43 %package static
44 Summary:        Static lib7zip library
45 Summary(pl.UTF-8):      Statyczna biblioteka lib7zip
46 Group:          Development/Libraries
47 Requires:       %{name}-devel = %{version}-%{release}
48
49 %description static
50 Static lib7zip library.
51
52 %description static -l pl.UTF-8
53 Statyczna biblioteka lib7zip.
54
55 %prep
56 %setup -q -a1
57 %patch0 -p1
58
59 %if "%{cc_version}" < "8"
60 # earlier versions don't know it
61 %{__sed} -i -e 's/ -Wno-class-memaccess//' CMakeLists.txt
62 %endif
63
64 %build
65 TOPDIR=$(pwd)
66 install -d build
67 cd build
68 CXXFLAGS="%{rpmcxxflags} -Wno-error=unused-result"
69 %cmake .. \
70         -DBUILD_SHARED_LIB=ON \
71         -DP7ZIP_SOURCE_DIR="${TOPDIR}/p7zip_%{p7zip_version}"
72 %{__make}
73
74 %install
75 rm -rf $RPM_BUILD_ROOT
76 install -d $RPM_BUILD_ROOT%{_includedir}
77
78 %{__make} -C build install \
79         DESTDIR=$RPM_BUILD_ROOT
80
81 cp -p src/lib7zip.h $RPM_BUILD_ROOT%{_includedir}
82
83 %clean
84 rm -rf $RPM_BUILD_ROOT
85
86 %post   -p /sbin/ldconfig
87 %postun -p /sbin/ldconfig
88
89 %files
90 %defattr(644,root,root,755)
91 %attr(755,root,root) %{_libdir}/lib7zip.so.*.*.*
92 %attr(755,root,root) %ghost %{_libdir}/lib7zip.so.0
93
94 %files devel
95 %defattr(644,root,root,755)
96 %attr(755,root,root) %{_libdir}/lib7zip.so
97 %{_includedir}/lib7zip.h
98
99 %files static
100 %defattr(644,root,root,755)
101 %{_libdir}/lib7zip.a
This page took 0.17835 seconds and 3 git commands to generate.