2013-01-11 19:23:09 +00:00
|
|
|
# Installation directories.
|
|
|
|
PREFIX ?= $(DESTDIR)/usr
|
|
|
|
SYSCONFDIR ?= $(DESTDIR)/etc/sysconfig
|
|
|
|
LIBDIR ?= $(PREFIX)/lib
|
|
|
|
BINDIR ?= $(PREFIX)/bin
|
|
|
|
SBINDIR ?= $(PREFIX)/sbin
|
2013-10-11 14:16:57 +00:00
|
|
|
DATADIR ?= $(PREFIX)/share
|
2013-01-11 19:23:09 +00:00
|
|
|
MANDIR ?= $(PREFIX)/share/man
|
|
|
|
LOCALEDIR ?= /usr/share/locale
|
|
|
|
PYTHON ?= /usr/bin/python
|
2013-10-11 14:16:57 +00:00
|
|
|
BASHCOMPLETIONDIR ?= $(DESTDIR)/usr/share/bash-completion/completions
|
2013-01-11 19:23:09 +00:00
|
|
|
SHAREDIR ?= $(PREFIX)/share/sandbox
|
2013-05-10 12:45:24 +00:00
|
|
|
override CFLAGS = -I$(PREFIX)/include -DPACKAGE="policycoreutils" -Wall -Werror -Wextra -W -DSHARED -shared
|
2013-01-11 19:23:09 +00:00
|
|
|
|
2013-10-11 12:33:47 +00:00
|
|
|
BASHCOMPLETIONS=sepolicy-bash-completion.sh
|
2013-01-11 19:23:09 +00:00
|
|
|
|
|
|
|
all: python-build
|
|
|
|
|
|
|
|
python-build: info.c search.c common.h policy.h policy.c
|
|
|
|
$(PYTHON) setup.py build
|
|
|
|
|
|
|
|
clean:
|
|
|
|
$(PYTHON) setup.py clean
|
|
|
|
-rm -rf build *~ \#* *pyc .#*
|
|
|
|
|
2013-10-11 14:16:57 +00:00
|
|
|
sepolgen:
|
|
|
|
ln -sf sepolicy sepolgen
|
|
|
|
|
2013-10-11 13:55:35 +00:00
|
|
|
test:
|
|
|
|
@python test_sepolicy.py -v
|
|
|
|
|
2013-01-11 19:23:09 +00:00
|
|
|
install:
|
|
|
|
$(PYTHON) setup.py install `test -n "$(DESTDIR)" && echo --root $(DESTDIR)`
|
|
|
|
[ -d $(BINDIR) ] || mkdir -p $(BINDIR)
|
|
|
|
install -m 755 sepolicy.py $(BINDIR)/sepolicy
|
2013-10-11 14:16:57 +00:00
|
|
|
(cd $(BINDIR); ln -sf sepolicy sepolgen)
|
2013-01-11 19:23:09 +00:00
|
|
|
-mkdir -p $(MANDIR)/man8
|
|
|
|
install -m 644 *.8 $(MANDIR)/man8
|
|
|
|
-mkdir -p $(BASHCOMPLETIONDIR)
|
2013-10-11 14:16:57 +00:00
|
|
|
install -m 644 $(BASHCOMPLETIONS) $(BASHCOMPLETIONDIR)/sepolicy
|
|
|
|
-mkdir -p $(DESTDIR)/etc/dbus-1/system.d/
|
|
|
|
install -m 644 org.selinux.conf $(DESTDIR)/etc/dbus-1/system.d/
|
|
|
|
-mkdir -p $(DESTDIR)/usr/share/dbus-1/system-services
|
|
|
|
install -m 644 org.selinux.service $(DESTDIR)/usr/share/dbus-1/system-services
|
|
|
|
-mkdir -p $(DESTDIR)/usr/share/polkit-1/actions/
|
|
|
|
install -m 644 org.selinux.policy $(DESTDIR)/usr/share/polkit-1/actions/
|
|
|
|
-mkdir -p $(DESTDIR)/usr/share/system-config-selinux
|
|
|
|
install -m 755 selinux_server.py $(DESTDIR)/usr/share/system-config-selinux
|
|
|
|
install -m 644 *.desktop $(DATADIR)/system-config-selinux
|
2013-10-23 16:43:15 +00:00
|
|
|
|
|
|
|
relabel:
|
2013-10-24 19:24:17 +00:00
|
|
|
|