-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathMakefile
33 lines (28 loc) · 848 Bytes
/
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
MANDIR = $(DESTDIR)/usr/share/man/man1
LICENSEDIR = $(DESTDIR)/usr/share/licenses/lux
UDEVDIR = $(DESTDIR)/etc/udev/rules.d
BINDIR = $(DESTDIR)/usr/bin
PKGNAME = lux
SCRIPT = $(PKGNAME).sh
UDEVRULE = 99-$(PKGNAME).rules
MANPAGE = $(PKGNAME).1.gz
install: $(MANPAGE)
mkdir -p $(MANDIR)
mkdir -p $(LICENSEDIR)
mkdir -p $(UDEVDIR)
mkdir -p $(BINDIR)
chmod 644 $<
chmod 644 LICENSE
chmod 644 $(UDEVRULE)
chmod 755 $(SCRIPT)
cp $< $(MANDIR)/$<
cp LICENSE $(LICENSEDIR)/LICENSE
cp $(UDEVRULE) $(UDEVDIR)/$(UDEVRULE)
cp $(SCRIPT) $(BINDIR)/$(PKGNAME)
$(MANPAGE):
help2man -n 'Shell script to easily control brightness.' \
-N -h -h -v -v ./$(SCRIPT) | gzip - > $(MANPAGE)
uninstall:
$(RM) -r $(LICENSEDIR)
$(RM) $(MANDIR)/$(MANPAGE) $(UDEVDIR)/$(UDEVRULE) $(BINDIR)/$(PKGNAME)
.PHONY: install uninstall