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 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114
|
#!/usr/bin/make -f
# debian/rules for device3dfx-module to build device3dfx-module-KVER
#
# Copyright (C) 1999 Steve Haslam
# Copyright (C) 2003, 2006 Guillem Jover
#
# Distributable under the terms of the GNU GPL version 2 (or later).
CFLAGS = -Wall -g
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O2
endif
# We are called from make-kpkg through one of the targets kdist,
# kdist_configure, kdist_changes or kdist_image
# When called from make-kpkg we have available:
KPKG_DEST_DIR = ..
-include debian/build.vars
export KVERS KSRC KEMAIL KMAINT KDREV
# We write the source version number into the modules control file.
# Determine it automagically
SRC_VERSION := $(shell dpkg-parsechangelog | sed -ne 's/^Version: //p')
ifeq ($(findstring :,$(KDREV)),:)
VERSION := $(subst :,:$(SRC_VERSION)+,$(KDREV))
else
VERSION := $(SRC_VERSION)+$(KDREV)
endif
package = device3dfx-module-$(KVERS)
VAR_SUBST = 's/@KVERS@/$(KVERS)/g; s/@KDREV@/$(KDREV)/g; \
s/@KEMAIL@/$(KEMAIL)/g; s/@KMAINT@/$(KMAINT)/g; \
s/@DEBDATE@/$(shell 822-date)/g;'
configure: debian/control debian/build.vars
create-control: debian/control.in
sed -e $(VAR_SUBST) debian/control.in > debian/control
debian/control: debian/control.in create-control
debian/build.vars: debian/build_config
debian/build_config > debian/build.vars
build: configure
dh_testdir
$(MAKE)
install: build
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
$(MAKE) install_modules DESTDIR=debian/$(package)
clean: create-control
dh_testdir
dh_testroot
dh_clean
$(MAKE) clean
rm -f debian/build.vars
.PHONY: build install configure create-control
binary_modules: binary-modules
binary-modules: install
dh_testdir
dh_testroot
dh_installdocs
dh_installexamples
dh_installmodules
dh_installchangelogs
dh_link
dh_strip
dh_compress
dh_fixperms
dh_installdeb
dh_shlibdeps
dh_gencontrol -- -v"$(VERSION)"
dh_md5sums
dh_builddeb --destdir=$(KPKG_DEST_DIR)
binary binary-arch binary-indep: binary-modules
@echo 'Info: Using target binary-modules.'
@echo 'Note: You can use make-kpkg as well.'
.PHONY: binary binary-arch binary-indep
# Targets used by kernel-package
kdist_configure: configure
kdist_config: configure
kdist_image:
$(ROOT_CMD) $(MAKE) -f debian/rules binary-modules
$(ROOT_CMD) $(MAKE) -f debian/rules clean
kdist_clean: clean
kdist:
$(ROOT_CMD) $(MAKE) -f debian/rules binary-modules
.PHONY: kdist kdist_image kdist_changes kdist_configure
|