Home | History | Annotate | Download | only in sandbox
      1 PYTHON ?= python3
      2 
      3 # Installation directories.
      4 LINGUAS ?= ru
      5 PREFIX ?= /usr
      6 SYSCONFDIR ?= /etc/sysconfig
      7 BINDIR ?= $(PREFIX)/bin
      8 SBINDIR ?= $(PREFIX)/sbin
      9 MANDIR ?= $(PREFIX)/share/man
     10 SHAREDIR ?= $(PREFIX)/share/sandbox
     11 override CFLAGS += -DPACKAGE="\"policycoreutils\"" -Wall -Werror -Wextra -W
     12 override LDLIBS += -lselinux -lcap-ng
     13 SEUNSHARE_OBJS = seunshare.o
     14 
     15 all: sandbox seunshare sandboxX.sh start
     16 
     17 seunshare: $(SEUNSHARE_OBJS)
     18 
     19 install: all
     20 	-mkdir -p $(DESTDIR)$(BINDIR)
     21 	install -m 755 sandbox $(DESTDIR)$(BINDIR)
     22 	-mkdir -p $(DESTDIR)$(MANDIR)/man8
     23 	install -m 644 sandbox.8 $(DESTDIR)$(MANDIR)/man8/
     24 	install -m 644 seunshare.8 $(DESTDIR)$(MANDIR)/man8/
     25 	-mkdir -p $(DESTDIR)$(MANDIR)/man5
     26 	install -m 644 sandbox.5 $(DESTDIR)$(MANDIR)/man5/
     27 	for lang in $(LINGUAS) ; do \
     28 		if [ -e $${lang} ] ; then \
     29 			mkdir -p $(DESTDIR)$(MANDIR)/$${lang}/man5 ; \
     30 			mkdir -p $(DESTDIR)$(MANDIR)/$${lang}/man8 ; \
     31 			install -m 644 $${lang}/*.5 $(DESTDIR)$(MANDIR)/$${lang}/man5/ ; \
     32 			install -m 644 $${lang}/*.8 $(DESTDIR)$(MANDIR)/$${lang}/man8/ ; \
     33 		fi ; \
     34 	done
     35 	-mkdir -p $(DESTDIR)$(SBINDIR)
     36 	install -m 4755 seunshare $(DESTDIR)$(SBINDIR)/
     37 	-mkdir -p $(DESTDIR)$(SHAREDIR)
     38 	install -m 755 sandboxX.sh $(DESTDIR)$(SHAREDIR)
     39 	install -m 755 start $(DESTDIR)$(SHAREDIR)
     40 	-mkdir -p $(DESTDIR)$(SYSCONFDIR)
     41 	install -m 644 sandbox.conf $(DESTDIR)$(SYSCONFDIR)/sandbox
     42 
     43 test:
     44 	@$(PYTHON) test_sandbox.py -v
     45 
     46 clean:
     47 	-rm -f seunshare *.o *~
     48 
     49 indent:
     50 	../../scripts/Lindent $(wildcard *.[ch])
     51 
     52 relabel:
     53