2014-09-10 19:01:28 +00:00
|
|
|
PYTHON ?= python
|
|
|
|
|
2008-08-19 19:30:36 +00:00
|
|
|
# Installation directories.
|
2011-09-19 20:38:33 +00:00
|
|
|
PREFIX ?= $(DESTDIR)/usr
|
2008-08-19 19:30:36 +00:00
|
|
|
LIBDIR ?= $(PREFIX)/lib
|
|
|
|
SBINDIR ?= $(PREFIX)/sbin
|
|
|
|
MANDIR = $(PREFIX)/share/man
|
2014-09-10 19:01:28 +00:00
|
|
|
PYLIBVER ?= $(shell $(PYTHON) -c 'import sys;print("python%d.%d" % sys.version_info[0:2])')
|
2008-08-19 19:30:36 +00:00
|
|
|
PYTHONLIBDIR ?= $(LIBDIR)/$(PYLIBVER)
|
2013-10-11 12:33:47 +00:00
|
|
|
BASHCOMPLETIONDIR ?= $(DESTDIR)/usr/share/bash-completion/completions
|
2008-08-19 19:30:36 +00:00
|
|
|
|
|
|
|
TARGETS=semanage
|
|
|
|
|
2012-03-06 15:45:29 +00:00
|
|
|
BASHCOMPLETIONS=semanage-bash-completion.sh
|
|
|
|
|
2008-08-19 19:30:36 +00:00
|
|
|
all: $(TARGETS)
|
|
|
|
|
|
|
|
install: all
|
|
|
|
[ -d $(MANDIR)/man8 ] || mkdir -p $(MANDIR)/man8
|
|
|
|
-mkdir -p $(SBINDIR)
|
|
|
|
install -m 755 semanage $(SBINDIR)
|
2013-10-11 12:34:44 +00:00
|
|
|
install -m 644 *.8 $(MANDIR)/man8
|
2008-08-19 19:30:36 +00:00
|
|
|
test -d $(PYTHONLIBDIR)/site-packages || install -m 755 -d $(PYTHONLIBDIR)/site-packages
|
|
|
|
install -m 755 seobject.py $(PYTHONLIBDIR)/site-packages
|
2012-03-06 15:45:29 +00:00
|
|
|
-mkdir -p $(BASHCOMPLETIONDIR)
|
2013-10-11 12:33:47 +00:00
|
|
|
install -m 644 $(BASHCOMPLETIONS) $(BASHCOMPLETIONDIR)/semanage
|
2008-08-19 19:30:36 +00:00
|
|
|
|
2013-10-11 12:36:01 +00:00
|
|
|
test:
|
2014-09-10 19:01:28 +00:00
|
|
|
@$(PYTHON) test-semanage.py -a
|
2008-08-19 19:30:36 +00:00
|
|
|
clean:
|
|
|
|
|
|
|
|
indent:
|
|
|
|
|
|
|
|
relabel:
|