-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
36 lines (29 loc) · 1.14 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
#!/usr/bin/make -f
PACKAGE=myback
SRCTOP := $(shell if [ "$$PWD" != "" ]]; then echo $$PWD; else pwd; fi)
DESTDIR= $(SRCTOP)/debian/$(PACKAGE)
APPDIR=$(DESTDIR)/opt/$(PACKAGE)
APPLIBDIR=$(APPDIR)/lib
APPCONFDIR=$(APPDIR)/etc
APPBINDIR=$(APPDIR)/bin
DATADIR=$(DESTDIR)/var/lib/$(PACKAGE)
MANDIR=$(DESTDIR)/usr/share/man/man8
LOGROTATEDIR=$(DESTDIR)/etc/logrotate.d
build:
install:clean
install -d $(SYSCONFIGDIR) $(DATADIR) $(MANDIR) $(APPBINDIR) $(APPDIR) $(APPLIBDIR) $(APPCONFDIR) $(LOGROTATEDIR)
cp -pRl docs/* $(DOCSDIR)/
cp -pR data/* $(DATADIR)/
install -pm 0755 bin/$(PACKAGE).pl $(APPBINDIR)/$(PACKAGE)
install -pm 0755 bin/$(PACKAGE)-glacier.pl $(APPBINDIR)/$(PACKAGE)-glacier
install -pm 0755 bin/$(PACKAGE)-hostcfg.pl $(APPBINDIR)/$(PACKAGE)-hostcfg
cp -pRl lib/* $(APPLIBDIR)/
cp -pRl etc/* $(APPCONFDIR)
install -pm 0644 install_files/$(PACKAGE)-logrotate $(LOGROTATEDIR)/$(PACKAGE)
pod2man bin/$(PACKAGE).pl $(MANDIR)/$(PACKAGE).8
pod2man bin/$(PACKAGE)-glacier.pl $(MANDIR)/$(PACKAGE)-glacier.8
pod2man bin/$(PACKAGE)-hostcfg.pl $(MANDIR)/$(PACKAGE)-hostcfg.8
binary-indep: install
binary: binary-indep
clean:
rm -Rf $(DESTDIR)