]> git.pld-linux.org Git - packages/capsel.git/blob - capsel.spec
618b5fd2318326c9d2878a31edb2ce3b3b243d6b
[packages/capsel.git] / capsel.spec
1 #
2 # _without_dist_kernel - without distribution kernel
3 #
4 %define         _orig_name      capsel
5 %define         _pre            rc1
6
7 Summary:        Capsel - supports Linux-Privs security model
8 Summary(pl):    Capsel - obs³uga modelu bezpieczeñstwa Linux-Privs
9 Name:           %{_orig_name}
10 Version:        2.0
11 %define _rel    5
12 Release:        %{_pre}.%{_rel}
13 Group:          Base/Kernel
14 License:        GPL v2
15 Source0:        http://cliph.linux.pl/capsel/capsel-%{version}%{_pre}.tar.gz
16 Source1:        %{name}.init
17 Patch0:         %{name}-2.0rc2.diff
18 Patch1:         %{name}-no_kernel_smp.patch
19 URL:            http://cliph.linux.pl/capsel/
20 %{!?_without_dist_kernel:BuildRequires: kernel-headers}
21 BuildRequires:  %{kgcc_package}
22 Prereq:         /sbin/depmod
23 %{!?_without_dist_kernel:Requires:      kernel(capsel)}
24 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25
26 %description
27 Capsel module is a small but very powerful loadable Linux kernel
28 module. Its advanced security features allows to improve overall
29 system security.
30
31 %description -l pl
32 Capsel jest ma³ym, ale bardzo potê¿nym ³adowalnym modu³em dla Linuksa.
33 Jego cechy pozwalaj± zwiêkszyæ bezpieczeñstwo systemu.
34
35 %package -n kernel-misc-capsel
36 Summary:        Capsel - supports Linux-Privs security model
37 Summary(pl):    Capsel - obs³uga modelu bezpieczeñstwa Linux-Privs
38 Release:        %{_rel}@%{_kernel_ver_str}
39 Group:          Base/Kernel
40 %{!?_without_dist_kernel:%requires_releq_kernel_up}
41 Provides:       kernel(capsel)
42
43 %description -n kernel-misc-capsel
44 Capsel - kernel module.
45
46 %description -n kernel-misc-capsel -l pl
47 Capsel - modu³ j±dra.
48
49 %package -n kernel-smp-misc-capsel
50 Summary:        Capsel - supports Linux-Privs security model
51 Summary(pl):    Capsel - obs³uga modelu bezpieczeñstwa Linux-Privs
52 Release:        %{_rel}@%{_kernel_ver_str}
53 Group:          Base/Kernel
54 Prereq:         /sbin/depmod
55 %{!?_without_dist_kernel:%requires_releq_kernel_smp}
56 Provides:       kernel(capsel)
57
58 %description -n kernel-smp-misc-capsel
59 Capsel - SMP kernel module.
60
61 %description -n kernel-smp-misc-capsel -l pl
62 Capsel - modu³ j±dra SMP.
63
64 %prep
65 %setup -q -n %{name}-%{version}%{_pre}
66 %patch0 -p1
67 %patch1 -p1
68
69 %build
70 mkdir bin/
71
72 %{__make} CC="%{kgcc} -DCONFIG_X86_LOCAL_APIC"
73 mv -f src/capsel.o bin/capsel.o
74
75 %{__make} clean
76
77 %{__make} CC="%{kgcc} -D__KERNEL_SMP=1 -D__SMP__ -DCONFIG_X86_LOCAL_APIC"
78 mv -f src/capsel.o bin/capselsmp.o
79
80 %install
81 rm -rf $RPM_BUILD_ROOT
82 install -d $RPM_BUILD_ROOT/{%{_sysconfdir}/{%{_orig_name},rc.d/init.d},/sbin/}
83 install capsel.conf     $RPM_BUILD_ROOT/%{_sysconfdir}/capsel/default
84 install src/user/capsel $RPM_BUILD_ROOT/sbin/
85
86 install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/misc
87 install bin/capsel.o $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/misc/capsel.o
88
89 install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/misc
90 install bin/capselsmp.o $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/misc/capsel.o
91
92 install %{SOURCE1}      $RPM_BUILD_ROOT/%{_sysconfdir}/rc.d/init.d/capsel
93
94 %clean
95 rm -rf $RPM_BUILD_ROOT
96
97 %post
98 /sbin/chkconfig --add capsel
99 if [ -f /var/lock/subsys/capsel ]; then
100         /etc/rc.d/init.d/capsel restart 1>&2
101 else
102         echo "Run \"/etc/rc.d/init.d/caspel start\" to start capsel."
103 fi
104
105 %preun
106 if [ "$1" = "0" ]; then
107         if [ -f /var/lock/subsys/capsel ]; then
108                 /etc/rc.d/init.d/capsel stop 1>&2
109         fi
110         /sbin/chkconfig --del capsel
111 fi
112
113 %post   -n kernel-misc-capsel
114 /sbin/depmod -a
115
116 %postun -n kernel-misc-capsel
117 /sbin/depmod -a
118
119 %post   -n kernel-smp-misc-capsel
120 /sbin/depmod -a
121
122 %postun -n kernel-smp-misc-capsel
123 /sbin/depmod -a
124
125 %files
126 %defattr(644,root,root,755)
127 %doc README CAPABILITIES ChangeLog TODO misc scripts conf
128 %attr(755,root,root) /sbin/*
129 %dir %attr(750,root,root) %{_sysconfdir}/capsel
130 %attr(755,root,root) %{_sysconfdir}/rc.d/init.d/capsel
131 %attr(640,root,root) %config(noreplace) %{_sysconfdir}/capsel/*
132
133 %files -n kernel-misc-capsel
134 %defattr(644,root,root,755)
135 %attr(644,root,root) /lib/modules/%{_kernel_ver}/misc/*
136
137 %files -n kernel-smp-misc-capsel
138 %defattr(644,root,root,755)
139 %attr(644,root,root) /lib/modules/%{_kernel_ver}smp/misc/*
This page took 0.248397 seconds and 2 git commands to generate.