Makefile in backup

at master

1# See LICENSE file for copyright and license information
2.POSIX:
3
4VERSION = 1.0.1-dev0
5
6DIST_SRC = \
7 Makefile \
8 backup.in \
9 backup.service \
10 backup.timer \
11 config \
12 LICENSE \
13 README
14
15PREFIX = /usr/local
16LIBEXECDIR = ${PREFIX}/libexec
17SYSCONFDIR = /etc
18
19all: build
20
21build: backup
22
23clean:
24 rm -f backup
25
26backup: backup.in
27 sed 's~{{ config_path }}~${SYSCONFDIR}/backup~' backup.in > backup
28
29install: build
30 install -Dm755 backup ${DESTDIR}${LIBEXECDIR}/backup/backup
31 install -Dm600 config ${DESTDIR}${SYSCONFDIR}/backup
32
33uninstall:
34 rm -f ${DESTDIR}${LIBEXECDIR}/backup/backup
35 rm -f ${DESTDIR}${SYSCONFDIR}/backup
36
37dist:
38 mkdir backup-${VERSION}
39 cp -r ${DIST_SRC} backup-${VERSION}
40 tar cf - backup-${VERSION} | gzip > backup-${VERSION}.tar.gz
41
42distclean:
43 rm -rf backup-*
44
45.PHONY: all build clean install uninstall dist distclean