Home | History | Annotate | Download | only in semanage
      1 PYTHON ?= python3
      2 
      3 # Installation directories.
      4 LINGUAS ?= ru
      5 PREFIX ?= /usr
      6 SBINDIR ?= $(PREFIX)/sbin
      7 MANDIR = $(PREFIX)/share/man
      8 PYTHONLIBDIR ?= $(shell $(PYTHON) -c "from distutils.sysconfig import *; print(get_python_lib(prefix='$(PREFIX)'))")
      9 PACKAGEDIR ?= $(PYTHONLIBDIR)
     10 BASHCOMPLETIONDIR ?= $(PREFIX)/share/bash-completion/completions
     11 
     12 TARGETS=semanage
     13 
     14 BASHCOMPLETIONS=semanage-bash-completion.sh 
     15 
     16 all: $(TARGETS)
     17 
     18 install: all
     19 	[ -d $(DESTDIR)$(MANDIR)/man8 ] || mkdir -p $(DESTDIR)$(MANDIR)/man8
     20 	-mkdir -p $(DESTDIR)$(SBINDIR)
     21 	install -m 755 semanage $(DESTDIR)$(SBINDIR)
     22 	install -m 644 *.8 $(DESTDIR)$(MANDIR)/man8
     23 	for lang in $(LINGUAS) ; do \
     24 		if [ -e $${lang} ] ; then \
     25 			[ -d $(DESTDIR)$(MANDIR)/$${lang}/man8 ] || mkdir -p $(DESTDIR)$(MANDIR)/$${lang}/man8 ; \
     26 			install -m 644 $${lang}/*.8 $(DESTDIR)$(MANDIR)/$${lang}/man8/ ; \
     27 		fi ; \
     28 	done
     29 	test -d $(DESTDIR)/$(PACKAGEDIR) || install -m 755 -d $(DESTDIR)/$(PACKAGEDIR)
     30 	install -m 644 seobject.py $(DESTDIR)/$(PACKAGEDIR)
     31 	-mkdir -p $(DESTDIR)$(BASHCOMPLETIONDIR)
     32 	install -m 644 $(BASHCOMPLETIONS) $(DESTDIR)$(BASHCOMPLETIONDIR)/semanage
     33 
     34 test:
     35 	@$(PYTHON) test-semanage.py -a
     36 clean:
     37 
     38 indent:
     39 
     40 relabel:
     41