]> arthur.barton.de Git - servertools.macosx.git/blob - Makefile
41c9d0889c667477bc7e11c6cbec8ae0da7e5238
[servertools.macosx.git] / Makefile
1 #
2 # servertools.macosx Makefile
3 # Copyright (c)2008,2009 Barton IT-Consulting, Alexander Barton
4 #
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2 of the License, or
8 # (at your option) any later version.
9 # This program is distributed in the hope that it will be useful, but
10 # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
11 # or FITNESS FOR A PARTICULAR PURPOSE.
12 # See the GNU General Public License for more details.
13 #
14
15 NAME = "servertools.macosx"
16
17 TOOLS = odbackup
18
19 PREFIX = /usr/local
20
21 all: $(TOOLS)
22
23 clean:
24
25 distclean: clean
26
27 maintainer-clean: distclean
28
29 install: all install-odbackup
30
31 check: all
32
33 dist:
34         COPYFILE_DISABLE=true tar cvzf $(NAME)-`date +%Y%m%d`.tar.gz \
35          --exclude ".git*" --exclude "*.tar.gz" --exclude "*.tgz" \
36          --exclude "._*" --exclude "*~" --exclude "*.bak" \
37          -C .. `basename $$PWD`
38
39
40 distcheck: check dist
41
42 odbackup:
43
44 install-odbackup:
45         mkdir -p $(PREFIX)/sbin
46         install -c -m 755 -o root -g wheel \
47          odbackup/odbackup $(PREFIX)/sbin
48         launchctl list de.maccc.odbackup >/dev/null 2>&1 \
49          && launchctl unload -w /Library/LaunchDaemons/de.maccc.odbackup.plist \
50          || true
51         install -c -m 644 -o root -g wheel \
52          odbackup/de.maccc.odbackup.plist /Library/LaunchDaemons
53         [ -x /usr/sbin/slapconfig ] \
54          && launchctl load -w /Library/LaunchDaemons/de.maccc.odbackup.plist \
55          || echo "\n *** 'slapconfig' not found, not enabling odbackup!\n"
56
57 .PHONY: all clean distclean maintainer-clean install check dist distcheck \
58          $(TOOLS)