forked from rcrowley/debra
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.in
75 lines (68 loc) · 1.8 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
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
prefix=@prefix@
exec_prefix=@exec_prefix@
bindir=@bindir@
sbindir=@sbindir@
libexecdir=@libexecdir@
sysconfdir=@sysconfdir@
sharedstatedir=@sharedstatedir@
localstatedir=@localstatedir@
libdir=@libdir@
includedir=@includedir@
oldincludedir=@oldincludedir@
datarootdir=@datarootdir@
datadir=@datadir@
infodir=@infodir@
localedir=@localedir@
mandir=@mandir@
docdir=@docdir@
htmldir=@htmldir@
dvidir=@dvidir@
pdfdir=@pdfdir@
psdir=@psdir@
INSTALL=@INSTALL@
AWK=@AWK@
GREP=@GREP@
GIT=@GIT@
GZIP=@GZIP@
VERSION=$(shell $(GREP) Version control | $(AWK) '{print $$2}')
all:
@true
install:
$(INSTALL) -d $(DESTDIR)$(bindir)
$(INSTALL) \
bin/debra bin/debra-* \
bin/sourceinstall \
$(DESTDIR)$(bindir)/
$(INSTALL) -d $(DESTDIR)$(mandir)/man1
$(INSTALL) -m644 \
man/man1/debra.1.gz \
man/man1/debra-*.1.gz \
man/man1/sourceinstall.1.gz \
$(DESTDIR)$(mandir)/man1/
$(INSTALL) -d $(DESTDIR)$(datarootdir)/debra
$(INSTALL) install-sh $(DESTDIR)$(datarootdir)/debra/
$(INSTALL) -m644 configure.ac.patch $(DESTDIR)$(datarootdir)/debra/
uninstall:
rm -f \
$(DESTDIR)$(bindir)/debra \
$(DESTDIR)$(bindir)/debra-* \
$(DESTDIR)$(bindir)/sourceinstall \
$(DESTDIR)$(mandir)/man1/debra.1.gz \
$(DESTDIR)$(mandir)/man1/debra-*.1.gz \
$(DESTDIR)$(mandir)/man1/sourceinstall.1.gz \
$(DESTDIR)$(datarootdir)/debra/install-sh \
$(DESTDIR)$(datarootdir)/debra/configure.ac.patch
rmdir $(DESTDIR)$(datarootdir)/debra
deb:
ifeq (root, $(shell whoami))
bin/debra create debian control
$(GIT) archive --prefix=debian/ HEAD | $(GZIP) >debian.tar.gz
bin/debra sourceinstall debian debian.tar.gz -p /usr
rm debian.tar.gz
chown -R root:root debian
bin/debra build debian debra_$(VERSION)_all.deb
bin/debra destroy debian
else
@echo "You must be root to build a Debian package."
endif
.PHONY: all install uninstall man deb