]>
Commit | Line | Data |
---|---|---|
c3d3c63e JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_with golang # Go components (nothing useful yet?) | |
4 | ||
5 | %ifnarch %{ix86} %{x8664} %{arm} aarch64 mips64 mips64le ppc64le | |
6 | %undefine with_golang | |
7 | %endif | |
a3727a03 | 8 | Summary: POSIX.1e capability suite |
3f4fdf19 ER |
9 | Summary(pl.UTF-8): Wsparcie dla standardu "capability" POSIX.1e |
10 | Summary(pt_BR.UTF-8): Biblioteca para leitura e configuração de capabilities. | |
a3727a03 | 11 | Name: libcap |
a097656b | 12 | Version: 2.58 |
7976b695 | 13 | Release: 1 |
6e8ae881 | 14 | Epoch: 1 |
1c51a973 | 15 | License: GPL v2 or BSD |
a9084d12 | 16 | Group: Applications/System |
1c51a973 | 17 | Source0: https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/%{name}-%{version}.tar.xz |
a097656b | 18 | # Source0-md5: 09b7b62c7b69f9a58098efa7b1d34f64 |
1c51a973 | 19 | URL: https://sites.google.com/site/fullycapable/ |
f0b7cfcf | 20 | BuildRequires: attr-devel |
c3d3c63e | 21 | %{?with_golang:BuildRequires: golang} |
f0b7cfcf | 22 | BuildRequires: pam-devel |
035965b0 | 23 | BuildRequires: perl-base |
1c51a973 JB |
24 | BuildRequires: tar >= 1:1.22 |
25 | BuildRequires: xz | |
1ef7e04d | 26 | Requires: %{name}-libs = %{epoch}:%{version}-%{release} |
cb671697 | 27 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
a3727a03 | 28 | |
33195603 | 29 | %define _sbindir /sbin |
30 | ||
a3727a03 | 31 | %description |
32 | The POSIX.1e capability library for Linux. This package contains the | |
33 | getcap and setcap binaries and manual pages. | |
34 | ||
7452e339 JR |
35 | %description -l pl.UTF-8 |
36 | Biblioteka, programy oraz strony manuala zawierające implementację | |
a9084d12 | 37 | "capability" standardu POSIX.1e. |
a3727a03 | 38 | |
7452e339 JR |
39 | %description -l pt_BR.UTF-8 |
40 | Biblioteca para leitura e configuração de capabilities. | |
dcee9371 | 41 | |
1ef7e04d | 42 | %package libs |
e2291714 JB |
43 | Summary: libcap library |
44 | Summary(pl.UTF-8): Biblioteka libcap | |
1ef7e04d | 45 | Group: Libraries |
e2291714 | 46 | Conflicts: libcap < 1:2.16-2 |
1ef7e04d ER |
47 | |
48 | %description libs | |
e2291714 | 49 | libcap library. |
1ef7e04d ER |
50 | |
51 | %description libs -l pl.UTF-8 | |
e2291714 | 52 | Biblioteka libcap. |
1ef7e04d | 53 | |
010b4d11 | 54 | %package devel |
d0911549 | 55 | Summary: Header files and development documentation for libcap |
3f4fdf19 ER |
56 | Summary(pl.UTF-8): Pliki nagłówkowe i dokumentacja do libcap |
57 | Summary(pt_BR.UTF-8): Arquivos de desenvolvimento para capabilities | |
a3727a03 | 58 | Group: Development/Libraries |
1ef7e04d | 59 | Requires: %{name}-libs = %{epoch}:%{version}-%{release} |
a3727a03 | 60 | |
61 | %description devel | |
d0911549 | 62 | Header files and development documentation for libcap. |
a3727a03 | 63 | |
7452e339 JR |
64 | %description devel -l pl.UTF-8 |
65 | Pliki nagłówkowe i dokumentacja do libcap. | |
a3727a03 | 66 | |
7452e339 | 67 | %description devel -l pt_BR.UTF-8 |
72c51273 | 68 | Arquivos de desenvolvimento para capabilities. |
dcee9371 | 69 | |
73e0abb9 JB |
70 | %package static |
71 | Summary: Static libcap library | |
72 | Summary(pl.UTF-8): Statyczna biblioteka libcap | |
73 | Group: Development/Libraries | |
74 | Requires: %{name}-devel = %{epoch}:%{version}-%{release} | |
75 | ||
76 | %description static | |
77 | Static libcap library. | |
78 | ||
79 | %description static -l pl.UTF-8 | |
80 | Statyczna biblioteka libcap. | |
81 | ||
82 | %package -n pam-pam_cap | |
83 | Summary: Capability module for PAM | |
84 | Summary(pl.UTF-8): Moduł PAM capability | |
85 | Group: Libraries | |
e2291714 | 86 | Requires: %{name}-libs = %{epoch}:%{version}-%{release} |
73e0abb9 JB |
87 | Requires: pam |
88 | ||
89 | %description -n pam-pam_cap | |
90 | PAM capability module enforces inheritable capability sets. | |
91 | ||
92 | %description -n pam-pam_cap -l pl.UTF-8 | |
93 | Moduł PAM capability wymuszający dziedziczone zbiory uprawnień. | |
94 | ||
a3727a03 | 95 | %prep |
96 | %setup -q | |
97 | ||
98 | %build | |
3720f29b | 99 | LDFLAGS="%{rpmldflags}" \ |
c3d3c63e | 100 | %{__make} -j1 \ |
6e8ae881 | 101 | CC="%{__cc}" \ |
81f95034 JB |
102 | COPTS="%{rpmcflags} %{rpmcppflags}" \ |
103 | BUILD_CC="%{__cc}" \ | |
104 | BUILD_COPTS="%{rpmcflags} %{rpmcppflags}" \ | |
73e0abb9 | 105 | DEBUG= \ |
3720f29b | 106 | %{!?with_golang:GOLANG=0} |
a3727a03 | 107 | |
108 | %install | |
109 | rm -rf $RPM_BUILD_ROOT | |
81305d82 | 110 | |
c3d3c63e | 111 | %{__make} -j1 install \ |
010b4d11 | 112 | FAKEROOT=$RPM_BUILD_ROOT \ |
c3d3c63e | 113 | %{!?with_golang:GOLANG=0} \ |
332ab836 | 114 | PKGCONFIGDIR=%{_pkgconfigdir} \ |
c3d3c63e | 115 | RAISE_SETFCAP=no \ |
73e0abb9 JB |
116 | lib=%{_lib} |
117 | ||
118 | install -d $RPM_BUILD_ROOT/%{_lib}/security | |
980032c1 | 119 | install -p pam_cap/pam_cap.so $RPM_BUILD_ROOT/%{_lib}/security |
73e0abb9 | 120 | install -d $RPM_BUILD_ROOT/etc/security |
980032c1 | 121 | cp -a pam_cap/capability.conf $RPM_BUILD_ROOT/etc/security |
a3727a03 | 122 | |
9043b730 | 123 | install -d $RPM_BUILD_ROOT%{_libdir} |
be0fed49 JB |
124 | for libname in libcap libpsx ; do |
125 | ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/${libname}.so.*.*) \ | |
126 | $RPM_BUILD_ROOT%{_libdir}/${libname}.so | |
127 | %{__rm} $RPM_BUILD_ROOT/%{_lib}/${libname}.so | |
128 | %{__mv} $RPM_BUILD_ROOT/%{_lib}/${libname}.a $RPM_BUILD_ROOT%{_libdir} | |
129 | done | |
980032c1 | 130 | chmod a+x $RPM_BUILD_ROOT/%{_lib}/*.so* |
9043b730 | 131 | |
a3727a03 | 132 | %clean |
133 | rm -rf $RPM_BUILD_ROOT | |
134 | ||
b94aeea5 ER |
135 | %post libs -p /sbin/ldconfig |
136 | %postun libs -p /sbin/ldconfig | |
2f091405 | 137 | |
a3727a03 | 138 | %files |
e079a980 | 139 | %defattr(644,root,root,755) |
3020fb24 | 140 | %doc CHANGELOG License README |
73e0abb9 JB |
141 | %attr(755,root,root) %{_sbindir}/capsh |
142 | %attr(755,root,root) %{_sbindir}/getcap | |
143 | %attr(755,root,root) %{_sbindir}/getpcaps | |
bbf3869f | 144 | # TODO: cap_setfcap=i |
73e0abb9 | 145 | %attr(755,root,root) %{_sbindir}/setcap |
09b4f13a | 146 | %{_mandir}/man1/capsh.1* |
f5cb7c90 | 147 | %{_mandir}/man8/captree.8* |
73e0abb9 | 148 | %{_mandir}/man8/getcap.8* |
e175e300 | 149 | %{_mandir}/man8/getpcaps.8* |
73e0abb9 | 150 | %{_mandir}/man8/setcap.8* |
e7140f13 | 151 | |
1ef7e04d ER |
152 | %files libs |
153 | %defattr(644,root,root,755) | |
154 | %attr(755,root,root) /%{_lib}/libcap.so.*.* | |
155 | %attr(755,root,root) %ghost /%{_lib}/libcap.so.2 | |
be0fed49 JB |
156 | %attr(755,root,root) /%{_lib}/libpsx.so.*.* |
157 | %attr(755,root,root) %ghost /%{_lib}/libpsx.so.2 | |
1ef7e04d | 158 | |
a3727a03 | 159 | %files devel |
160 | %defattr(644,root,root,755) | |
73e0abb9 | 161 | %attr(755,root,root) %{_libdir}/libcap.so |
be0fed49 | 162 | %attr(755,root,root) %{_libdir}/libpsx.so |
bfe665d8 | 163 | %{_includedir}/sys/capability.h |
e175e300 | 164 | %{_includedir}/sys/psx_syscall.h |
1c51a973 | 165 | %{_pkgconfigdir}/libcap.pc |
e175e300 | 166 | %{_pkgconfigdir}/libpsx.pc |
e8bf9eb6 | 167 | %{_mandir}/man3/libcap*.3* |
e175e300 | 168 | %{_mandir}/man3/libpsx*.3* |
be0fed49 | 169 | %{_mandir}/man3/cap_*.3* |
73e0abb9 JB |
170 | %{_mandir}/man3/capgetp.3* |
171 | %{_mandir}/man3/capsetp.3* | |
be0fed49 | 172 | %{_mandir}/man3/psx_*.3* |
73e0abb9 JB |
173 | |
174 | %files static | |
175 | %defattr(644,root,root,755) | |
176 | %{_libdir}/libcap.a | |
be0fed49 | 177 | %{_libdir}/libpsx.a |
73e0abb9 JB |
178 | |
179 | %files -n pam-pam_cap | |
180 | %defattr(644,root,root,755) | |
181 | %doc pam_cap/License | |
182 | %attr(755,root,root) /%{_lib}/security/pam_cap.so | |
183 | %config(noreplace) %verify(not md5 mtime size) /etc/security/capability.conf | |
332ab836 JB |
184 | |
185 | # TODO: golang - where? | |
186 | # installs under | |
3720f29b | 187 | #%{_datadir}/gocode/src/kernel.org/pub/linux/libs/security/libcap |
332ab836 | 188 | # or should we use |
3720f29b | 189 | #%{_libdir}/golang/src/libcap |