source: trunk/packages/xen-common/xen-common/debian/rules @ 34

Last change on this file since 34 was 34, checked in by hartmans, 17 years ago

Add xen and xen-common

  • Property svn:executable set to *
  • Property svn:mime-type set to text/script
File size: 2.1 KB
Line 
1#!/usr/bin/make -f
2
3#export DH_VERBOSE=1
4
5VERSION := $(shell dpkg-parsechangelog | perl -ne '/^Version:\s+(\S+)-[^-]+$$/ && print $$1;')
6
7BUILD_DIR = debian/build
8STAMPS_DIR = debian/stamps
9
10srcfiles := $(filter-out debian, $(wildcard * .[^.]*))
11source: $(STAMPS_DIR)/source
12$(STAMPS_DIR)/source: $(STAMPS_DIR)
13        dh_testdir
14        @rm -rf $(BUILD_DIR)
15        mkdir -p $(BUILD_DIR)
16        cp -a $(srcfiles) $(BUILD_DIR)
17        dpatch -d $(BUILD_DIR) apply-all
18        touch $@
19
20define build_man
21        mkdir -p $(BUILD_DIR)/docs/out
22        pod2man --release=$(VERSION) --name=$(3) -s $(4) -c Xen $(BUILD_DIR)/docs/man/$(1) $(BUILD_DIR)/docs/out/$(2)
23endef
24
25build: $(STAMPS_DIR)/source
26        mkdir -p $(BUILD_DIR)/docs/man
27        $(call build_man,xend-config.sxp.pod.5,xend-config.sxp.5,xend-config.sxp,5)
28        $(call build_man,xmdomain.cfg.pod.5,xmdomain.cfg.5,xmdomain.cfg,5)
29        $(call build_man,xm.pod.1,xm.1,xm,1)
30
31clean:
32        dh_testdir
33        rm -rf $(BUILD_DIR) $(STAMPS_DIR)
34        dh_clean
35
36$(BUILD_DIR) $(STAMPS_DIR):
37        @[ -d $@ ] || mkdir -p $@
38
39NO_ORIG = .svn debian scripts
40
41DIR_ORIG = ../orig/xen-common-$(VERSION)
42
43orig: $(DIR_ORIG)
44        rsync --delete $(foreach t, $(NO_ORIG), --exclude $(t)) --link-dest=$(DIR_ORIG)/ -a $(DIR_ORIG)/ .
45
46# This is to make dpatch-edit-patch work
47unpatch: clean
48
49maintainerclean:
50        rm -rf $(filter-out $(NO_ORIG), $(wildcard * .[^.]*))
51
52install: $(STAMPS_DIR)/source
53        dh_testdir
54        dh_testroot
55        dh_clean -k
56        $(MAKE) -C $(BUILD_DIR)/tools/examples install DESTDIR=$(CURDIR)/debian/tmp DISTDIR=$(CURDIR)/debian/tmp
57        $(MAKE) -C $(BUILD_DIR)/scripts install DESTDIR=$(CURDIR)/debian/tmp
58
59binary-indep: install
60        dh_testdir
61        dh_testroot
62        dh_install --sourcedir=debian/tmp
63        dh_installchangelogs
64        dh_installdocs
65        dh_installexamples
66        dh_installinit -p xen-utils-common --name xend --no-restart-on-upgrade -- defaults 20 21
67        dh_installinit -p xen-utils-common --name xendomains --no-start -- defaults 21 20
68        dh_installman $(BUILD_DIR)/docs/man/*
69        dh_link
70        dh_strip
71        dh_compress
72        dh_fixperms
73        dh_installdeb
74        dh_shlibdeps
75        dh_gencontrol
76        dh_md5sums
77        dh_builddeb
78
79binary-arch:
80
81binary: build binary-indep binary-arch
82.PHONY: build clean binary-indep binary-arch binary install #PHONY_CONFIGURE#
Note: See TracBrowser for help on using the repository browser.