summaryrefslogtreecommitdiffstats
path: root/debian/rules
blob: 42df8cee999c86d551db71e7276804cd925b0075 (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
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
#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

configure:
	dh_testdir

clean:
	dh_testdir

	$(MAKE) clean

	dh_clean

build: configure
#	 need to be root to make devices, so build is done in install target

real-build: build
	dh_testdir
	dh_testroot

	$(MAKE) all

install: real-build
	dh_testdir
	dh_testroot

	dh_clean -k
	dh_installdirs

#	 install the package into debian/debootstrap
	$(MAKE) install      DESTDIR=$(CURDIR)/debian/debootstrap
	$(MAKE) install      DESTDIR=$(CURDIR)/debian/debootstrap-udeb

binary-indep: install
# We have nothing to do by default.

ARCHES="i386"
SUITE="testing"
VERSION=$(SUITE)
MIRROR="http://ftp.debian.org/debian"

binary-basedebs:
	dh_testdir
	dh_testroot

	$(MAKE) pkgdetails

	ln -s . scripts
	for a in $(ARCHES); do \
	    rm -rf chroot-dir; \
	    mkdir -p chroot-dir; \
	    DEBOOTSTRAP_DIR=. ./debootstrap --arch $$a --download-only $(SUITE) chroot-dir $(MIRROR); \
	    (cd chroot-dir && tar cf ../../basedebs_$(VERSION)_$$a.tar *); \
	    rm -rf chroot-dir; \
	done
	rm -f scripts

binary-indep: install
	dh_testdir
	dh_testroot
	dh_installdocs -i
	dh_installman -i debootstrap.8
	dh_installchangelogs -i
	dh_link -i
	-rm -rf debian/debootstrap-udeb/usr/share/debootstrap/scripts/potato \
		debian/debootstrap-udeb/usr/share/debootstrap/scripts/woody \
		debian/debootstrap-udeb/usr/share/debootstrap/scripts/sarge \
		debian/debootstrap-udeb/usr/share/debootstrap/scripts/warty \
		debian/debootstrap-udeb/usr/share/debootstrap/scripts/hoary \
		debian/debootstrap-udeb/usr/share/debootstrap/scripts/breezy \
		debian/debootstrap-udeb/usr/share/debootstrap/scripts/dapper \
		debian/debootstrap-udeb/usr/share/debootstrap/scripts/edgy \
		debian/debootstrap-udeb/usr/share/debootstrap/scripts/feisty \
		debian/debootstrap-udeb/usr/share/debootstrap/scripts/*.buildd \
		debian/debootstrap-udeb/usr/share/debootstrap/scripts/*.fakechroot
	dh_compress -i
	dh_fixperms -i
	dh_installdeb -i
	dh_shlibdeps -i
	dh_gencontrol -i
	dh_md5sums -i
	dh_builddeb -i

binary-arch:

binary: binary-indep binary-arch
.PHONY: build real-build clean binary-indep binary-arch binary install configure binary-basedebs