-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
31 lines (26 loc) · 807 Bytes
/
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
.PHONY:wuzei
GOPATH = $(PWD)/build:$(PWD)/Godeps/_workspace
export GOPATH
URL = github.com/thesues
REPO = radoshttpd
URLPATH = $(PWD)/build/src/$(URL)
LOGPATH=$$DESTDIR/var/log/wuzei
PIDPATH=$$DESTDIR/var/run/wuzei
wuzei:
@[ -d $(URLPATH) ] || mkdir -p $(URLPATH)
@ln -nsf $(PWD) $(URLPATH)/$(REPO)
go install $(URL)/$(REPO)/wuzei
install:
@[ -d $(LOGPATH) ]|| mkdir -p $(LOGPATH)
@[ -d $(PIDPATH) ]|| mkdir -p $(PIDPATH)
install -D build/bin/wuzei $$DESTDIR/usr/bin/wuzei
install -d -m 755 $$DESTDIR/etc/wuzei
install -p -D -m 640 package/wuzei.json $$DESTDIR/etc/wuzei/
install -m 0755 scripts/wuzei.sh -D $$DESTDIR/etc/init.d/wuzei
install -D -m 0644 scripts/wuzei.logrotate $$DESTDIR/etc/logrotate.d/wuzei
clean:
rm -fr rpm-build
rm -rf build
rm -rf *.rpm
rpm:
sh package/rpmbuild.sh