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