selinux/policycoreutils/sestatus/Makefile
Aleksei Nikiforov 0445e65d83 Allow installing translated man pages
Signed-off-by: Aleksei Nikiforov <darktemplar@basealt.ru>
2019-01-28 12:03:57 +01:00

41 lines
1.2 KiB
Makefile

# Installation directories.
LINGUAS ?= ru
PREFIX ?= /usr
SBINDIR ?= $(PREFIX)/sbin
MANDIR = $(PREFIX)/share/man
ETCDIR ?= /etc
CFLAGS ?= -Werror -Wall -W
override CFLAGS += -D_FILE_OFFSET_BITS=64
override LDLIBS += -lselinux
all: sestatus
sestatus: sestatus.o
install: all
[ -d $(DESTDIR)$(MANDIR)/man8 ] || mkdir -p $(DESTDIR)$(MANDIR)/man8
[ -d $(DESTDIR)$(MANDIR)/man5 ] || mkdir -p $(DESTDIR)$(MANDIR)/man5
-mkdir -p $(DESTDIR)$(SBINDIR)
install -m 755 sestatus $(DESTDIR)$(SBINDIR)
install -m 644 sestatus.8 $(DESTDIR)$(MANDIR)/man8
install -m 644 sestatus.conf.5 $(DESTDIR)$(MANDIR)/man5
for lang in $(LINGUAS) ; do \
if [ -e $${lang} ] ; then \
[ -d $(DESTDIR)$(MANDIR)/$${lang}/man5 ] || mkdir -p $(DESTDIR)$(MANDIR)/$${lang}/man5 ; \
[ -d $(DESTDIR)$(MANDIR)/$${lang}/man8 ] || mkdir -p $(DESTDIR)$(MANDIR)/$${lang}/man8 ; \
install -m 644 $${lang}/*.5 $(DESTDIR)$(MANDIR)/$${lang}/man5/ ; \
install -m 644 $${lang}/*.8 $(DESTDIR)$(MANDIR)/$${lang}/man8/ ; \
fi ; \
done
-mkdir -p $(DESTDIR)$(ETCDIR)
install -m 644 sestatus.conf $(DESTDIR)$(ETCDIR)
clean:
rm -f sestatus *.o
indent:
../../scripts/Lindent $(wildcard *.[ch])
relabel: