]> git.ipfire.org Git - people/amarx/ipfire-3.x.git/blob - policycoreutils/policycoreutils.nm
policycoreutils: New package.
[people/amarx/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 = 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.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 end
50
51 # Manually add policycoreutils-sepolgen.patch because it has to be applied to the sepolgen source.
52 prepare_cmds
53 cd %{DIR_SRC}/sepolgen-%{sepolgen_ver} && patch -Np1 -i %{DIR_PATCHES}/policycoreutils-sepolgen.patch
54 end
55
56 make_build_targets += \
57 LSPP_PRIV=y \
58 LIBDIR=/usr/lib \
59 CFLAGS="%{CFLAGS}" \
60 all
61
62 make_install_targets +=\
63 LSPP_PRIV=y \
64 LIBDIR=%{BUILDROOT}/usr/lib
65
66 # Build sepolgen.
67 build_cmds
68 make -C %{DIR_SRC}/sepolgen-%{sepolgen_ver} %{make_build_targets}
69 end
70
71 install_cmds
72 # Install sepolgen
73 make -C %{DIR_SRC}/sepolgen-%{sepolgen_ver} %{make_install_targets}
74
75 # Remove unneeded stuff.
76 rm -vrf %{BUILDROOT}/etc/{rc.d,xdg,sysconfig}
77
78 # Fix absolute symlink
79 ln -svf ../../sbin/load_policy %{BUILDROOT}/usr/sbin/load_policy
80
81 # Remove unneeded sandbox stuff - they are to create graphical sandboxes.
82 rm -vrf %{BUILDROOT}/usr/sbin/seunshare
83 rm -vrf %{BUILDROOT}/usr/share/sandbox
84 rm -vrf %{BUILDROOT}/usr/share/man/man5/seunshare.5
85 rm -vrf %{BUILDROOT}/usr/share/man/man8/sandbox.8
86 end
87 end
88
89 packages
90 package %{name}
91
92 package python-%{name}
93 summary = SELinux policy core python utilities.
94 description = %{summary}
95
96 requires
97 policycoreutils>=%{thisver}
98 python-selinux>=2.1.7-3
99 end
100
101 files
102 /usr/bin/audit2allow
103 /usr/bin/audit2why
104 /usr/bin/chcat
105 /usr/bin/sandbox
106 /usr/bin/sepolgen-ifgen
107 /usr/bin/sepolgen-ifgen-attr-helper
108 /usr/lib/python*
109 /usr/sbin/semanage
110 /usr/share/man/man1/audit2allow.1
111 /usr/share/man/man1/audit2why.1
112 /usr/share/man/man8/chcat.8
113 /usr/share/man/man8/sandbox.8
114 /usr/share/man/man8/semanage.8
115 end
116 end
117 end