]>
Commit | Line | Data |
---|---|---|
db3649f6 SS |
1 | ############################################################################### |
2 | # IPFire.org - An Open Source Firewall Solution # | |
3 | # Copyright (C) - IPFire Development Team <info@ipfire.org> # | |
4 | ############################################################################### | |
5 | ||
6 | name = policycoreutils | |
b5e211a4 SS |
7 | version = 2.1.11 |
8 | release = 1 | |
db3649f6 SS |
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 | ||
b5e211a4 | 22 | sepolgen_ver = 1.1.6 |
db3649f6 SS |
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 = \ | |
b5e211a4 | 30 | policycoreutils-rhat.patch2 |
db3649f6 SS |
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 | |
fa63a90a | 47 | python-devel |
db3649f6 SS |
48 | end |
49 | ||
50 | # Manually add policycoreutils-sepolgen.patch because it has to be applied to the sepolgen source. | |
51 | prepare_cmds | |
b5e211a4 | 52 | cd %{DIR_SRC}/sepolgen-%{sepolgen_ver} && patch -Np2 -i %{DIR_PATCHES}/policycoreutils-sepolgen.patch2 |
db3649f6 SS |
53 | end |
54 | ||
55 | make_build_targets += \ | |
56 | LSPP_PRIV=y \ | |
b5e211a4 SS |
57 | BINDIR=%{bindir} \ |
58 | SBINDIR=%{sbindir} \ | |
7be2a5dd | 59 | LIBDIR=%{libdir} \ |
db3649f6 SS |
60 | CFLAGS="%{CFLAGS}" \ |
61 | all | |
62 | ||
63 | make_install_targets +=\ | |
64 | LSPP_PRIV=y \ | |
b5e211a4 SS |
65 | BINDIR=%{BUILDROOT}%{bindir} \ |
66 | SBINDIR=%{BUILDROOT}%{sbindir} \ | |
7be2a5dd | 67 | LIBDIR=%{BUILDROOT}%{libdir} |
db3649f6 SS |
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 | |
fa63a90a SS |
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/ | |
db3649f6 SS |
81 | |
82 | # Remove unneeded stuff. | |
83 | rm -vrf %{BUILDROOT}/etc/{rc.d,xdg,sysconfig} | |
84 | ||
db3649f6 SS |
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} | |
b5e211a4 SS |
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 | |
db3649f6 SS |
106 | |
107 | package python-%{name} | |
108 | summary = SELinux policy core python utilities. | |
109 | description = %{summary} | |
110 | ||
b5e211a4 SS |
111 | provides |
112 | /bin/audit2allow | |
113 | /bin/sandbox | |
114 | ||
115 | /sbin/semanage | |
116 | end | |
117 | ||
db3649f6 SS |
118 | requires |
119 | policycoreutils>=%{thisver} | |
261b57c6 SS |
120 | python-audit |
121 | python-libsemanage | |
db3649f6 | 122 | python-selinux>=2.1.7-3 |
261b57c6 | 123 | python-setools |
db3649f6 SS |
124 | end |
125 | ||
126 | files | |
b5e211a4 SS |
127 | %{bindir}/audit2allow |
128 | %{bindir}/audit2why | |
129 | %{bindir}/chcat | |
130 | %{bindir}/sandbox | |
131 | %{bindir}/sepolgen-ifgen | |
132 | %{bindir}/sepolgen-ifgen-attr-helper | |
7be2a5dd | 133 | %{libdir}/python* |
b5e211a4 | 134 | %{sbindir}/semanage |
db3649f6 SS |
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 | |
fa63a90a | 140 | /var/lib/sepolgen |
db3649f6 SS |
141 | end |
142 | end | |
143 | end |