-
Notifications
You must be signed in to change notification settings - Fork 17
/
Makefile
43 lines (35 loc) · 1.26 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
DESTDIR=
sbindir=/usr/sbin
sysconfdir=/usr/etc/polkit-default-privs
profiledir=$(sysconfdir)/profiles
fillupdir=/var/adm/fillup-templates
mandir=/usr/share/man
docdir=/usr/share/doc/packages
manpages = man/set_polkit_default_privs.8 man/polkit-default-privs.5
all: mans
mans: $(manpages)
.adoc.8 .adoc.5:
a2x -f manpage $<
clean:
rm -f man/*.{5,8}
install:
install -d $(DESTDIR)$(sbindir) $(DESTDIR)$(sysconfdir) $(DESTDIR)$(fillupdir) $(DESTDIR)$(profiledir)
install -d $(DESTDIR)$(docdir)/polkit-default-privs
install -m 755 src/set_polkit_default_privs $(DESTDIR)$(sbindir)
install -m 755 src/chkstat-polkit $(DESTDIR)$(sbindir)
install -m 644 profiles/* $(DESTDIR)$(profiledir)
install -m 644 etc/local.template $(DESTDIR)$(sysconfdir)
install -m 644 etc/sysconfig.security-polkit_default_privs $(DESTDIR)$(fillupdir)
# create a safe directory for potential custom profiles
install -d $(DESTDIR)/etc/polkit-default-privs
install -m 644 README.md $(DESTDIR)$(docdir)/polkit-default-privs
@for src in $(manpages); do \
page=`basename $$src` \
s=$${src##*.}; \
install -d -m 755 $(DESTDIR)$(mandir)/man$$s; \
set -- install -m 644 $$src $(DESTDIR)$(mandir)/man$$s/$$page; \
echo $$@; \
"$$@"; \
done
.SUFFIXES: .8 .5 .adoc
.PHONY: all mans install package