]>
Commit | Line | Data |
---|---|---|
72e67668 SS |
1 | ############################################################################### |
2 | # # | |
3 | # IPFire.org - A linux based firewall # | |
4 | # Copyright (C) 2007, 2008 Michael Tremer & Christian Schmidt # | |
5 | # # | |
6 | # This program is free software: you can redistribute it and/or modify # | |
7 | # it under the terms of the GNU General Public License as published by # | |
8 | # the Free Software Foundation, either version 3 of the License, or # | |
9 | # (at your option) any later version. # | |
10 | # # | |
11 | # This program is distributed in the hope that it will be useful, # | |
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # | |
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # | |
14 | # GNU General Public License for more details. # | |
15 | # # | |
16 | # You should have received a copy of the GNU General Public License # | |
17 | # along with this program. If not, see <http://www.gnu.org/licenses/>. # | |
18 | # # | |
19 | ############################################################################### | |
20 | ||
21 | ############################################################################### | |
22 | # Definitions | |
23 | ############################################################################### | |
24 | ||
25 | include $(PKGROOT)/Include | |
26 | ||
27 | PKG_NAME = libselinux | |
28 | PKG_VER = 2.0.96 | |
279e68f5 | 29 | PKG_REL = 1 |
72e67668 SS |
30 | |
31 | PKG_MAINTAINER = | |
bb7d617c | 32 | PKG_GROUPS = System/Libraries |
72e67668 SS |
33 | PKG_URL = http://www.selinuxproject.org |
34 | PKG_LICENSE = Public Domain | |
35 | PKG_SUMMARY = SELinux library and simple utilities. | |
36 | ||
37 | PKG_BUILD_DEPS+= libsepol-devel python-devel swig | |
38 | ||
39 | define PKG_DESCRIPTION | |
40 | libselinux provides an API for SELinux applications to get and set \ | |
41 | process and file security contexts and to obtain security policy \ | |
42 | decisions. | |
43 | endef | |
44 | ||
45 | PKG_TARBALL = $(THISAPP).tgz | |
46 | ||
279e68f5 | 47 | PKG_PACKAGES += $(PKG_NAME_REAL)-devel $(PKG_NAME_REAL)-utils #python-selinux |
72e67668 SS |
48 | |
49 | # Package information for libselinux-utils | |
50 | PKG_SUMMARY-$(PKG_NAME_REAL)-utils = SELinux libselinux utilies. | |
51 | PKG_DESCRIPTION-$(PKG_NAME_REAL)-utils = The libselinux-utils package contains the utilities. | |
52 | ||
53 | define PKG_FILES-$(PKG_NAME_REAL)-utils | |
54 | /usr/sbin/* | |
55 | /usr/share/man/man5/* | |
56 | /usr/share/man/man8/* | |
57 | endef | |
58 | ||
59 | # Package information for python-selinux | |
60 | PKG_SUMMARY-python-selinux = SELinux python bindings. | |
61 | PKG_DESCRIPTION-selinux = SELinux python bindings for libselinux. | |
62 | ||
63 | define PKG_FILES-python-selinux | |
64 | /usr/lib/python* | |
65 | endef | |
66 | ||
67 | define STAGE_BUILD | |
68 | cd $(DIR_APP) && make clean | |
69 | cd $(DIR_APP) && make CC=gcc LIBDIR="/usr/lib" CFLAGS="-g $(CFLAGS)" swigify | |
70 | cd $(DIR_APP) && make CC=gcc LIBDIR="/usr/lib" CFLAGS="-g $(CFLAGS)" all | |
71 | cd $(DIR_APP) && make CC=gcc LIBDIR="/usr/lib" CFLAGS="-g $(CFLAGS)" pywrap | |
72 | endef | |
73 | ||
74 | define STAGE_INSTALL_CMDS | |
75 | cd $(DIR_APP) && make install-pywrap DESTDIR=$(BUILDROOT) | |
76 | ||
77 | # Remove unwanted binaries | |
78 | rm -f $(BUILDROOT)/usr/sbin/compute_* | |
79 | rm -f $(BUILDROOT)/usr/sbin/deftype | |
80 | rm -f $(BUILDROOT)/usr/sbin/execcon | |
81 | rm -f $(BUILDROOT)/usr/sbin/getenforcemode | |
82 | rm -f $(BUILDROOT)/usr/sbin/getfilecon | |
83 | rm -f $(BUILDROOT)/usr/sbin/getpidcon | |
84 | rm -f $(BUILDROOT)/usr/sbin/mkdircon | |
85 | rm -f $(BUILDROOT)/usr/sbin/policyvers | |
86 | rm -f $(BUILDROOT)/usr/sbin/setfilecon | |
87 | rm -f $(BUILDROOT)/usr/sbin/selinuxconfig | |
88 | rm -f $(BUILDROOT)/usr/sbin/selinuxdisable | |
89 | rm -f $(BUILDROOT)/usr/sbin/getseuser | |
90 | rm -f $(BUILDROOT)/usr/sbin/selinux_check_securetty_context | |
91 | ||
92 | # Move binaries from /sbin to /usr/sbin | |
93 | mv $(BUILDROOT)/sbin/* $(BUILDROOT)/usr/sbin | |
279e68f5 MT |
94 | |
95 | # Remove python module | |
96 | rm -rvf $(BUILDROOT)/usr/lib/python* | |
72e67668 | 97 | endef |