summaryrefslogtreecommitdiffstats
path: root/ubuntu/maverick/metapackages/kubuntu-meta/debian/rules
blob: bd33ed27d95f0c5023eafb0fbe9caf14376a4e35 (plain)
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
#!/usr/bin/make -f

#export DH_VERBOSE=1

DEB_DH_BUILDDEB_ARGS += -- -Z$(shell dpkg-deb --help | grep -q ":.* xz[,.]" \
                               && echo xz || echo bzip2)

debian/stamp-distrospecific:
	dh_testdir
	[ -e debian/stamp-distrospecific ] || \
	ls -a1 debian/distrospecific | grep -v "^\.*$$" | \
	tee debian/stamp-distrospecific | \
	tr "\n" "\0" | (cd debian/distrospecific && xargs -r0 mv -t ../..)

clean:
	dh_testdir
	[ ! -e debian/stamp-distrospecific ] || \
	cat debian/stamp-distrospecific | \
	tr "\n" "\0" | xargs -r0 mv -t debian/distrospecific
	rm -f debian/stamp-distrospecific
	dh_clean
	rm -rf build-stamp *.old debootstrap-dir

DEB_BUILD_ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH)

build: debian/stamp-distrospecific build-stamp
build-stamp:	desktop-$(DEB_BUILD_ARCH)
	dh_clean

	for seed in desktop; do \
		package=kubuntu-$$seed; \
		(printf "$$package:Depends="; perl -pe 's/\n/, /g'  $$seed-$(DEB_BUILD_ARCH); echo) \
			>> debian/$$package.substvars; \
		(printf "$$package:Recommends="; perl -pe 's/\n/, /g'  $$seed-recommends-$(DEB_BUILD_ARCH); echo) \
			>> debian/$$package.substvars; \
	done
	touch $@

install: build-stamp

binary-arch: install
	dh_testdir -a
	dh_testroot -a
	dh_installdocs -a
	dh_installchangelogs -a
	dh_compress -a
	dh_fixperms -a
	dh_installdeb -a
	dh_gencontrol -a
	dh_md5sums -a
	dh_builddeb -a $(DEB_DH_BUILDDEB_ARGS)

binary-indep:

binary: binary-indep binary-arch

.PHONY: binary binary-arch binary-indep clean checkroot build