]> git.ipfire.org Git - people/ms/ipfire-3.x.git/blob - policycoreutils/policycoreutils.nm
grep: Update to version 2.18.
[people/ms/ipfire-3.x.git] / policycoreutils / policycoreutils.nm
1 ###############################################################################
2 # IPFire.org - An Open Source Firewall Solution #
3 # Copyright (C) - IPFire Development Team <info@ipfire.org> #
4 ###############################################################################
5
6 name = policycoreutils
7 version = 2.1.11
8 release = 1
9
10 groups = System/Base
11 url = http://www.selinuxproject.org
12 license = GPLv2
13 summary = SELinux policy core utilities.
14
15 description
16 policycoreutils contains utilities that are required
17 for basic operation of a SELinux system. These utilities include
18 load_policy to load policies, setfiles to label filesystems and newrole
19 to switch roles.
20 end
21
22 sepolgen_ver = 1.1.6
23
24 sources = \
25 %{thisapp}.tgz \
26 sepolgen-%{sepolgen_ver}.tgz
27
28 # We have to apply policycoreutils-sepolgen.patch at a later time.
29 patches = \
30 policycoreutils-rhat.patch2
31
32 build
33 requires
34 audit-devel
35 dbus-devel
36 dbus-glib-devel
37 glib2-devel
38 gettext
39 libcap-devel
40 libcap-ng-devel
41 libcgroup-devel
42 libselinux-devel>=2.1.7-3
43 libsemanage-devel
44 libsepol-devel
45 libsepol-static
46 pam-devel
47 python-devel
48 end
49
50 # Manually add policycoreutils-sepolgen.patch because it has to be applied to the sepolgen source.
51 prepare_cmds
52 cd %{DIR_SRC}/sepolgen-%{sepolgen_ver} && patch -Np2 -i %{DIR_PATCHES}/policycoreutils-sepolgen.patch2
53 end
54
55 make_build_targets += \
56 LSPP_PRIV=y \
57 BINDIR=%{bindir} \
58 SBINDIR=%{sbindir} \
59 LIBDIR=%{libdir} \
60 CFLAGS="%{CFLAGS}" \
61 all
62
63 make_install_targets +=\
64 LSPP_PRIV=y \
65 BINDIR=%{BUILDROOT}%{bindir} \
66 SBINDIR=%{BUILDROOT}%{sbindir} \
67 LIBDIR=%{BUILDROOT}%{libdir}
68
69 # Build sepolgen.
70 build_cmds
71 make -C %{DIR_SRC}/sepolgen-%{sepolgen_ver} %{make_build_targets}
72 end
73
74 install_cmds
75 # Install sepolgen
76 make -C %{DIR_SRC}/sepolgen-%{sepolgen_ver} DESTDIR=%{BUILDROOT} %{make_install_targets}
77
78 # Install bash_completion for semanage.
79 mkdir -pv %{BUILDROOT}/etc/bash_completion.d
80 install -m 755 %{DIR_SOURCE}/semanage-bash-completion.sh %{BUILDROOT}/etc/bash_completion.d/
81
82 # Remove unneeded stuff.
83 rm -vrf %{BUILDROOT}/etc/{rc.d,xdg,sysconfig}
84
85 # Remove unneeded sandbox stuff - they are to create graphical sandboxes.
86 rm -vrf %{BUILDROOT}/usr/sbin/seunshare
87 rm -vrf %{BUILDROOT}/usr/share/sandbox
88 rm -vrf %{BUILDROOT}/usr/share/man/man5/seunshare.5
89 rm -vrf %{BUILDROOT}/usr/share/man/man8/sandbox.8
90 end
91 end
92
93 packages
94 package %{name}
95 provides
96 /bin/sepolgen
97
98 /sbin/fixfiles
99 /sbin/load_policy
100 /sbin/restorecon
101 /sbin/semodule
102 /sbin/sestatus
103 /sbin/setfiles
104 end
105 end
106
107 package python-%{name}
108 summary = SELinux policy core python utilities.
109 description = %{summary}
110
111 provides
112 /bin/audit2allow
113 /bin/sandbox
114
115 /sbin/semanage
116 end
117
118 requires
119 policycoreutils>=%{thisver}
120 python-audit
121 python-libsemanage
122 python-selinux>=2.1.7-3
123 python-setools
124 end
125
126 files
127 %{bindir}/audit2allow
128 %{bindir}/audit2why
129 %{bindir}/chcat
130 %{bindir}/sandbox
131 %{bindir}/sepolgen-ifgen
132 %{bindir}/sepolgen-ifgen-attr-helper
133 %{libdir}/python*
134 %{sbindir}/semanage
135 /usr/share/man/man1/audit2allow.1
136 /usr/share/man/man1/audit2why.1
137 /usr/share/man/man8/chcat.8
138 /usr/share/man/man8/sandbox.8
139 /usr/share/man/man8/semanage.8
140 /var/lib/sepolgen
141 end
142 end
143 end