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 135 136 137 138 139 140 141 142 143 144 145 146 147
|
#!/usr/bin/make -f
# Sample debian/rules that uses debhelper.
# GNU copyright 1997 to 1999 by Joey Hess.
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
DPKG_EXPORT_BUILDFLAGS = 1
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
include /usr/share/dpkg/buildflags.mk
ARCH=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
INSTALL_TARGETS = install-cross
ifeq ($(ARCH),m68k)
INSTALL_TARGETS = install-non-bf install-bf
DH_EXTRAS=-Namiga-fdisk-cross
endif
ifeq ($(ARCH),powerpc)
INSTALL_TARGETS = install-non-bf install-bf
DH_EXTRAS=-Namiga-fdisk-cross
endif
# Only build packages ment for this architecture
export DH_OPTIONS=-a $(DH_EXTRAS)
# This has to be exported to make some magic below work.
export INSTALL_TARGETS
# Run autopkgtest from local environment
do_autopkgtest:
autopkgtest -B -- null
build-non-bf: build-non-bf-stamp
build-non-bf-stamp:
dh_testdir
# Add here commands to compile the non-bf package.
$(MAKE) clean
$(MAKE) CFLAGS+="-DUSE_READLINE=yes -I./include"
touch build-non-bf-stamp
build-bf: build-bf-stamp
build-bf-stamp:
dh_testdir
# Add here commands to compile the bf package.
$(MAKE) clean
$(MAKE) CFLAGS+="-DUSE_READLINE=no -I./include"
touch build-bf-stamp
build-cross: build-cross-stamp
build-cross-stamp:
dh_testdir
# Add here commands to compile the cross package.
$(MAKE) clean
$(MAKE) CFLAGS+="-DUSE_READLINE=yes -I./include"
touch build-cross-stamp
build-arch: build
build-indep: build
build:
clean:
dh_testdir
dh_testroot
rm -f build-non-bf-stamp build-bf-stamp build-cross-stamp
# Add here commands to clean up after the build process.
[ ! -f Makefile ] || $(MAKE) clean
dh_clean
install-non-bf: build-non-bf
dh_testdir
dh_testroot
dh_prep
dh_installdirs
# Add here commands to install the package into debian/amiga-fdisk.
$(MAKE) install DESTDIR=`pwd`/debian/amiga-fdisk
install-bf: build-bf
dh_testdir
dh_testroot
rm -rf debian/amiga-fdisk-bf
dh_installdirs
# Add here commands to install the package into debian/amiga-fdisk-bf.
$(MAKE) install DESTDIR=`pwd`/debian/amiga-fdisk-bf
install-cross: build-cross
dh_testdir
dh_testroot
rm -rf debian/amiga-fdisk-cross
dh_installdirs
# Add here commands to install the package into debian/amiga-fdisk-cross.
$(MAKE) install DESTDIR=`pwd`/debian/amiga-fdisk-cross
install: $(INSTALL_TARGETS)
echo $(INSTALL_TARGETS)
# Build architecture-independent files here.
binary-indep: build install
# We have nothing to do by default.
# Build architecture-dependent files here.
binary-arch: build install
# dh_testversion
dh_testdir
dh_testroot
# dh_installdebconf
dh_installdocs
dh_installexamples
dh_installmenu
# dh_installemacsen
# dh_installpam
# dh_installinit
dh_installcron
dh_installman -A amiga-fdisk.8
dh_installinfo
# dh_undocumented
# dh_installchangelogs -a ChangeLog
dh_installchangelogs ChangeLog
dh_link
dh_strip
dh_compress
dh_fixperms
# You may want to make some executables suid here.
# dh_suidregister
# dh_makeshlibs
dh_installdeb
# dh_perl
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install
|