OLD | NEW |
(Empty) | |
| 1 #!/usr/bin/make -f |
| 2 # |
| 3 # $(DEBIAN)/rules for Ubuntu linux |
| 4 # |
| 5 # Use this however you want, just give credit where credit is due. |
| 6 # |
| 7 # Copyright (c) 2007 Ben Collins <bcollins@ubuntu.com> |
| 8 # |
| 9 |
| 10 ifeq ($(DEBIAN),) |
| 11 DEBIAN=debian.chrome |
| 12 endif |
| 13 |
| 14 # dpkg-buildpackage passes options that are incomptatible |
| 15 # with the kernel build. |
| 16 unexport CFLAGS |
| 17 unexport LDFLAGS |
| 18 |
| 19 # This is the debhelper compatability version to use. |
| 20 export DH_COMPAT=4 |
| 21 export LC_ALL=C |
| 22 export SHELL=/bin/bash -e |
| 23 |
| 24 # Common variables for all architectures |
| 25 include $(DEBIAN)/rules.d/0-common-vars.mk |
| 26 |
| 27 # Pull in some arch specific stuff |
| 28 include $(DEBIAN)/rules.d/$(arch).mk |
| 29 |
| 30 # Maintainer targets |
| 31 include $(DEBIAN)/rules.d/1-maintainer.mk |
| 32 |
| 33 # Debian Build System targets |
| 34 binary: binary-indep binary-arch |
| 35 |
| 36 build: build-arch build-indep |
| 37 |
| 38 clean: debian/control |
| 39 dh_testdir |
| 40 dh_testroot |
| 41 dh_clean |
| 42 |
| 43 # d-i stuff |
| 44 rm -rf $(DEBIAN)/d-i-$(arch) |
| 45 |
| 46 # normal build junk |
| 47 rm -rf $(DEBIAN)/abi/$(release)-$(revision) |
| 48 rm -rf $(builddir) |
| 49 rm -f $(stampdir)/stamp-* |
| 50 rm -rf $(DEBIAN)/linux-* |
| 51 |
| 52 # This gets rid of the d-i packages in control |
| 53 cp -f $(DEBIAN)/control.stub $(DEBIAN)/control |
| 54 cp $(DEBIAN)/changelog debian/changelog |
| 55 |
| 56 # Install the copyright information. |
| 57 cp $(DEBIAN)/copyright debian/copyright |
| 58 |
| 59 distclean: clean |
| 60 rm -rf $(DEBIAN)/control $(DEBIAN)/control.stub \ |
| 61 debian/changelog \ |
| 62 debian/control debian/control.stub debian/copyright \ |
| 63 debian/debian.env |
| 64 |
| 65 # Builds the image, arch headers and debug packages |
| 66 include $(DEBIAN)/rules.d/2-binary-arch.mk |
| 67 |
| 68 # Rules for building the udebs ($(DEBIAN)-installer) |
| 69 include $(DEBIAN)/rules.d/5-udebs.mk |
| 70 |
| 71 # Builds the source, doc and linux-headers indep packages |
| 72 include $(DEBIAN)/rules.d/3-binary-indep.mk |
| 73 |
| 74 # Various checks to be performed on builds |
| 75 include $(DEBIAN)/rules.d/4-checks.mk |
| 76 |
| 77 # Misc stuff |
| 78 $(DEBIAN)/control.stub: \ |
| 79 $(DEBIAN)/scripts/control-create \ |
| 80 $(DEBIAN)/control.stub.in \ |
| 81 $(DEBIAN)/changelog \ |
| 82 $(wildcard $(DEBIAN)/control.d/* $(DEBIAN)/sub-flavours/*.vars) |
| 83 for i in $(DEBIAN)/control.stub.in; do \ |
| 84 new=`echo $$i | sed 's/\.in$$//'`;
\ |
| 85 cat $$i | sed -e 's/PKGVER/$(release)/g'
\ |
| 86 -e 's/ABINUM/$(abinum)/g'
\ |
| 87 -e 's/SRCPKGNAME/$(src_pkg_name)/g'
\ |
| 88 > $$new;
\ |
| 89 done |
| 90 flavours="$(wildcard $(DEBIAN)/control.d/vars.* $(DEBIAN)/sub-flavours/*
.vars)";\ |
| 91 for i in $$flavours; do
\ |
| 92 $(SHELL) $(DEBIAN)/scripts/control-create $$i |
\ |
| 93 sed -e 's/PKGVER/$(release)/g'
\ |
| 94 -e 's/ABINUM/$(abinum)/g'
\ |
| 95 -e 's/SRCPKGNAME/$(src_pkg_name)/g'
\ |
| 96 >> $(DEBIAN)/control.stub;
\ |
| 97 done |
| 98 cp $(DEBIAN)/control.stub $(DEBIAN)/control |
| 99 |
| 100 .PHONY: debian/control |
| 101 debian/control: $(DEBIAN)/control.stub |
| 102 rm -rf $(builddir)/modules $(builddir)/firmware \ |
| 103 $(builddir)/kernel-versions $(builddir)/package-list \ |
| 104 $(builddir)/$(DEBIAN) |
| 105 mkdir -p $(builddir)/modules/$(arch)/ |
| 106 mkdir -p $(builddir)/firmware/$(arch)/ |
| 107 touch $(builddir)/modules/$(arch)/kernel-image |
| 108 # kernel-wedge needs to poke around in $(DEBIAN)/ |
| 109 ln -nsf $(CURDIR)/debian $(builddir)/debian |
| 110 |
| 111 if [ ! -d $(builddir)/modules/$(build_arch) ]; then \ |
| 112 mkdir -p $(builddir)/modules/$(build_arch); \ |
| 113 cp $(builddir)/modules/$(arch)/* \ |
| 114 $(builddir)/modules/$(build_arch); \ |
| 115 fi |
| 116 if [ ! -d $(builddir)/firmware/$(build_arch) ]; then \ |
| 117 mkdir -p $(builddir)/firmware/$(build_arch); \ |
| 118 cp $(builddir)/firmware/$(arch)/* \ |
| 119 $(builddir)/firmware/$(build_arch); \ |
| 120 fi |
| 121 |
| 122 cp $(DEBIAN)/control.stub debian/control |
OLD | NEW |