-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathMakefile
More file actions
31 lines (28 loc) · 739 Bytes
/
Makefile
File metadata and controls
31 lines (28 loc) · 739 Bytes
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
CFGDIR = $(DESTDIR)/etc
HOOKDIR = $(DESTDIR)/usr/share/libalpm/hooks
BINDIR = $(DESTDIR)/opt/pug
.PHONY: install
install:
@mkdir -p $(CFGDIR)
@mkdir -p $(HOOKDIR)
@mkdir -p $(BINDIR)
@mkdir -p $(DESTDIR)/root
@chmod 750 $(DESTDIR)/root
@touch $(CFGDIR)/pug
@if test -r /etc/pug.bkp; then cat /etc/pug.bkp > $(CFGDIR)/pug; fi
@chmod 644 $(CFGDIR)/pug
@cp src/pug.sh $(BINDIR)
@chmod 755 $(BINDIR)/pug.sh
@sh $(BINDIR)/pug.sh $(DESTDIR)
@cp src/pug.hook $(HOOKDIR)
@chmod 644 $(HOOKDIR)/pug.hook
.PHONY: uninstall
uninstall:
$(RM) $(CFGDIR)/pug
$(RM) $(HOOKDIR)/pug.hook
$(RM) $(DESTDIR)/root/.gist
$(RM) $(BINDIR)/pug.sh
.PHONY: distclean
distclean: uninstall
$(RM) $(CFGDIR)/pug.bkp
$(RM) $(DESTDIR)/root/.gist.bkp