]> git.pld-linux.org Git - packages/libseccomp.git/blame - libseccomp.spec
fix build without static libs
[packages/libseccomp.git] / libseccomp.spec
CommitLineData
3fa3c5e8 1#
1b31ba42 2# Conditional build:
26590938
JB
3%bcond_without tests # "make check"
4%bcond_without static_libs # static library
9d204a35
JB
5%bcond_without python2 # CPython 2.x module
6%bcond_without python3 # CPython 3.x module
bc3b5c7e 7
26590938
JB
8%ifnarch %{x8664}
9# tests seem broken on x86 and x32
10%undefine with_tests
11%endif
98e97d35
JB
12Summary: Enhanced Seccomp (mode 2) Helper library
13Summary(pl.UTF-8): Rozszerzona biblioteka pomocnicza Seccomp (trybu 2)
14Name: libseccomp
d7cd0583 15Version: 2.4.3
f5680587 16Release: 1
98e97d35
JB
17License: LGPL v2.1
18Group: Libraries
ebbe4ccc 19#Source0Download: https://github.com/seccomp/libseccomp/releases
1b31ba42 20Source0: https://github.com/seccomp/libseccomp/releases/download/v%{version}/%{name}-%{version}.tar.gz
d7cd0583 21# Source0-md5: 1de97a3c04889a790d97722d08f4a8d1
1b31ba42 22URL: https://github.com/seccomp/libseccomp
dc9dafa9 23BuildRequires: pkgconfig
e4973dc4 24%if %{with python2}
9f228da8 25BuildRequires: python-Cython >= 0.16
26590938 26BuildRequires: python-devel
9f228da8 27%endif
e4973dc4 28%if %{with python3}
9d204a35
JB
29BuildRequires: python3-Cython >= 0.16
30BuildRequires: python3-devel
31%endif
32%if %{with python2} || %{with python3}
33BuildRequires: rpm-pythonprov
34BuildRequires: rpmbuild(macros) >= 1.714
e4973dc4 35%endif
98e97d35
JB
36BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37
38%description
39The libseccomp library provides and easy to use, platform independent,
40interface to the Linux Kernel's syscall filtering mechanism: seccomp.
41The libseccomp API is designed to abstract away the underlying BPF
42based syscall filter language and present a more conventional
43function-call based filtering interface that should be familiar to,
44and easily adopted by application developers.
45
46%description -l pl.UTF-8
47Biblioteka libseccomp udostępnia łatwy w użyciu, niezależny od
48platformy interfejs do mechanizmu filtrowania wywołań systemowych
bc3b5c7e
ER
49jądra Linuksa - seccomp. API libseccomp jest zaprojektowane tak, żeby
50wyabstrahować język filtrowania wywołań BPF niższego poziomu i
98e97d35
JB
51zaprezentować bardziej konwencjonalny interfejs filtrowania w oparciu
52o wywołania funkcji, który powinien być bardziej przyjazny i łatwiej
53adaptowalny dla programistów aplikacji.
54
55%package devel
56Summary: Header files for Seccomp library
57Summary(pl.UTF-8): Pliki nagłówkowe biblioteki Seccomp
58Group: Development/Libraries
59Requires: %{name} = %{version}-%{release}
60
61%description devel
62Header files for Seccomp library.
63
64%description devel -l pl.UTF-8
65Pliki nagłówkowe biblioteki Seccomp.
66
67%package static
68Summary: Static Seccomp library
69Summary(pl.UTF-8): Statyczna biblioteka Seccomp
70Group: Development/Libraries
71Requires: %{name}-devel = %{version}-%{release}
72
73%description static
74Static Seccomp library.
75
76%description static -l pl.UTF-8
77Statyczna biblioteka Seccomp.
78
26590938
JB
79%package -n python-seccomp
80Summary: Python binding for seccomp library
81Summary(pl.UTF-8): Wiązanie Pythona do biblioteki seccomp
82Group: Libraries/Python
83Requires: %{name} = %{version}-%{release}
84
85%description -n python-seccomp
86Python binding for seccomp library.
87
88%description -n python-seccomp -l pl.UTF-8
89Wiązanie Pythona do biblioteki seccomp.
90
e4973dc4 91%package -n python3-seccomp
9d204a35
JB
92Summary: Python 3 binding for seccomp library
93Summary(pl.UTF-8): Wiązanie Pythona 3 do biblioteki seccomp
94Group: Libraries/Python
95Requires: %{name} = %{version}-%{release}
e4973dc4
AM
96
97%description -n python3-seccomp
98Python 3 binding for seccomp library.
99
100%description -n python3-seccomp -l pl.UTF-8
101Wiązanie Pythona 3 do biblioteki seccomp.
102
98e97d35
JB
103%prep
104%setup -q
98e97d35
JB
105
106%build
1b31ba42
ER
107%configure \
108 --disable-silent-rules \
387648c9 109 --disable-python \
1b31ba42
ER
110 %{!?with_static_libs:--disable-static}
111%{__make}
98e97d35 112
e4973dc4
AM
113CPPFLAGS="-I$(pwd)/include"; export CPPFLAGS
114cd src/python
115VERSION_RELEASE="%{version}"; export VERSION_RELEASE
116%if %{with python2}
117%py_build
118#%{?with_tests:test}
119%endif
120
121%if %{with python3}
122%py3_build
123#%{?with_tests:test}
124%endif
125cd ../../
126
1b31ba42 127%{?with_tests:%{__make} check}
3fa3c5e8 128
98e97d35
JB
129%install
130rm -rf $RPM_BUILD_ROOT
98e97d35
JB
131%{__make} install \
132 DESTDIR=$RPM_BUILD_ROOT
133
1b31ba42
ER
134# obsoleted by pkg-config file
135%{__rm} $RPM_BUILD_ROOT%{_libdir}/libseccomp.la
98e97d35 136
e4973dc4
AM
137CPPFLAGS="-I$(pwd)/include"; export CPPFLAGS
138cd src/python
139VERSION_RELEASE="%{version}"; export VERSION_RELEASE
140%if %{with python2}
141%py_install
142
143%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
144%py_comp $RPM_BUILD_ROOT%{py_sitedir}
145
146%py_postclean
147%endif
148
149%if %{with python3}
150%py3_install
151%endif
152
98e97d35
JB
153%clean
154rm -rf $RPM_BUILD_ROOT
155
156%post -p /sbin/ldconfig
157%postun -p /sbin/ldconfig
158
159%files
160%defattr(644,root,root,755)
ebbe4ccc 161%doc CHANGELOG CREDITS README.md
d24f42eb 162%attr(755,root,root) %{_bindir}/scmp_sys_resolver
98e97d35 163%attr(755,root,root) %{_libdir}/libseccomp.so.*.*.*
c86f6298 164%attr(755,root,root) %ghost %{_libdir}/libseccomp.so.2
d24f42eb 165%{_mandir}/man1/scmp_sys_resolver.1*
98e97d35
JB
166
167%files devel
168%defattr(644,root,root,755)
169%attr(755,root,root) %{_libdir}/libseccomp.so
170%{_includedir}/seccomp.h
f5680587 171%{_includedir}/seccomp-syscalls.h
98e97d35
JB
172%{_pkgconfigdir}/libseccomp.pc
173%{_mandir}/man3/seccomp_*.3*
174
1b31ba42 175%if %{with static_libs}
98e97d35
JB
176%files static
177%defattr(644,root,root,755)
178%{_libdir}/libseccomp.a
1b31ba42 179%endif
26590938 180
e4973dc4 181%if %{with python2}
26590938
JB
182%files -n python-seccomp
183%defattr(644,root,root,755)
184%attr(755,root,root) %{py_sitedir}/seccomp.so
185%{py_sitedir}/seccomp-%{version}-py*.egg-info
186%endif
e4973dc4
AM
187
188%if %{with python3}
189%files -n python3-seccomp
190%defattr(644,root,root,755)
191%attr(755,root,root) %{py3_sitedir}/seccomp.*.so
192%{py3_sitedir}/seccomp-%{version}-py*.egg-info
193%endif
This page took 0.216759 seconds and 4 git commands to generate.