-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
51 lines (39 loc) · 1.21 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
prefix = /usr
VERSION?=0.0.0
SHELL := /bin/bash
all:
: # do nothing
build:
dub build
releasebuild:
source ~/dlang/ldc-1.38.0/activate && \
dub build --compiler=ldc2 --d-version=Release -b release
install:
install -D glusterdplus \
$(DESTDIR)$(prefix)/sbin/glusterdplus
install -m 700 -D extra/glusterdplus.service \
$(DESTDIR)/lib/systemd/system/glusterdplus.service
mkdir -p $(DESTDIR)/var/lib/glusterdplus
cp -r public $(DESTDIR)/var/lib/glusterdplus/
clean:
: # do nothing
distclean: clean
uninstall:
-rm -f $(DESTDIR)$(prefix)/sbin/glusterdplus
-rm -f $(DESTDIR)/lib/systemd/system/glusterdplus.service
dist:
rm -rf glusterdplus-$(VERSION)
mkdir glusterdplus-$(VERSION)
cp -r glusterdplus public views extra dub.json \
dub.selections.json Makefile source glusterdplus-$(VERSION)/
tar cvzf glusterdplus-$(VERSION).tar.gz glusterdplus-$(VERSION)
deb: debclean
VERSION=$(VERSION) $(MAKE) dist
cp -r debian glusterdplus-$(VERSION)/
cd glusterdplus-$(VERSION) && debmake -y && debuild -eVERSION=$(VERSION)
debclean:
rm -rf glusterdplus-dbgsym_*
rm -rf glusterdplus_*
repoclean: debclean
rm -rf *.tar.gz
.PHONY: all build install clean distclean uninstall dist deb debclean