• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Installation directories.
2LINGUAS ?= ru
3PREFIX ?= /usr
4SBINDIR ?= $(PREFIX)/sbin
5MANDIR = $(PREFIX)/share/man
6ETCDIR ?= /etc
7
8CFLAGS ?= -Werror -Wall -W
9override CFLAGS += -D_FILE_OFFSET_BITS=64
10override LDLIBS += -lselinux
11
12all: sestatus
13
14sestatus: sestatus.o
15
16install: all
17	[ -d $(DESTDIR)$(MANDIR)/man8 ] || mkdir -p $(DESTDIR)$(MANDIR)/man8
18	[ -d $(DESTDIR)$(MANDIR)/man5 ] || mkdir -p $(DESTDIR)$(MANDIR)/man5
19	-mkdir -p $(DESTDIR)$(SBINDIR)
20	install -m 755 sestatus $(DESTDIR)$(SBINDIR)
21	install -m 644 sestatus.8 $(DESTDIR)$(MANDIR)/man8
22	install -m 644 sestatus.conf.5 $(DESTDIR)$(MANDIR)/man5
23	for lang in $(LINGUAS) ; do \
24		if [ -e $${lang} ] ; then \
25			[ -d $(DESTDIR)$(MANDIR)/$${lang}/man5 ] || mkdir -p $(DESTDIR)$(MANDIR)/$${lang}/man5 ; \
26			[ -d $(DESTDIR)$(MANDIR)/$${lang}/man8 ] || mkdir -p $(DESTDIR)$(MANDIR)/$${lang}/man8 ; \
27			install -m 644 $${lang}/*.5 $(DESTDIR)$(MANDIR)/$${lang}/man5/ ; \
28			install -m 644 $${lang}/*.8 $(DESTDIR)$(MANDIR)/$${lang}/man8/ ; \
29		fi ; \
30	done
31	-mkdir -p $(DESTDIR)$(ETCDIR)
32	install -m 644 sestatus.conf $(DESTDIR)$(ETCDIR)
33
34clean:
35	rm -f sestatus *.o
36
37indent:
38	../../scripts/Lindent $(wildcard *.[ch])
39
40relabel:
41