]> git.pld-linux.org Git - SPECS.git/blob - trustees.spec
SPECS updated Sat 31 Jul 21:27:02 CEST 2021
[SPECS.git] / trustees.spec
1 #
2 # Conditional build:
3 %bcond_without  dist_kernel     # without distribution kernel
4 %bcond_without  kernel          # don't build kernel modules
5 %bcond_without  userspace       # don't build userspace module
6 #
7 %define rel     1
8 Summary:        Trustees LSM
9 Summary(pl.UTF-8):      Moduł LSM Trustees
10 Name:           trustees
11 Version:        3.0
12 Release:        %{rel}
13 License:        GPL
14 Group:          Base/Kernel
15 Source0:        http://dl.sourceforge.net/trustees/%{name}-%{version}.tar.bz2
16 # Source0-md5:  45b7e894f9fe2321d671a5272dac76c2
17 Patch0:         trustees-namespace.patch
18 URL:            http://trustees.sourceforge.net/
19 %{?with_dist_kernel:BuildRequires:      kernel%{_alt_kernel}-module-build >= 3:2.6.20.2}
20 BuildRequires:  rpmbuild(macros) >= 1.379
21 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
22
23 %description
24 Trustees is an advanced Linux permission system inspired by Netware.
25
26 %description -l pl.UTF-8
27 Trustees jest zaawansowanym systemem linuksowych praw dostępu
28 zainspirowanym przez Netware.
29
30 %package -n kernel%{_alt_kernel}-misc-trustees
31 Summary:        Trustees kernel module
32 Summary(pl.UTF-8):      Moduł jądra Trustees
33 Release:        %{rel}@%{_kernel_ver_str}
34 Group:          Base/Kernel
35 %{?with_dist_kernel:%requires_releq_kernel}
36 Requires(post,postun):  /sbin/depmod
37 Requires:       trustees
38
39 %description -n kernel%{_alt_kernel}-misc-trustees
40 Trustees is an advanced Linux permission system inspired by Netware.
41 This package contains Trustees kernel module.
42
43 %description -n kernel%{_alt_kernel}-misc-trustees -l pl.UTF-8
44 Trustees jest zaawansowanym systemem linuksowych praw dostępu
45 zainspirowanym przez Netware. Ten pakiet zawiera moduł jądra Trustees.
46
47 %prep
48 %setup -q
49 %patch0 -p1
50
51 %build
52 %if %{with userspace}
53 %{__make} -C src \
54         CFLAGS="%{rpmcflags} -I$PWD/include"
55 %endif
56
57 %if %{with kernel}
58 %build_kernel_modules -C module -m %{name}
59 %endif
60
61 %install
62 rm -rf $RPM_BUILD_ROOT
63
64 %if %{with kernel}
65 %install_kernel_modules -m module/trustees -d misc
66 %endif
67
68 %if %{with userspace}
69 install -d $RPM_BUILD_ROOT/sbin
70 install src/settrustees $RPM_BUILD_ROOT/sbin
71 %endif
72
73 %clean
74 rm -rf $RPM_BUILD_ROOT
75
76 %post   -n kernel%{_alt_kernel}-misc-trustees
77 %depmod %{_kernel_ver}
78
79 %postun -n kernel%{_alt_kernel}-misc-trustees
80 %depmod %{_kernel_ver}
81
82 %if %{with userspace}
83 %files
84 %defattr(644,root,root,755)
85 %doc README examples/*
86 %attr(755,root,root) /sbin/settrustees
87 %endif
88
89 %if %{with kernel}
90 %files -n kernel%{_alt_kernel}-misc-trustees
91 %defattr(644,root,root,755)
92 /lib/modules/%{_kernel_ver}/misc/*
93 %endif
This page took 0.122281 seconds and 3 git commands to generate.