]> git.pld-linux.org Git - SPECS.git/blob - gradm.spec
SPECS updated Mon 29 Apr 22:05:02 CEST 2024
[SPECS.git] / gradm.spec
1 #
2 # TODO: - add Provides: ...(grsecurity) in the kernel.spec /LINUX_2_6 should
3 #         provide grsecurity/ and uncomment the Reqs
4 #
5 # Conditional build:
6 %bcond_without  dist_kernel     # without kernel from distribution 
7 %bcond_with     static          # build static version
8 %bcond_with     debug           # build debug version
9 #
10 %define         grsec_version   2.2.0
11 %define         snap            201009022049
12 %define         rel             1
13 Summary:        GrSecurity ACL Administration
14 Summary(pl.UTF-8):      Administracja ACL GrSecurity
15 Name:           gradm
16 Version:        %{grsec_version}
17 Release:        %{snap}.%{rel}
18 License:        GPL
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/
31 BuildRequires:  bison
32 BuildRequires:  flex
33 %if %{with static}
34 BuildRequires:  glibc-static
35 BuildRequires:  pam-static
36 BuildRequires:  sed >= 4.0
37 %endif
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)
42
43 %define         _sbindir        /sbin
44
45 %description
46 GrSecurity ACL Administration.
47
48 %description -l pl.UTF-8
49 Administracja ACL GrSecurity.
50
51 %prep
52 %setup -q -n %{name}2
53 %patch0 -p1
54 #%patch1 -p1
55 %patch2 -p1
56 #%patch3 -p1
57 #%patch4 -p1
58 cp -f %{SOURCE1} .
59
60 %build
61 %{?with_static:sed -i 's/LDFLAGS=/LDFLAGS=-static -ldl/' Makefile}
62 %{__make} \
63         CC="%{__cc}" \
64         YACC=/usr/bin/bison \
65         OPT_FLAGS="%{rpmcflags} %{?with_debug:-DGRADM_DEBUG}"
66
67 %install
68 rm -rf $RPM_BUILD_ROOT
69 install -d $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man8,%{_sysconfdir}/grsec}
70
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
77
78 %clean
79 rm -rf $RPM_BUILD_ROOT
80
81 %files
82 %defattr(644,root,root,755)
83 %doc gracldoc.htm
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
88 %{_mandir}/man8/*
This page took 0.667241 seconds and 3 git commands to generate.