-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
45 lines (33 loc) · 1017 Bytes
/
Makefile
File metadata and controls
45 lines (33 loc) · 1017 Bytes
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
#!/usr/bin/env make
PWAIT_VERSION = 1.4
PWAIT_DIR = pwait-$(PWAIT_VERSION)
prefix ?= /usr/local
exec_prefix = ${prefix}
bindir = ${exec_prefix}/bin
DESTDIR =
CFLAGS += -DPWAIT_VERSION=\"$(PWAIT_VERSION)\"
pwait: pwait.o
$(CC) -o $@ $+
.PHONY: install
install: pwait
@mkdir -p $(DESTDIR)$(bindir)
install pwait -s -m 0555 -o root -g root -t $(DESTDIR)$(bindir)
@setcap cap_net_admin=ep $(DESTDIR)$(bindir)/pwait
.PHONY: dist fulldist pwait_dir postdist
pwait_dir: clean
@mkdir $(PWAIT_DIR)
allfiles:
@cp -a pwait.c debian LICENSE DISCLAIMER README.md Makefile $(PWAIT_DIR)
debfiles:
@cp -a pwait.c LICENSE DISCLAIMER README.md Makefile $(PWAIT_DIR)
dist: pwait_dir allfiles tardist
sha1sum $(PWAIT_DIR).tgz > $(PWAIT_DIR).tgz.sha1sum
debdist: pwait_dir debfiles tardist
mv $(PWAIT_DIR).tgz ../pwait_$(PWAIT_VERSION).orig.tar.gz
tardist:
tar -czvf $(PWAIT_DIR).tgz $(PWAIT_DIR)
@rm -rf $(PWAIT_DIR)
clean:
rm -rf *.o pwait *.tgz *.sha1sum $(PWAIT_DIR) debian/pwait
deb: debdist
debuild -us -uc