-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
39 lines (33 loc) · 1.29 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
NAME = mysqlbackup
VERSION = 1.0.1
#
# Command to remove files, copy files and create directories.
#
# I've never encountered a *nix environment in which these commands do not work.
# So you can probably leave this as it is
#
RM = rm -f
CP = cp -f
MKDIR = mkdir -p
SYSTEMD_UNIT_DIR=/usr/lib/systemd/system
SYSCONFIG_DIR=/etc/sysconfig
install:
install -d -m 0750 $(DESTDIR)/etc/mysqlbackup
install -d -m 0750 $(DESTDIR)/etc/mysqlbackup.d
install -d -m 0755 $(DESTDIR)$(SYSCONFIG_DIR)
install -d -m 0755 $(DESTDIR)$(SYSTEMD_UNIT_DIR)
install -m 0644 mysqlbackup.timer $(DESTDIR)$(SYSTEMD_UNIT_DIR)
install -m 0644 mysqlbackup.service $(DESTDIR)$(SYSTEMD_UNIT_DIR)
install -D -m 0755 mysqlbackup.sh $(DESTDIR)/usr/sbin/mysqlbackup
install -m 0640 mysqlbackup.sysconfig $(DESTDIR)$(SYSCONFIG_DIR)/mysqlbackup
install -m 0640 my.cnf $(DESTDIR)/etc/mysqlbackup/
uninstall:
rm $(DESTDIR)$(SYSTEMD_UNIT_DIR)/mysqlbackup.timer
rm $(DESTDIR)$(SYSTEMD_UNIT_DIR)/mysqlbackup.service
rm $(DESTDIR)$(SYSCONFIG_DIR)/mysqlbackup
rm $(DESTDIR)/usr/sbin/mysqlbackup
rm -rf $(DESTDIR)/etc/mysqlbackup
rm -rf $(DESTDIR)/etc/mysqlbackup.d
dist:
tar --exclude-vcs-ignores --exclude-vcs --exclude=*tar.bz2 --transform 's,^\.,${NAME}-${VERSION},' -cjf ../${NAME}-${VERSION}.tar.bz2 .
cp ../${NAME}-${VERSION}.tar.bz2 .