/[packages]/updates/1/msec/current/SPECS/msec.spec
ViewVC logotype

Contents of /updates/1/msec/current/SPECS/msec.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 145674 - (show annotations) (download)
Mon Sep 19 18:59:11 2011 UTC (10 years, 8 months ago) by doktor5000
File size: 4757 byte(s)
- exchange blank updates icon to proper one after rebrand
- require drakconf-icons for msec-gui to make sure used icons are existent
- add Requires on sectool to partly fix (mga#2255)
1 %define subrel 1
2
3 Name: msec
4 Version: 0.80.10
5 Release: %mkrel 2
6 Summary: Security Level management Linux distributions
7 License: GPLv2+
8 Group: System/Base
9 Url: http://www.mandrivalinux.com/
10 Source0: %{name}-%{version}.tar.bz2
11 # exchange blank updates icon to proper one after rebrand
12 # requested by eugeni on https://bugs.mageia.org/show_bug.cgi?id=1530
13 Patch0: msec-0.80.10-mga-change-updates-icon.patch
14 Requires: perl-base
15 Requires: diffutils
16 Requires: gawk
17 Requires: coreutils
18 Requires: iproute2
19 Requires: setup
20 Requires: chkconfig
21 Requires: mailx
22 Requires: python
23 Requires: sectool
24 # at least xargs is used
25 Requires: findutils
26 # ensure sysctl.conf and inittab are present before installing msec
27 Requires(post): initscripts
28
29 Requires(pre): rpm-helper >= 0.4
30 Requires(postun): rpm-helper >= 0.4
31
32 Suggests: msec-gui
33 # using s2u for desktop notifications
34 # it should be pulled by xinit to reduce basesystem size
35 # Suggests: s2u >= 0.9
36
37 Conflicts: passwd < 0.67
38 BuildRequires: python
39
40 %description
41 The Security package is designed to provide security features to Linux users.
42 It allows to select from a set of preconfigured security levels, and supports
43 custom permission settings, user-specified levels, and several security
44 utilities. This packages includes main msec application and several programs
45 that will be run periodically in order to test the security of your system and
46 alert you if needed.
47
48 %package gui
49 Summary: Graphical msec interface
50 Group: System/Configuration/Other
51 Requires: pygtk2.0
52 Requires: msec
53 Requires: drakconf-icons
54
55 %description gui
56 The Security package is designed to provide security features to the Linux
57 users. It allows to select from a set of preconfigured security levels, and also
58 supports custom permission settings, user-specified levels, and several security
59 utilities. This packages includes graphical interface to control and tune msec
60 permissions.
61
62
63 %prep
64 %setup -q
65
66 %patch0 -p0 -b .change-updates-icon
67
68 %build
69 make CFLAGS="$RPM_OPT_FLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
70
71 %install
72 rm -rf %{buildroot}
73
74 make install
75
76 mkdir -p %{buildroot}/%{_sysconfdir}/{logrotate.d,profile.d}
77 touch %{buildroot}/var/log/security.log
78 touch %{buildroot}/etc/security/msec/security.conf
79 touch %{buildroot}/etc/security/msec/perms.conf
80 # init script
81 install -d %{buildroot}/%{_initrddir}
82 install -m755 %{_builddir}/%{name}-%{version}/msec.init %{buildroot}/%{_initrddir}/%{name}
83 mkdir -p %{buildroot}/etc/X11/xinit.d
84 touch %{buildroot}/etc/X11/xinit.d/msec
85
86 %find_lang %name
87
88 %pre
89 %_pre_groupadd xgrp
90 %_pre_groupadd ntools
91 %_pre_groupadd ctools
92
93 %preun
94 %_preun_service msec
95
96 %post
97 %_post_service msec
98
99 touch /var/log/security.log
100
101 if [ $1 != 1 ]; then
102 # since 0.80.3, msec has its own upgrade script, which handles upgrades from previous versions
103 /usr/share/msec/upgrade.sh
104 fi
105
106 # creating default configuration if not installed by installer
107 if [ "$DURING_INSTALL" != "1" ]; then
108 if [ ! -s /etc/security/msec/security.conf ]; then
109 # creating default level configuration
110 cp -f /etc/security/msec/level.standard /etc/security/msec/security.conf
111 fi
112
113 if [ ! -s /etc/security/msec/perms.conf ]; then
114 # creating default level configuration
115 cp -f /etc/security/msec/perm.standard /etc/security/msec/perms.conf
116 fi
117 fi
118
119 %postun
120
121 if [ $1 = 0 ]; then
122 # cleanup crontabs on package removal
123 rm -f /etc/cron.*/msec
124 fi
125
126 %_postun_groupdel xgrp
127 %_postun_groupdel ntools
128 %_postun_groupdel ctools
129
130 %clean
131 rm -rf %{buildroot}
132
133 %files -f %{name}.lang
134 %defattr(-,root,root)
135 %doc AUTHORS COPYING README*
136 %doc ChangeLog doc/*.txt
137 %_bindir/promisc_check
138 %_bindir/msec_find
139 %{_initrddir}/%{name}
140 %_sbindir/msec
141 %_sbindir/msecperms
142 %_datadir/msec/msec.py*
143 %_datadir/msec/config.py*
144 %_datadir/msec/libmsec.py*
145 %_datadir/msec/msecperms.py*
146 %_datadir/msec/tools.py*
147 %_datadir/msec/version.py*
148 %_datadir/msec/*.sh
149 %_datadir/msec/plugins/*
150 %_datadir/msec/scripts/*
151 %_mandir/*/*.*
152 %lang(cs) %_mandir/cs/man?/*
153 %lang(et) %_mandir/et/man?/*
154 %lang(eu) %_mandir/eu/man?/*
155 %lang(fi) %_mandir/fi/man?/*
156 %lang(fr) %_mandir/fr/man?/*
157 %lang(it) %_mandir/it/man?/*
158 %lang(nl) %_mandir/nl/man?/*
159 %lang(pl) %_mandir/pl/man?/*
160 %lang(ru) %_mandir/ru/man?/*
161 %lang(uk) %_mandir/uk/man?/*
162 %dir /var/log/security
163 %dir /etc/security/msec
164 %config /etc/security/msec/level.*
165 %config /etc/security/msec/perm.*
166 %config /etc/security/msec/server.*
167 %config(noreplace) /etc/security/msec/security.conf
168 %config(noreplace) /etc/security/msec/perms.conf
169 %config(noreplace) /etc/logrotate.d/msec
170 /etc/profile.d/*msec*
171
172 %config %attr(0755,root,root) /etc/X11/xinit.d/msec
173
174 %ghost /var/log/security.log
175 %ghost /var/log/msec.log
176
177 %files gui
178 %defattr(-,root,root)
179 %_sbindir/msecgui
180 %_datadir/msec/msecgui.py*
181 %_datadir/msec/help.py*
182 %_datadir/msec/msec.png

  ViewVC Help
Powered by ViewVC 1.1.28