2 # TODO: - add Provides: ...(grsecurity) in the kernel.spec /LINUX_2_6 should
3 # provide grsecurity/ and uncomment the Reqs
6 %bcond_without dist_kernel # without kernel from distribution
7 %bcond_with static # build static version
8 %bcond_with debug # build debug version
10 %define grsec_version 2.2.0
11 %define snap 201009022049
13 Summary: GrSecurity ACL Administration
14 Summary(pl.UTF-8): Administracja ACL GrSecurity
16 Version: %{grsec_version}
17 Release: %{snap}.%{rel}
19 Group: Applications/System
20 #Source0: http://www.grsecurity.net/%{name}-%{version}-%{snap}.tar.gz
21 Source0: http://www.grsecurity.net/~spender/%{name}-%{version}-%{snap}.tar.gz
22 # Source0-md5: 97d5b55e38dc5db8906dffa2b9335032
23 Source1: http://www.grsecurity.net/gracldoc.htm
24 # Source1-md5: 010802958eaed78e4c370f4f5ce142b5
25 Patch0: %{name}-caps.patch
26 Patch1: %{name}-num-ugid.patch
27 Patch2: %{name}-num-protocols.patch
28 Patch3: %{name}-show-trans.patch
29 Patch4: %{name}-symlink_depth.patch
30 URL: http://www.grsecurity.net/
34 BuildRequires: glibc-static
35 BuildRequires: pam-static
36 BuildRequires: sed >= 4.0
38 BuildRequires: pam-devel
39 BuildRequires: texinfo
40 #{?with_dist_kernel:Requires: kernel(grsecurity) = %{grsec_version}}
41 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
43 %define _sbindir /sbin
46 GrSecurity ACL Administration.
48 %description -l pl.UTF-8
49 Administracja ACL GrSecurity.
61 %{?with_static:sed -i 's/LDFLAGS=/LDFLAGS=-static -ldl/' Makefile}
65 OPT_FLAGS="%{rpmcflags} %{?with_debug:-DGRADM_DEBUG}"
68 rm -rf $RPM_BUILD_ROOT
69 install -d $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man8,%{_sysconfdir}/grsec}
71 install gradm $RPM_BUILD_ROOT%{_sbindir}
72 install gradm_pam $RPM_BUILD_ROOT%{_sbindir}
73 install grlearn $RPM_BUILD_ROOT%{_sbindir}
74 install gradm.8 $RPM_BUILD_ROOT%{_mandir}/man8
75 install policy $RPM_BUILD_ROOT%{_sysconfdir}/grsec
76 install learn_config $RPM_BUILD_ROOT%{_sysconfdir}/grsec
79 rm -rf $RPM_BUILD_ROOT
82 %defattr(644,root,root,755)
84 %attr(755,root,root) %{_sbindir}/*
85 %dir %{_sysconfdir}/grsec
86 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/grsec/policy
87 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/grsec/learn_config