]> git.pld-linux.org Git - packages/libseccomp.git/blob - libseccomp.spec
4f35986e562bc76a0afcfebe6760d2f2b6039377
[packages/libseccomp.git] / libseccomp.spec
1 #
2 # Conditional build:
3 %bcond_without  tests           # "make check"
4 %bcond_without  static_libs     # static library
5 %bcond_without  python          # Python bindings
6
7 %ifnarch %{x8664}
8 # tests seem broken on x86 and x32
9 %undefine       with_tests
10 %endif
11 Summary:        Enhanced Seccomp (mode 2) Helper library
12 Summary(pl.UTF-8):      Rozszerzona biblioteka pomocnicza Seccomp (trybu 2)
13 Name:           libseccomp
14 Version:        2.3.1
15 Release:        1
16 License:        LGPL v2.1
17 Group:          Libraries
18 Source0:        https://github.com/seccomp/libseccomp/releases/download/v%{version}/%{name}-%{version}.tar.gz
19 # Source0-md5:  e6f3e84921ef9c2e9188681963f0943f
20 URL:            https://github.com/seccomp/libseccomp
21 BuildRequires:  pkgconfig
22 %if %{with python}
23 BuildRequires:  python-Cython >= 0.16
24 BuildRequires:  python-devel
25 BuildRequires:  rpm-pythonprov
26 %endif
27 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29 %description
30 The libseccomp library provides and easy to use, platform independent,
31 interface to the Linux Kernel's syscall filtering mechanism: seccomp.
32 The libseccomp API is designed to abstract away the underlying BPF
33 based syscall filter language and present a more conventional
34 function-call based filtering interface that should be familiar to,
35 and easily adopted by application developers.
36
37 %description -l pl.UTF-8
38 Biblioteka libseccomp udostępnia łatwy w użyciu, niezależny od
39 platformy interfejs do mechanizmu filtrowania wywołań systemowych
40 jądra Linuksa - seccomp. API libseccomp jest zaprojektowane tak, żeby
41 wyabstrahować język filtrowania wywołań BPF niższego poziomu i
42 zaprezentować bardziej konwencjonalny interfejs filtrowania w oparciu
43 o wywołania funkcji, który powinien być bardziej przyjazny i łatwiej
44 adaptowalny dla programistów aplikacji.
45
46 %package devel
47 Summary:        Header files for Seccomp library
48 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki Seccomp
49 Group:          Development/Libraries
50 Requires:       %{name} = %{version}-%{release}
51
52 %description devel
53 Header files for Seccomp library.
54
55 %description devel -l pl.UTF-8
56 Pliki nagłówkowe biblioteki Seccomp.
57
58 %package static
59 Summary:        Static Seccomp library
60 Summary(pl.UTF-8):      Statyczna biblioteka Seccomp
61 Group:          Development/Libraries
62 Requires:       %{name}-devel = %{version}-%{release}
63
64 %description static
65 Static Seccomp library.
66
67 %description static -l pl.UTF-8
68 Statyczna biblioteka Seccomp.
69
70 %package -n python-seccomp
71 Summary:        Python binding for seccomp library
72 Summary(pl.UTF-8):      Wiązanie Pythona do biblioteki seccomp
73 Group:          Libraries/Python
74 Requires:       %{name} = %{version}-%{release}
75
76 %description -n python-seccomp
77 Python binding for seccomp library.
78
79 %description -n python-seccomp -l pl.UTF-8
80 Wiązanie Pythona do biblioteki seccomp.
81
82 %prep
83 %setup -q
84
85 %build
86 %configure \
87         --disable-silent-rules \
88         %{?with_python:--enable-python} \
89         %{!?with_static_libs:--disable-static}
90 %{__make}
91
92 %{?with_tests:%{__make} check}
93
94 %install
95 rm -rf $RPM_BUILD_ROOT
96 %{__make} install \
97         DESTDIR=$RPM_BUILD_ROOT
98
99 # obsoleted by pkg-config file
100 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libseccomp.la
101
102 %clean
103 rm -rf $RPM_BUILD_ROOT
104
105 %post   -p /sbin/ldconfig
106 %postun -p /sbin/ldconfig
107
108 %files
109 %defattr(644,root,root,755)
110 %doc CHANGELOG CREDITS README
111 %attr(755,root,root) %{_bindir}/scmp_sys_resolver
112 %attr(755,root,root) %{_libdir}/libseccomp.so.*.*.*
113 %attr(755,root,root) %ghost %{_libdir}/libseccomp.so.2
114 %{_mandir}/man1/scmp_sys_resolver.1*
115
116 %files devel
117 %defattr(644,root,root,755)
118 %attr(755,root,root) %{_libdir}/libseccomp.so
119 %{_includedir}/seccomp.h
120 %{_pkgconfigdir}/libseccomp.pc
121 %{_mandir}/man3/seccomp_*.3*
122
123 %if %{with static_libs}
124 %files static
125 %defattr(644,root,root,755)
126 %{_libdir}/libseccomp.a
127 %endif
128
129 %if %{with python}
130 %files -n python-seccomp
131 %defattr(644,root,root,755)
132 %attr(755,root,root) %{py_sitedir}/seccomp.so
133 %{py_sitedir}/seccomp-%{version}-py*.egg-info
134 %endif
This page took 0.085727 seconds and 2 git commands to generate.