-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathMakefile
47 lines (37 loc) · 1.1 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
# Noddy Makefile for dist
# $Id$
VERSION = 0.18
bindir = /usr/sbin
sysconfdir = /etc
docdir = /usr/share/doc/tenshi-${VERSION}
mandir = /usr/share/man
libdir = /var/lib/tenshi
DOCS = README.md LICENSE Changelog
SAMPLES = tenshi.conf tenshi.debian-init tenshi.openrc-init
BIN = Makefile tenshi
MAN = tenshi.8
DIST_DIR = tenshi-${VERSION}
TARBALL = tenshi-${VERSION}.tar.gz
FILES = ${DOCS} ${SAMPLES} ${BIN} ${MAN}
all: ${FILES}
clean:
rm -rf tenshi-*.tar.gz
dist: ${TARBALL}
${TARBALL}:
mkdir -p ${DIST_DIR}
cp ${FILES} ${DIST_DIR}
tar czvf tenshi-${VERSION}.tar.gz ${DIST_DIR}
rm -rf ${DIST_DIR}
install:
mkdir -p ${DESTDIR}${bindir}
install tenshi ${DESTDIR}${bindir}/tenshi
if [ ! -f ${DESTDIR}${sysconfdir}/tenshi/tenshi.conf ]; then \
mkdir -p ${DESTDIR}${sysconfdir}/tenshi && \
install -m 0644 tenshi.conf ${DESTDIR}${sysconfdir}/tenshi/tenshi.conf; \
fi
install -d ${DESTDIR}${docdir}
install -m 0644 ${DOCS} ${DESTDIR}${docdir}/
[ -d ${DESTDIR}${mandir}/man8 ] || \
install -d ${DESTDIR}${mandir}/man8
install -m 0644 tenshi.8 ${DESTDIR}${mandir}/man8/
install -m 755 -d ${DESTDIR}${libdir}