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