-
-
Notifications
You must be signed in to change notification settings - Fork 31
Expand file tree
/
Copy pathMakefile
More file actions
34 lines (28 loc) · 1.71 KB
/
Makefile
File metadata and controls
34 lines (28 loc) · 1.71 KB
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
.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/netns@.service $(DESTDIR)/$(LIBDIR)/systemd/system/
install --owner=root --group=root --mode=644 services/netns-bridge@.service $(DESTDIR)/$(LIBDIR)/systemd/system/
install --owner=root --group=root --mode=644 services/netns-nat@.service $(DESTDIR)/$(LIBDIR)/systemd/system/
install --owner=root --group=root --mode=644 services/netns-tunnel@.service $(DESTDIR)/$(LIBDIR)/systemd/system/
install --owner=root --group=root --mode=644 services/netns-mvbr@.service $(DESTDIR)/$(LIBDIR)/systemd/system/
install --owner=root --group=root --mode=644 configs/netns $(DESTDIR)/etc/default/
install --owner=root --group=root --mode=644 configs/netns-nat $(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-nvbr@" || true
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/netns@.service
rm -f $(DESTDIR)/$(LIBDIR)/systemd/system/netns-bridge@.service
rm -f $(DESTDIR)/$(LIBDIR)/systemd/system/netns-nat@.service
rm -f $(DESTDIR)/$(LIBDIR)/systemd/system/netns-tunnel@.service
rm -f $(DESTDIR)/$(LIBDIR)/systemd/system/netns-mvbr@.service
rm -f $(DESTDIR)/usr/bin/chnetns
rm -f $(DESTDIR)/usr/sbin/netnsinit