]> git.ipfire.org Git - people/ms/ipfire-3.x.git/blob - policycoreutils/policycoreutils.nm
Merge remote-tracking branch 'ms/kernel-3.2'
[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.8
8 release = 4
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.3
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-gui.patch \
31 policycoreutils-po.patch \
32 policycoreutils-rhat.patch
33
34 build
35 requires
36 audit-devel
37 dbus-devel
38 dbus-glib-devel
39 glib2-devel
40 gettext
41 libcap-devel
42 libcap-ng-devel
43 libcgroup-devel
44 libselinux-devel>=2.1.7-3
45 libsemanage-devel
46 libsepol-devel
47 libsepol-static
48 pam-devel
49 python-devel
50 end
51
52 # Manually add policycoreutils-sepolgen.patch because it has to be applied to the sepolgen source.
53 prepare_cmds
54 cd %{DIR_SRC}/sepolgen-%{sepolgen_ver} && patch -Np1 -i %{DIR_PATCHES}/policycoreutils-sepolgen.patch
55 end
56
57 make_build_targets += \
58 LSPP_PRIV=y \
59 LIBDIR=%{libdir} \
60 CFLAGS="%{CFLAGS}" \
61 all
62
63 make_install_targets +=\
64 LSPP_PRIV=y \
65 LIBDIR=%{BUILDROOT}%{libdir}
66
67 # Build sepolgen.
68 build_cmds
69 make -C %{DIR_SRC}/sepolgen-%{sepolgen_ver} %{make_build_targets}
70 end
71
72 install_cmds
73 # Install sepolgen
74 make -C %{DIR_SRC}/sepolgen-%{sepolgen_ver} DESTDIR=%{BUILDROOT} %{make_install_targets}
75
76 # Install bash_completion for semanage.
77 mkdir -pv %{BUILDROOT}/etc/bash_completion.d
78 install -m 755 %{DIR_SOURCE}/semanage-bash-completion.sh %{BUILDROOT}/etc/bash_completion.d/
79
80 # Remove unneeded stuff.
81 rm -vrf %{BUILDROOT}/etc/{rc.d,xdg,sysconfig}
82
83 # Fix absolute symlink
84 ln -svf ../../sbin/load_policy %{BUILDROOT}/usr/sbin/load_policy
85
86 # Remove unneeded sandbox stuff - they are to create graphical sandboxes.
87 rm -vrf %{BUILDROOT}/usr/sbin/seunshare
88 rm -vrf %{BUILDROOT}/usr/share/sandbox
89 rm -vrf %{BUILDROOT}/usr/share/man/man5/seunshare.5
90 rm -vrf %{BUILDROOT}/usr/share/man/man8/sandbox.8
91 end
92 end
93
94 packages
95 package %{name}
96
97 package python-%{name}
98 summary = SELinux policy core python utilities.
99 description = %{summary}
100
101 requires
102 policycoreutils>=%{thisver}
103 python-audit
104 python-libsemanage
105 python-selinux>=2.1.7-3
106 python-setools
107 end
108
109 files
110 /usr/bin/audit2allow
111 /usr/bin/audit2why
112 /usr/bin/chcat
113 /usr/bin/sandbox
114 /usr/bin/sepolgen-ifgen
115 /usr/bin/sepolgen-ifgen-attr-helper
116 %{libdir}/python*
117 /usr/sbin/semanage
118 /usr/share/man/man1/audit2allow.1
119 /usr/share/man/man1/audit2why.1
120 /usr/share/man/man8/chcat.8
121 /usr/share/man/man8/sandbox.8
122 /usr/share/man/man8/semanage.8
123 /var/lib/sepolgen
124 end
125 end
126 end