-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
107 lines (89 loc) · 3.53 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
#!/usr/bin/make
# Zur Erstellung des Debian-Pakets notwendig (make DESTDIR=/root/sophomorix)
# Created by Rüdiger Beck (jeffbeck-at-web.de)
DESTDIR=
# Virtualbox
BIN=$(DESTDIR)/usr/bin
SBIN=$(DESTDIR)/usr/sbin
MENU=$(DESTDIR)/usr/share/menu
# configs
LEOCLIENTCONF=$(DESTDIR)/etc/leoclient2
VIRTCONF=$(DESTDIR)/etc/leovirtstarter2
USRSHAREDESKTOP=$(DESTDIR)/usr/share/leovirtstarter2/desktop
BIN=$(DESTDIR)/usr/bin
SBIN=$(DESTDIR)/usr/sbin
DESKTOP=$(DESTDIR)/usr/share/applications
ICON=$(DESTDIR)/usr/share/pixmaps
INIT=$(DESTDIR)/etc/init.d
ETC=$(DESTDIR)/etc/sudoers.d
help:
@echo ' '
@echo 'Most common options of this Makefile:'
@echo '-------------------------------------'
@echo ' '
@echo ' make help'
@echo ' show this help'
@echo ' '
@echo ' make leoclient2-leovirtstarter-client'
@echo ' install virtualbox gui to start machines'
@echo ' '
@echo ' make leoclient2-leovirtstarter-server'
@echo ' install preparation script on server'
@echo ' '
@echo ' make leoclient2-vm printer'
@echo ' install pdf-file splitter and spooler'
@echo ' '
@echo ' make deb'
@echo ' create a debian package'
@echo ' '
@echo ' make clean'
@echo ' clean up stuff created by packaging'
@echo ' '
default:
@echo 'Doing Nothing'
leoclient2-leovirtstarter-client:
@echo ' * Installing the client script'
@install -d -m0755 -oroot -groot $(BIN)
@install -oroot -groot --mode=0755 gui/leovirtstarter2 $(BIN)
@install -d -m0755 -oroot -groot $(SBIN)
@install -oroot -groot --mode=0700 installer-scripts/leoclient2-init $(SBIN)
@install -oroot -groot --mode=0700 installer-scripts/leoclient2-vm-move $(SBIN)
@install -oroot -groot --mode=0700 installer-scripts/leoclient2-base-snapshot-renew $(SBIN)
@echo ' * Installing the client configuration files'
@install -d -oroot -groot --mode=0755 $(LEOCLIENTCONF)/machines
@install -oroot -groot --mode=0644 conf/servers.conf $(LEOCLIENTCONF)
@echo ' * Installing sudoers stuff'
@install -d -m0644 -oroot -groot $(ETC)
@install -oroot -groot --mode=0440 sudoers/80-leoclient2 $(ETC)
@echo ' * Installing unity dash entry'
@install -d -m0755 -oroot -groot $(DESKTOP)
@install -oroot -groot --mode=0644 gui/leovirtstarter2.desktop $(DESKTOP)
@echo ' * Installing icon'
@install -d -m0755 -oroot -groot $(ICON)
@install -oroot -groot --mode=0644 gui/leovirtstarter2.png $(ICON)
leoclient2-leovirtstarter-server:
@echo ' * Installing the server script'
@install -d -m0755 -oroot -groot $(BIN)
@install -oroot -groot --mode=0755 gui/leovirtstarter2-server $(BIN)
@echo ' * Installing the server configuration file'
@install -d -m755 -oroot -groot $(VIRTCONF)
@install -oroot -groot --mode=0644 gui/leovirtstarter2-server.conf $(VIRTCONF)
# build a package
deb:
### deb
dpkg-buildpackage -tc -uc -us -sa -rfakeroot
@echo ''
@echo 'Do not forget to tag this version in git. Have you done a dch -i?'
@echo ''
clean:
rm -rf debian/leoclient2
leoclient2-vm-printer:
@echo ' * Installing printer scripts'
@install -d -m0755 -oroot -groot $(BIN)
@install -oroot -groot --mode=0755 printer/run-vm-printer2-splitter $(BIN)
@install -oroot -groot --mode=0755 printer/run-vm-printer2-spooler $(BIN)
@install -d -m755 -oroot -groot $(LEOCLIENTCONF)
@install -oroot -groot --mode=0644 printer/leoclient-vm-printer2.conf $(LEOCLIENTCONF)
@install -d -m755 -oroot -groot $(USRSHAREDESKTOP)
@install -oroot -groot --mode=0644 printer/leoclient2-spooler.desktop $(USRSHAREDESKTOP)
@install -oroot -groot --mode=0644 printer/leoclient2-splitter.desktop $(USRSHAREDESKTOP)