forked from Jamesits/systemd-named-netns
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
30 lines (24 loc) · 1.4 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
.PHONY: all install uninstall
LIBDIR ?= /usr/lib
all:
install:
install --directory $(DESTDIR)/$(LIBDIR)/systemd/system $(DESTDIR)/etc/default $(DESTDIR)/usr/bin $(DESTDIR)/usr/sbin
install --owner=root --group=root --mode=644 services/[email protected] $(DESTDIR)/$(LIBDIR)/systemd/system/
install --owner=root --group=root --mode=644 services/[email protected] $(DESTDIR)/$(LIBDIR)/systemd/system/
install --owner=root --group=root --mode=644 services/[email protected] $(DESTDIR)/$(LIBDIR)/systemd/system/
install --owner=root --group=root --mode=644 services/[email protected] $(DESTDIR)/$(LIBDIR)/systemd/system/
install --owner=root --group=root --mode=644 configs/netns $(DESTDIR)/etc/default/
install --owner=root --group=root --mode=755 scripts/chnetns $(DESTDIR)/usr/bin/
install --owner=root --group=root --mode=755 scripts/netnsinit $(DESTDIR)/usr/sbin/
systemctl daemon-reload || true
uninstall:
systemctl disable --now "netns-tunnel@" || true
systemctl disable --now "netns-bridge@" || true
systemctl disable --now "netns-nat@" || true
systemctl disable --now "netns@" || true
rm -f $(DESTDIR)/$(LIBDIR)/systemd/system/[email protected]
rm -f $(DESTDIR)/$(LIBDIR)/systemd/system/[email protected]
rm -f $(DESTDIR)/$(LIBDIR)/systemd/system/[email protected]
rm -f $(DESTDIR)/$(LIBDIR)/systemd/system/[email protected]
rm -f $(DESTDIR)/usr/bin/chnetns
rm -f $(DESTDIR)/usr/sbin/netnsinit