summaryrefslogtreecommitdiffstats
path: root/rules/policycoreutils.make
blob: 0709f391103a3121f4c91359b8a904430047374e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
# -*-makefile-*-
#
# Copyright (C) 2012 by Wolfram Sang <w.sang@pengutronix.de>
#
# See CREDITS for details about who has contributed to this project.
#
# For further information about the PTXdist project and license conditions
# see the README file.
#

#
# We provide this package
#
PACKAGES-$(PTXCONF_POLICYCOREUTILS) += policycoreutils

#
# Paths and names
#
POLICYCOREUTILS_VERSION	:= 2.1.13
POLICYCOREUTILS_MD5	:= 97c0b828599fe608f37894989820d71d
POLICYCOREUTILS		:= policycoreutils-$(POLICYCOREUTILS_VERSION)
POLICYCOREUTILS_SUFFIX	:= tar.gz
POLICYCOREUTILS_URL	:= http://userspace.selinuxproject.org/releases/20120924/$(POLICYCOREUTILS).$(POLICYCOREUTILS_SUFFIX)
POLICYCOREUTILS_SOURCE	:= $(SRCDIR)/$(POLICYCOREUTILS).$(POLICYCOREUTILS_SUFFIX)
POLICYCOREUTILS_DIR	:= $(BUILDDIR)/$(POLICYCOREUTILS)
POLICYCOREUTILS_LICENSE	:= GPLv2+

# ----------------------------------------------------------------------------
# Prepare
# ----------------------------------------------------------------------------

POLICYCOREUTILS_CONF_TOOL := NO
POLICYCOREUTILS_MAKE_ENV := \
	$(CROSS_ENV) \
	CFLAGS="-O2 -Wall" \
	INOTIFYH="/usr/include/sys/inotify.h" \
	PAMH="" \
	AUDITH=""
POLICYCOREUTILS_MAKE_OPT := LIBDIR=$(PTXDIST_SYSROOT_TARGET)/usr/lib

#
# We don't have PAM or AUDIT, so turn off.
#
# Use the following to turn on:
# (Use these paths, as of version 2.1.13)
#
# PAMH=/usr/include/security/pam_appl.h
# AUDITH=/usr/include/libaudit.h
#

# ----------------------------------------------------------------------------
# Target-Install
# ----------------------------------------------------------------------------

$(STATEDIR)/policycoreutils.targetinstall:
	@$(call targetinfo)

	@$(call install_init, policycoreutils)
	@$(call install_fixup, policycoreutils,PRIORITY,optional)
	@$(call install_fixup, policycoreutils,SECTION,base)
	@$(call install_fixup, policycoreutils,AUTHOR,"Wolfram Sang <w.sang@pengutronix.de>")
	@$(call install_fixup, policycoreutils,DESCRIPTION,missing)

ifdef PTXCONF_POLICYCOREUTILS_AUDIT2ALLOW
	@$(call install_copy, policycoreutils, 0, 0, 0755, -, /usr/bin/audit2allow)
	@$(call install_copy, policycoreutils, 0, 0, 0755, -, /usr/bin/sepolgen-ifgen)
endif

ifdef PTXCONF_POLICYCOREUTILS_AUDIT2WHY
	@$(call install_copy, policycoreutils, 0, 0, 0755, -, /usr/bin/audit2why)
endif

ifdef PTXCONF_POLICYCOREUTILS_CHCAT
	@$(call install_copy, policycoreutils, 0, 0, 0755, -, /usr/bin/chcat)
endif

ifdef PTXCONF_POLICYCOREUTILS_FIXFILES
	@$(call install_copy, policycoreutils, 0, 0, 0755, -, /sbin/fixfiles)
endif

ifdef PTXCONF_POLICYCOREUTILS_GENHOMEDIRCON
	@$(call install_copy, policycoreutils, 0, 0, 0755, -, /usr/sbin/genhomedircon)
endif

