]>
Commit | Line | Data |
---|---|---|
72e67668 | 1 | ############################################################################### |
802ea3af MT |
2 | # IPFire.org - An Open Source Firewall Solution # |
3 | # Copyright (C) - IPFire Development Team <info@ipfire.org> # | |
72e67668 SS |
4 | ############################################################################### |
5 | ||
802ea3af | 6 | name = libselinux |
397ea7dc SS |
7 | version = 2.1.7 |
8 | release = 1 | |
72e67668 | 9 | |
802ea3af MT |
10 | groups = System/Libraries |
11 | url = http://www.selinuxproject.org | |
12 | license = Public Domain | |
13 | summary = SELinux library and simple utilities. | |
72e67668 | 14 | |
802ea3af | 15 | description |
397ea7dc SS |
16 | libselinux provides an API for SELinux applications to get and set |
17 | process and file security contexts and to obtain security policy | |
72e67668 | 18 | decisions. |
802ea3af MT |
19 | end |
20 | ||
802ea3af MT |
21 | sources = %{thisapp}.tgz |
22 | ||
23 | build | |
24 | requires | |
25 | libsepol-devel | |
26 | python-devel | |
27 | swig | |
28 | end | |
29 | ||
30 | build | |
31 | make clean | |
e6375510 MT |
32 | make CC=gcc LIBDIR="%{libdir}" CFLAGS="-g %{CFLAGS}" swigify |
33 | make CC=gcc LIBDIR="%{libdir}" CFLAGS="-g %{CFLAGS}" all | |
34 | make CC=gcc LIBDIR="%{libdir}" CFLAGS="-g %{CFLAGS}" pywrap | |
802ea3af MT |
35 | end |
36 | ||
e6375510 MT |
37 | make_install_targets += LIBDIR="%{BUILDROOT}%{libdir}" \ |
38 | SHLIBDIR="%{BUILDROOT}/%{lib}" | |
39 | ||
802ea3af | 40 | install_cmds |
e6375510 | 41 | make install-pywrap DESTDIR=%{BUILDROOT} LIBDIR="%{BUILDROOT}%{libdir}" |
802ea3af MT |
42 | |
43 | # Remove unwanted binaries | |
44 | rm -f %{BUILDROOT}/usr/sbin/compute_* | |
45 | rm -f %{BUILDROOT}/usr/sbin/deftype | |
46 | rm -f %{BUILDROOT}/usr/sbin/execcon | |
47 | rm -f %{BUILDROOT}/usr/sbin/getenforcemode | |
48 | rm -f %{BUILDROOT}/usr/sbin/getfilecon | |
49 | rm -f %{BUILDROOT}/usr/sbin/getpidcon | |
50 | rm -f %{BUILDROOT}/usr/sbin/mkdircon | |
51 | rm -f %{BUILDROOT}/usr/sbin/policyvers | |
52 | rm -f %{BUILDROOT}/usr/sbin/setfilecon | |
53 | rm -f %{BUILDROOT}/usr/sbin/selinuxconfig | |
54 | rm -f %{BUILDROOT}/usr/sbin/selinuxdisable | |
55 | rm -f %{BUILDROOT}/usr/sbin/getseuser | |
56 | rm -f %{BUILDROOT}/usr/sbin/selinux_check_securetty_context | |
57 | ||
58 | # Move binaries from /sbin to /usr/sbin | |
59 | mv %{BUILDROOT}/sbin/* %{BUILDROOT}/usr/sbin | |
60 | ||
61 | # Remove python module | |
62 | rm -rvf %{BUILDROOT}/usr/lib/python* | |
63 | end | |
64 | end | |
65 | ||
66 | packages | |
67 | package %{name} | |
68 | end | |
1f9bc2f0 | 69 | |
802ea3af MT |
70 | package %{name}-devel |
71 | template DEVEL | |
72 | end | |
1f9bc2f0 | 73 | |
802ea3af MT |
74 | package %{name}-utils |
75 | summary = SELinux libselinux utitlities. | |
76 | description | |
77 | The libselinux-utils package contains the utilities. | |
78 | end | |
79 | ||
80 | files | |
81 | /usr/sbin/* | |
82 | /usr/share/man/man{5,8}/* | |
83 | end | |
84 | end | |
1f9bc2f0 | 85 | |
802ea3af MT |
86 | #package python-selinux |
87 | # summary = SELinux python bindings. | |
88 | # description = SELinux python bindings for libselinux. | |
89 | # | |
90 | # def files | |
91 | # /usr/lib/python* | |
92 | # end | |
93 | #end | |
1f9bc2f0 MT |
94 | |
95 | ||
96 | ||
97 | package %{name}-debuginfo | |
98 | template DEBUGINFO | |
99 | end | |
802ea3af | 100 | end |