-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
59 lines (49 loc) · 1.4 KB
/
Makefile
File metadata and controls
59 lines (49 loc) · 1.4 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
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
SHELL = /bin/sh
.SUFFIXES: .sh .desktop
DEPS = wget git notify-send gzip
all: checkdep manpage
# Check dependencies
checkdep:
echo
echo "Checking dependencies:"
$(foreach dep, $(DEPS), if ! which $(dep) ; then \
echo; echo "$(dep) not installed"; exit 1; fi; )
echo "OK"
# Make the manpage
manpage:
cp ./manpage.man ./bitsnet.1
gzip --force ./bitsnet.1
# Install all of this
install: all
echo
echo "Creating directories"
mkdir -p $(DESTDIR)/usr/local/lib/bitsnet
mkdir -p $(DESTDIR)/usr/local/etc
mkdir -p $(DESTDIR)/usr/local/bin
mkdir -p $(DESTDIR)/usr/local/man/man1
mkdir -p $(DESTDIR)/usr/local/share/applications
mkdir -p $(DESTDIR)$(HOME)/.config/autostart
echo "OK"
echo
echo "Copying files"
cp ./util.sh $(DESTDIR)/usr/local/lib/bitsnet/util.sh
cp ./rc.config $(DESTDIR)/usr/local/etc/bitsnetrc
cp ./bitsnet $(DESTDIR)/usr/local/bin/bitsnet
cp ./bitsnet.1.gz $(DESTDIR)/usr/local/man/man1/
cp ./app.desktop $(DESTDIR)/usr/local/share/applications/bitsnet.desktop
echo "OK"
uninstall:
echo
echo "Removing files"
rm -f $(DESTDIR)/usr/local/lib/bitsnet/util.sh
rmdir $(DESTDIR)/usr/local/lib/bitsnet
rm -f $(DESTDIR)/usr/local/etc/bitsnetrc
rm -f $(DESTDIR)/usr/local/bin/bitsnet
rm -f $(DESTDIR)/usr/local/man/man1/bitsnet.1.gz
rm -f $(DESTDIR)/usr/local/share/applications/bitsnet.desktop
echo "OK."
# Clean the working directory
.PHONY: clean
.SILENT:
clean:
rm -rf bitsnet.1*