2019-02-18 16:27:44 +00:00
|
|
|
PYTHON ?= python3
|
2014-09-10 19:01:28 +00:00
|
|
|
|
2008-08-19 19:30:36 +00:00
|
|
|
# Installation directories.
|
2023-08-14 12:57:37 +00:00
|
|
|
LINGUAS ?=
|
2018-02-14 09:57:10 +00:00
|
|
|
PREFIX ?= /usr
|
2008-08-19 19:30:36 +00:00
|
|
|
SBINDIR ?= $(PREFIX)/sbin
|
|
|
|
MANDIR = $(PREFIX)/share/man
|
2022-10-28 20:16:22 +00:00
|
|
|
PYTHONLIBDIR ?= $(shell $(PYTHON) -c "import sysconfig; print(sysconfig.get_path('purelib', vars={'platbase': '$(PREFIX)', 'base': '$(PREFIX)'}))")
|
2018-02-14 09:57:10 +00:00
|
|
|
PACKAGEDIR ?= $(PYTHONLIBDIR)
|
|
|
|
BASHCOMPLETIONDIR ?= $(PREFIX)/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
|
2018-02-14 09:57:10 +00:00
|
|
|
[ -d $(DESTDIR)$(MANDIR)/man8 ] || mkdir -p $(DESTDIR)$(MANDIR)/man8
|
|
|
|
-mkdir -p $(DESTDIR)$(SBINDIR)
|
|
|
|
install -m 755 semanage $(DESTDIR)$(SBINDIR)
|
|
|
|
install -m 644 *.8 $(DESTDIR)$(MANDIR)/man8
|
2018-12-25 15:25:05 +00:00
|
|
|
for lang in $(LINGUAS) ; do \
|
|
|
|
if [ -e $${lang} ] ; then \
|
|
|
|
[ -d $(DESTDIR)$(MANDIR)/$${lang}/man8 ] || mkdir -p $(DESTDIR)$(MANDIR)/$${lang}/man8 ; \
|
|
|
|
install -m 644 $${lang}/*.8 $(DESTDIR)$(MANDIR)/$${lang}/man8/ ; \
|
|
|
|
fi ; \
|
|
|
|
done
|
2018-02-14 09:57:10 +00:00
|
|
|
test -d $(DESTDIR)/$(PACKAGEDIR) || install -m 755 -d $(DESTDIR)/$(PACKAGEDIR)
|
2019-02-15 16:00:23 +00:00
|
|
|
install -m 644 seobject.py $(DESTDIR)/$(PACKAGEDIR)
|
2018-02-14 09:57:10 +00:00
|
|
|
-mkdir -p $(DESTDIR)$(BASHCOMPLETIONDIR)
|
|
|
|
install -m 644 $(BASHCOMPLETIONS) $(DESTDIR)$(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:
|