forked from dlenski/create_ap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
25 lines (22 loc) · 1.32 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
PREFIX=/usr
MANDIR=$(PREFIX)/share/man
BINDIR=$(PREFIX)/bin
all:
@echo "Run 'make install' for installation."
@echo "Run 'make uninstall' for uninstallation."
install:
install -Dm755 create_ap $(DESTDIR)$(BINDIR)/create_ap
install -Dm644 --backup=existing --suffix=.orig create_ap.conf $(DESTDIR)/etc/create_ap.conf
[ ! -d /lib/systemd/system ] || install -Dm644 create_ap.service $(DESTDIR)$(PREFIX)/lib/systemd/system/create_ap.service
[ ! -d /lib/systemd/system-sleep ] || install -Dm755 create_ap.resume $(DESTDIR)/lib/systemd/system-sleep/create_ap.resume
[ ! -e /sbin/openrc-run ] || install -Dm755 create_ap.openrc $(DESTDIR)/etc/init.d/create_ap
install -Dm644 bash_completion $(DESTDIR)$(PREFIX)/share/bash-completion/completions/create_ap
install -Dm644 README.md $(DESTDIR)$(PREFIX)/share/doc/create_ap/README.md
uninstall:
rm -f $(DESTDIR)$(BINDIR)/create_ap
rm -f $(DESTDIR)/etc/create_ap.conf
[ ! -f /lib/systemd/system/create_ap.service ] || rm -f $(DESTDIR)$(PREFIX)/lib/systemd/system/create_ap.service
[ ! -f /lib/systemd/system-sleep/create_ap.resume ] || rm -f $(DESTDIR)$(PREFIX)/lib/systemd/system/create_ap.resume
[ ! -e /sbin/openrc-run ] || rm -f $(DESTDIR)/etc/init.d/create_ap
rm -f $(DESTDIR)$(PREFIX)/share/bash-completion/completions/create_ap
rm -f $(DESTDIR)$(PREFIX)/share/doc/create_ap/README.md