/
rules
executable file
·126 lines (105 loc) · 3.12 KB
/
rules
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
#!/usr/bin/make -f
# -*- makefile -*-
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
PYTHON_SITELIB=$(/usr/bin/python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")
PYBASEVER=$(/usr/bin/python -c "import sys ; print sys.version[0:3]")
PYTHON=/usr/bin/python
PLUGINDIR=/usr/share/holland/plugins
BACKUPDIR=/var/spool/holland
LOGDIR=/var/log/holland
CONFDIR=/etc/holland
DESTDIR=$(CURDIR)/debian/holland
BINDIR=/usr/bin
SBINDIR=/usr/sbin
configure: configure-stamp
configure-stamp:
dh_testdir
touch configure-stamp
build: build-stamp
build-stamp: configure-stamp
dh_testdir
touch $@
clean:
dh_testdir
dh_testroot
rm -f build-stamp configure-stamp
dh_clean
install: build
dh_testdir
dh_testroot
dh_prep
dh_installdirs
mkdir -p $(DESTDIR) \
$(DESTDIR)$(CONFDIR) \
$(DESTDIR)$(SBINDIR) \
$(DESTDIR)$(PLUGINDIR)
find ./ -name setup.cfg -exec rm -f {} \;
sed -i 's/^backupsets = default/backupsets = /g' $(CURDIR)/config/holland.conf
cd $(CURDIR)/holland-core && \
$(PYTHON) setup.py install \
--prefix=/usr \
--root=$(CURDIR)/debian/holland \
--install-scripts=$(SBINDIR) \
--install-layout=deb
install -m 0640 $(CURDIR)/config/holland.conf \
$(DESTDIR)$(CONFDIR)/holland.conf
cd $(CURDIR)
# addons
cat debian/activeaddons | while read full_name short_name; do \
cd addons/$$full_name ; \
$(PYTHON) setup.py install \
--prefix=/usr \
--root=$(CURDIR)/debian/holland-$$short_name \
--install-scripts=$(SBINDIR) ; \
cd .. ; \
done
# plugins
cat debian/activeplugins | while read full_name short_name; do \
mkdir -p debian/holland-$$short_name$(PLUGINDIR) ; \
if [ -e $(CURDIR)/config/providers/$$short_name.conf ]; then \
mkdir -p $(CURDIR)/debian/holland-$$short_name$(CONFDIR)/providers ; \
install -m 0640 $(CURDIR)/config/providers/$$short_name.conf $(CURDIR)/debian/holland-$$short_name$(CONFDIR)/providers/$$short_name.conf ; \
fi ; \
if [ -e $(CURDIR)/config/backupsets/examples/$$short_name.conf ]; then \
mkdir -p $(CURDIR)/debian/holland-$$short_name$(CONFDIR)/backupsets/examples ; \
install -m 0640 $(CURDIR)/config/backupsets/examples/$$short_name.conf $(CURDIR)/debian/holland-$$short_name$(CONFDIR)/backupsets/examples/$$short_name.conf ; \
fi ; \
cd $(CURDIR)/plugins/$$full_name ; \
$(PYTHON) setup.py bdist_egg -d $(CURDIR)/debian/holland-$$short_name$(PLUGINDIR) ; \
cd .. ; \
done
# put holland.lib.mysql under the common package
mv $(CURDIR)/debian/holland-mysql$(PLUGINDIR)/*.egg $(CURDIR)/debian/holland-common$(PLUGINDIR)
binary-indep: install
binary-arch: install
dh_testdir
dh_testroot
dh_installchangelogs
dh_installdocs
dh_installexamples
# dh_install
# dh_installmenu
# dh_installdebconf
# dh_installlogrotate
# dh_installemacsen
# dh_installpam
# dh_installmime
# dh_python
# dh_installinit
# dh_installcron
# dh_installinfo
dh_installman
dh_link
dh_strip
dh_compress
dh_fixperms
# dh_perl
# dh_makeshlibs
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install configure