ifdef PTXCONF_POLICYCOREUTILS_LOAD_POLICY
	@$(call install_copy, policycoreutils, 0, 0, 0755, -, /sbin/load_policy)
	@$(call install_link, policycoreutils, /sbin/load_policy, /usr/sbin/load_policy)
endif

ifdef PTXCONF_POLICYCOREUTILS_NEWROLE
	@$(call install_copy, policycoreutils, 0, 0, 0555, -, /usr/bin/newrole)
endif

ifdef PTXCONF_POLICYCOREUTILS_RESTORECOND
	@$(call install_copy, policycoreutils, 0, 0, 0755, -, /usr/sbin/restorecond)
endif

ifdef PTXCONF_POLICYCOREUTILS_RUN_INIT
	@$(call install_copy, policycoreutils, 0, 0, 0755, -, /usr/sbin/run_init)
	@$(call install_copy, policycoreutils, 0, 0, 0755, -, /usr/sbin/open_init_pty)
endif

ifdef PTXCONF_POLICYCOREUTILS_SANDBOX
	@$(call install_copy, policycoreutils, 0, 0, 0755, -, /usr/bin/sandbox)
	@$(call install_copy, policycoreutils, 0, 0, 4555, -, /usr/sbin/seunshare)
endif

ifdef PTXCONF_POLICYCOREUTILS_SECON
	@$(call install_copy, policycoreutils, 0, 0, 0755, -, /usr/bin/secon)
endif

ifdef PTXCONF_POLICYCOREUTILS_SEMANAGE
	@$(call install_copy, policycoreutils, 0, 0, 0755, -, /usr/sbin/semanage)
	@$(call install_copy, policycoreutils, 0, 0, 0644, -, $(PYTHON_SITEPACKAGES)/seobject.py)
endif

ifdef PTXCONF_POLICYCOREUTILS_SEMODULE
	@$(call install_copy, policycoreutils, 0, 0, 0755, -, /usr/sbin/semodule)
endif

ifdef PTXCONF_POLICYCOREUTILS_SEMODULE_DEPS
	@$(call install_copy, policycoreutils, 0, 0, 0755, -, /usr/bin/semodule_deps)
endif

ifdef PTXCONF_POLICYCOREUTILS_SEMODULE_EXPAND
	@$(call install_copy, policycoreutils, 0, 0, 0755, -, /usr/bin/semodule_expand)
endif

ifdef PTXCONF_POLICYCOREUTILS_SEMODULE_LINK
	@$(call install_copy, policycoreutils, 0, 0, 0755, -, /usr/bin/semodule_link)
endif

ifdef PTXCONF_POLICYCOREUTILS_SEMODULE_PACKAGE
	@$(call install_copy, policycoreutils, 0, 0, 0755, -, /usr/bin/semodule_package)
	@$(call install_copy, policycoreutils, 0, 0, 0755, -, /usr/bin/semodule_unpackage)
endif

ifdef PTXCONF_POLICYCOREUTILS_SEPOLGEN_IFGEN
	@$(call install_copy, policycoreutils, 0, 0, 0755, -, /usr/bin/sepolgen-ifgen-attr-helper)
endif

ifdef PTXCONF_POLICYCOREUTILS_SESTATUS
	@$(call install_copy, policycoreutils, 0, 0, 0755, -, /usr/sbin/sestatus)
endif

ifdef PTXCONF_POLICYCOREUTILS_SETFILES
	@$(call install_copy, policycoreutils, 0, 0, 0755, -, /sbin/setfiles)
	@$(call install_link, policycoreutils, setfiles, /sbin/restorecon)
endif

ifdef PTXCONF_POLICYCOREUTILS_SETSEBOOL
	@$(call install_copy, policycoreutils, 0, 0, 0755, -, /usr/sbin/setsebool)
endif

	@$(call install_alternative, policycoreutils, 0, 0, 0644, /etc/sestatus.conf)

	@$(call install_finish, policycoreutils)

	@$(call touch)

# vim: syntax=make