File: rules

package info (click to toggle)
debian-installer 20070308etch7
  • links: PTS
  • area: main
  • in suites: etch
  • size: 4,284 kB
  • ctags: 142
  • sloc: xml: 9,843; sh: 1,623; makefile: 784; perl: 496; awk: 100
file content (67 lines) | stat: -rwxr-xr-x 1,555 bytes parent folder | download
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
#!/usr/bin/make -f

ARCH=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
VERSION=$(shell LC_ALL=C dpkg-parsechangelog | grep ^Version: | cut -d ' ' -f 2)
DATE=$(shell echo $(VERSION) | cut -d '.' -f 1)
SUITE=$(shell LC_ALL=C dpkg-parsechangelog | grep ^Distribution: | cut -d ' ' -f 2)
ifneq (,$(filter stable oldstable,${SUITE}))
SUITE=etch
endif
ifeq (${SUITE},unstable)
SUITE=etch
endif
ifeq (${SUITE},UNRELEASED)
SUITE=unstable
endif

ARCHIVEDIR=debian/tmp/installer-$(ARCH)
DESTDIR=$(ARCHIVEDIR)/$(DATE)
IMAGEDIR=$(DESTDIR)/images
TARNAME=debian-installer-images_$(VERSION)_$(ARCH).tar.gz

clean:
	dh_testdir
	dh_testroot
	dh_clean build-stamp
	$(MAKE) -C build reallyclean
	$(MAKE) -C doc/devel/partman clean

# Must run as root, so is not run as part of regular build.
build-images:
	$(MAKE) -C build all_build stats release \
		SUITE=$(SUITE) BUILD_DATE=$(DATE) PRESEED_SUITE=
	
build: build-stamp
build-stamp:
	rm -f $@
	$(MAKE) -C doc/devel/partman
	touch $@

install: build
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs
	
	debian/rules build-images

	install -d $(IMAGEDIR)
	cp -a build/dest/* $(IMAGEDIR)
	ln -s $(DATE) $(ARCHIVEDIR)/current

binary-arch: install  
	dh_testdir
	dh_testroot
	dh_installchangelogs
	dh_installdocs doc/* -X Makefile -X partman-doc.sgml
	dh_compress
	dh_fixperms
	dh_gencontrol
	dh_builddeb
	cd debian/tmp && tar czvf ../../../$(TARNAME) .
	dpkg-distaddfile $(TARNAME) raw-installer -

binary-indep:

binary: binary-indep binary-arch 
.PHONY: build build-images clean binary-indep binary-arch binary install