]> git.ipfire.org Git - people/ms/ipfire-3.x.git/blame - policycoreutils/policycoreutils.nm
Merge remote-tracking branch 'ms/kernel-3.2'
[people/ms/ipfire-3.x.git] / policycoreutils / policycoreutils.nm
CommitLineData
db3649f6
SS
1###############################################################################
2# IPFire.org - An Open Source Firewall Solution #
3# Copyright (C) - IPFire Development Team <info@ipfire.org> #
4###############################################################################
5
6name = policycoreutils
7version = 2.1.8
7be2a5dd 8release = 4
db3649f6
SS
9
10groups = System/Base
11url = http://www.selinuxproject.org
12license = GPLv2
13summary = SELinux policy core utilities.
14
15description
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.
20end
21
22sepolgen_ver = 1.1.3
23
24sources = \
25 %{thisapp}.tgz \
26 sepolgen-%{sepolgen_ver}.tgz
27
28# We have to apply policycoreutils-sepolgen.patch at a later time.
29patches = \
30 policycoreutils-gui.patch \
31 policycoreutils-po.patch \
32 policycoreutils-rhat.patch
33
34build
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
fa63a90a 49 python-devel
db3649f6
SS
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 \
7be2a5dd 59 LIBDIR=%{libdir} \
db3649f6
SS
60 CFLAGS="%{CFLAGS}" \
61 all
62
63 make_install_targets +=\
64 LSPP_PRIV=y \
7be2a5dd 65 LIBDIR=%{BUILDROOT}%{libdir}
db3649f6
SS
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
fa63a90a
SS
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/
db3649f6
SS
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
92end
93
94packages
95 package %{name}
96
97 package python-%{name}
98 summary = SELinux policy core python utilities.
99 description = %{summary}
100
101 requires
102 policycoreutils>=%{thisver}
261b57c6
SS
103 python-audit
104 python-libsemanage
db3649f6 105 python-selinux>=2.1.7-3
261b57c6 106 python-setools
db3649f6
SS
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
7be2a5dd 116 %{libdir}/python*
db3649f6
SS
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
fa63a90a 123 /var/lib/sepolgen
db3649f6
SS
124 end
125 end
126end