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