-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.in
30 lines (30 loc) · 1.01 KB
/
Makefile.in
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
# For building the delux binary
all:
gcc -O3 delux.c -o delux
chmod 755 delux
@echo "Compilation done. Run \`make install\` to install delux"
install:
@echo "Run this *after* you run \`make\` to compile the binary"
@echo "Note: this operation requires root privileges"
mkdir -p /usr/local/etc/delux
mkdir -p /usr/local/sbin
cp delux delux.legacy /usr/local/sbin/
cp luxtab.csv /usr/local/etc/delux/
cp init.d/deluxd /etc/init.d/
chown -R root: /usr/local/etc/delux
chown root: /etc/init.d/deluxd
chown root: /usr/local/sbin/delux /usr/local/sbin/delux.legacy
@echo "Creating pseudo-device /dev/pals"
touch /dev/pals
enable:
@echo "Adding deluxd script to rc.local"
@echo "Note: this operation requires root privileges"
sed -i "/exit/d" /etc/rc.local
echo "/etc/init.d/deluxd start" >> /etc/rc.local
echo "exit 0" >> /etc/rc.local
disable:
@echo "Removing deluxd script from rc.local"
@echo "Note: this operation requires root privileges"
sed -i "/\/etc\/init.d\/deluxd/d" /etc/rc.local
clean:
rm -f delux