]> git.ipfire.org Git - people/ms/ipfire-3.x.git/blame - pkgs/core/libselinux/libselinux.nm
libselinux: New package.
[people/ms/ipfire-3.x.git] / pkgs / core / libselinux / libselinux.nm
CommitLineData
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
25include $(PKGROOT)/Include
26
27PKG_NAME = libselinux
28PKG_VER = 2.0.96
29PKG_REL = 0
30
31PKG_MAINTAINER =
32PKG_GROUP = System/Libraries
33PKG_URL = http://www.selinuxproject.org
34PKG_LICENSE = Public Domain
35PKG_SUMMARY = SELinux library and simple utilities.
36
37PKG_BUILD_DEPS+= libsepol-devel python-devel swig
38
39define 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.
43endef
44
45PKG_TARBALL = $(THISAPP).tgz
46
47PKG_PACKAGES += $(PKG_NAME_REAL)-devel $(PKG_NAME_REAL)-utils python-selinux
48
49# Package information for libselinux-utils
50PKG_SUMMARY-$(PKG_NAME_REAL)-utils = SELinux libselinux utilies.
51PKG_DESCRIPTION-$(PKG_NAME_REAL)-utils = The libselinux-utils package contains the utilities.
52
53define PKG_FILES-$(PKG_NAME_REAL)-utils
54 /usr/sbin/*
55 /usr/share/man/man5/*
56 /usr/share/man/man8/*
57endef
58
59# Package information for python-selinux
60PKG_SUMMARY-python-selinux = SELinux python bindings.
61PKG_DESCRIPTION-selinux = SELinux python bindings for libselinux.
62
63define PKG_FILES-python-selinux
64 /usr/lib/python*
65endef
66
67define 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
72endef
73
74define 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
94endef