2 # This is free software, licensed under the GNU General Public License v2.
3 # See /LICENSE for more information.
6 include $(TOPDIR
)/rules.mk
8 PKG_NAME
:=policycoreutils
12 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
13 PKG_SOURCE_URL
:=https
://github.com
/SELinuxProject
/selinux
/releases
/download
/20200710
14 PKG_HASH
:=c889f62ee80f8b6a369469a9b8af51f5b797975aeaa291f5c5960cc12eed1934
16 HOST_BUILD_DEPENDS
:=libsemanage
/host
17 PKG_BUILD_DEPENDS
:=BUSYBOX_CONFIG_PAM
:libpam
19 PKG_MAINTAINER
:=Thomas Petazzoni
<thomas.petazzoni@bootlin.com
>
20 PKG_CPE_ID
:=cpe
:/a
:selinuxproject
:policycoreutils
21 PKG_LICENSE
:=GPL-2.0
-or-later
22 PKG_LICENSE_FILES
:=COPYING
24 include $(INCLUDE_DIR
)/package.mk
26 define Package
/policycoreutils
29 DEPENDS
:= +libsemanage
+libcap-ng
+BUSYBOX_CONFIG_PAM
:libpam
30 TITLE
:=SELinux policy utilities
31 URL
:=http
://selinuxproject.org
/page
/Main_Page
33 300:/sbin
/restorecon
:policycoreutils-restorecon \
34 300:/sbin
/setfiles
:policycoreutils-setfiles \
35 300:/usr
/sbin
/load_policy
:policycoreutils-load_policy \
36 300:/usr
/sbin
/sestatus
:policycoreutils-sestatus \
37 300:/usr
/sbin
/setsebool
:policycoreutils-setsebool
40 define Package
/policycoreutils
/description
41 Policycoreutils is a collection of policy utilities
42 (originally the
"core" set of utilities needed to use
43 SELinux
, although it has grown a bit over time
), which have
44 different dependencies. sestatus
, secon
, run_init
, and
45 newrole only use libselinux. load_policy and setfiles only
46 use libselinux and libsepol. semodule and semanage use
47 libsemanage
(and thus bring in dependencies on libsepol and
48 libselinux
as well
). setsebool uses libselinux to make
49 non-persistent boolean changes
(via the kernel interface
)
50 and uses libsemanage to make persistent boolean changes.
53 include $(INCLUDE_DIR
)/host-build.mk
56 PAMH
=$(CONFIG_BUSYBOX_CONFIG_PAM
) \
57 PREFIX
=$(STAGING_DIR_HOSTPKG
) \
58 SBINDIR
=$(STAGING_DIR_HOSTPKG
)/sbin \
59 ETCDIR
=$(STAGING_DIR_HOSTPKG
)/etc
62 PAMH
=$(CONFIG_BUSYBOX_CONFIG_PAM
)
64 define Package
/policycoreutils
/install
65 $(INSTALL_DIR
) $(1)/sbin
66 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/sbin
/restorecon_xattr
$(1)/sbin
/restorecon_xattr
67 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/sbin
/restorecon
$(1)/sbin
/policycoreutils-restorecon
68 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/sbin
/setfiles
$(1)/sbin
/policycoreutils-setfiles
69 $(INSTALL_DIR
) $(1)/usr
/sbin
70 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/fixfiles
$(1)/usr
/sbin
/
71 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/genhomedircon
$(1)/usr
/sbin
/
72 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/open_init_pty
$(1)/usr
/sbin
/
73 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/run_init
$(1)/usr
/sbin
/
74 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/semodule
$(1)/usr
/sbin
/
75 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/load_policy
$(1)/usr
/sbin
/policycoreutils-load_policy
76 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/sestatus
$(1)/usr
/sbin
/policycoreutils-sestatus
77 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/setsebool
$(1)/usr
/sbin
/policycoreutils-setsebool
78 $(INSTALL_DIR
) $(1)/usr
/bin
79 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/* $(1)/usr
/bin
/
82 $(eval
$(call HostBuild
))
83 $(eval
$(call BuildPackage
,policycoreutils
))