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
dist_release := $(shell lsb_release -cs)
ifneq ($(dist_release),dapper)
use_pycentral = yes
endif
-include /usr/share/python/python.mk
ifeq (,$(py_sitename))
py_sitename = site-packages
py_libdir = /usr/lib/python$(subst python,,$(1))/site-packages
py_sitename_sh = $(py_sitename)
py_libdir_sh = $(py_libdir)
endif
package = landscape-client
root_dir = debian/tmp/
revision = $(shell dpkg-parsechangelog | grep ^Version | cut -f 2 -d " "| cut -f 2 -d "-")
landscape_common_substvars = debian/landscape-common.substvars
landscape_client_substvars = debian/landscape-client.substvars
build: build-stamp
build-stamp:
dh_testdir
sed -i -e "s/^DEBIAN_REVISION = \"\"/DEBIAN_REVISION = \"-$(revision)\"/g" landscape/__init__.py
python setup.py build
make -C smart-update
touch build-stamp
clean:
dh_testdir
dh_testroot
rm -f build-stamp
rm -rf build
make -C smart-update clean
dh_clean
debconf-updatepo
sed -i -e "s/^DEBIAN_REVISION = .*/DEBIAN_REVISION = \"\"/g" landscape/__init__.py
install: build
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs \
etc/landscape \
var/lib/landscape \
var/log/landscape \
usr/share/landscape
python setup.py install --root $(root_dir) $(py_setup_install_args)
install -D -o root -g root -m 755 debian/landscape-sysinfo.wrapper $(root_dir)/usr/share/landscape/landscape-sysinfo.wrapper
install -D -o root -g root -m 644 debian/cloud-default.conf $(root_dir)/usr/share/landscape/cloud-default.conf
install -D -o root -g root -m 755 smart-update/smart-update $(root_dir)/usr/lib/landscape/smart-update
install -D -o root -g root -m 644 dbus/landscape.conf $(root_dir)/etc/dbus-1/system.d/landscape.conf
binary-indep:
# do nothing
#
binary-arch: build install
# That's not present in Ubuntu releases we still support, so
# we're just installing the lintian overrides file by hand
# for now.
#dh_lintian
dh_testdir
dh_testroot
dh_installdocs
dh_installman -p landscape-client man/landscape-client.1 man/landscape-config.1 man/landscape-message.1
dh_installchangelogs
dh_install --sourcedir debian/tmp/
dh_installinit -- start 45 2 3 4 5 . stop 15 1 .
dh_installlogrotate
dh_installdebconf
dh_compress
dh_fixperms
ifneq (,$(findstring $(dist_release),"dapper"))
# We need python2.4-pysqlite2 and a non-buggy libcurl3-gnutls on dapper
echo "extra:Depends=python2.4-pysqlite2, libcurl3-gnutls (>= 7.15.1-1ubuntu3), python-smartpm (>= 1.1.1~bzr20081010-0ubuntu1.6.06.0), python2.4-dbus" >> $(landscape_common_substvars)
echo "extra:Depends=python2.4-pycurl" >> $(landscape_client_substvars)
endif
ifneq (,$(findstring $(dist_release),"hardy"))
# We want the smart 1.1.1 from the Landscape repository on hardy
echo "extra:Depends=python-smartpm (>= 1.1.1~bzr20081010-0ubuntu1.8.04.1), python2.4-dbus" >> $(landscape_common_substvars)
echo "extra:Depends=python2.4-pycurl" >> $(landscape_client_substvars)
endif
ifneq (,$(findstring $(dist_release),"intrepid"))
# We want the SRU-ed smart 1.1.1 on intrepid
echo "extra:Depends=update-motd, python-smartpm (>= 1.1.1~bzr20081010-0ubuntu1.8.10.0), python2.5-dbus" >> $(landscape_common_substvars)
echo "extra:Depends=python2.5-pycurl" >> $(landscape_client_substvars)
endif
ifneq (,$(findstring $(dist_release),"jaunty"))
# We want update-motd on jaunty, and the SRU-ed smart 1.2
echo "extra:Depends=update-motd, python-smartpm (>= 1.2-0ubuntu1.9.04.1), python2.6-dbus" >> $(landscape_common_substvars)
echo "extra:Depends=python2.6-pycurl" >> $(landscape_client_substvars)
endif
ifneq (,$(findstring $(dist_release),"karmic lucid maverick"))
# We want libpam-modules in karmic, and smart 1.2
echo "extra:Depends=libpam-modules (>= 1.0.1-9ubuntu3), python-smartpm (>= 1.2-4), python2.6-dbus" >> $(landscape_common_substvars)
echo "extra:Depends=python2.6-pycurl" >> $(landscape_client_substvars)
endif
ifneq (,$(findstring $(dist_release),"lucid maverick"))
# The python-image-store-proxy package is needed for the eucalyptus plugin
echo "extra:Suggests=python-image-store-proxy" >> $(landscape_common_substvars)
endif
ifeq ($(use_pycentral),yes)
ifneq (,$(py_setup_install_args))
DH_PYCENTRAL=include-links dh_pycentral
else
DH_PYCENTRAL=nomove dh_pycentral
endif
else
dh_python
endif
dh_installdeb
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-arch binary-indep
.PHONY: binary binary-arch binary-indep clean
|