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 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134
|
#!/usr/bin/make -f
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
# prefix of the target package name
PACKAGE=acx100
include /usr/share/dpatch/dpatch.make
# modifieable for experiments or debugging m-a
MA_DIR ?= /usr/share/modass
# load generic variable handling
-include $(MA_DIR)/include/generic.make
# load default rules
-include $(MA_DIR)/include/common-rules.make
ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
CFLAGS += -g
endif
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
INSTALL_PROGRAM += -s
endif
clean: unpatch
dh_testdir
dh_testroot
touch config.mk \
&& rm -rf tmp
dh_clean
rm -rf debian/build
rm -f *-stamp
build: patch build-stamp
build-stamp:
dh_testdir
# Copy most of the source tree into the temp directory and clean it
find . -path ./debian/\* -type d -prune -o -print \
| egrep -v 'RPM|CVS|debian' \
| cpio -admp debian/build/usr/src/modules/acx100
mkdir debian/build/usr/src/modules/acx100/debian
cp -f debian/*.modules.in debian/build/usr/src/modules/acx100/debian
cp -f debian/changelog debian/build/usr/src/modules/acx100/debian
cp -f debian/compat debian/build/usr/src/modules/acx100/debian
cp -f debian/copyright debian/build/usr/src/modules/acx100/debian
cp -f debian/docs debian/build/usr/src/modules/acx100/debian
cp -f debian/rules debian/build/usr/src/modules/acx100/debian
cd debian/build/usr/src/modules/acx100 \
&& touch config.mk \
touch build-stamp
install: build install-stamp
install-stamp:
dh_testdir
dh_clean -i -k
dh_installdirs -i
# dh_installdirs -i usr/src/modules
dh_installdirs -i usr/share/modass/overrides
# Pack this up into a tarball
set
chown -R root.src debian/build/usr/src/modules
mkdir -p debian/acx100-source/usr/src
cd debian/build/usr/src \
&& tar cf - modules | gzip -9 > $(CURDIR)/debian/acx100-source/usr/src/acx100.tar.gz
ln -s ../packages/default.sh \
debian/acx100-source/usr/share/modass/overrides/acx100-source
touch install-stamp
# Build architecture-independent files here.
binary-indep: build install
dh_testdir
dh_testroot
dh_installdocs
dh_installchangelogs
cp -f Changelog $(CURDIR)/debian/acx100-source/usr/share/doc/acx100-source/changelog
dh_strip
dh_link
dh_compress
dh_fixperms
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
# Build architecture-dependent files here.
binary-arch: build install
# We have nothing to do by default.
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install
KMAJ=$(shell echo $(KVERS) | cut -b1-3)
.PHONY: kdist_config
kdist_config: prep-deb-files
.PHONY: binary_modules binary-modules
binary-modules: binary_modules
binary_modules: kdist_config
# Build modules
$(MAKE) -C "$(KSRC)" M="$(CURDIR)"
dh_installdirs /lib/firmware
dh_installdirs lib/modules/$(KVERS)/acx100
ifeq ($(KMAJ), 2.6)
install -m 0644 acx.ko debian/acx100-$(KVERS)/lib/modules/$(KVERS)/acx100
else
install -m 0644 src/acx.o debian/acx100-$(KVERS)/lib/modules/$(KVERS)/acx100
endif
dh_testdir
dh_testroot
dh_installdocs
dh_installmodules
dh_installchangelogs
dh_link
dh_strip
dh_compress
dh_fixperms
dh_installdeb
dh_gencontrol -- -v$(VERSION)
dh_md5sums
dh_builddeb --destdir=$(DEB_DESTDIR)
.PHONY: kdist_clean
kdist_clean:
touch config.mk \
&& $(MAKE) -C "$(KSRC)" M="$(CURDIR)" clean
-dh_clean
|