3
# Sample debian/rules that uses debhelper.
5
# This file was originally written by Joey Hess and Craig Small.
6
# As a special exception, when this file is copied by dh-make into a
7
# dh-make output file, you may use that output file without restriction.
8
# This special exception was added by Craig Small in version 0.37 of dh-make.
10
# Modified to make a template file for a multi-binary package with separated
11
# build-arch and build-indep targets by Bill Allombert 2001
13
# Uncomment this to turn on verbose mode.
16
# This has to be exported to make some magic below work.
22
export OPTFLAGS =-DDISCOVERY_FILE=\"/var/lib/open-iscsi/discovery\" -DNODE_FILE=\"/var/lib/open-iscsi/node\"
24
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
30
configure: configure-stamp
33
# Add here commands to configure the package.
41
build-arch: build-arch-stamp
42
build-arch-stamp: configure-stamp
44
# Add here commands to compile the arch part of the package.
47
touch build-arch-stamp
49
build-indep: build-indep-stamp
50
build-indep-stamp: configure-stamp
52
# Add here commands to compile the indep part of the package.
54
touch build-indep-stamp
59
rm -f build-arch-stamp build-indep-stamp configure-stamp
61
# Add here commands to clean up after the build process.
68
# disabled kernel module package for now because source is already in debian stock kernelsy
71
disabled-install-indep:
77
# create needed directories
78
dh_installdirs -i usr/src/modules/linux-iscsi
80
mkdir -p modules/linux-iscsi/debian
82
# copy the driver source
83
tar --exclude=debian -c * | (cd modules/linux-iscsi && tar xv)
85
# copy all relevant debian/ files
86
cp debian/{compat,copyright} modules/linux-iscsi/debian
87
cat debian/changelog | sed -e 's/linux-iscsi/linux-iscsi-modules/' > modules/linux-iscsi/debian/changelog
88
cp debian/*.modules.in modules/linux-iscsi/debian
89
install -m755 debian/rules.modules modules/linux-iscsi/debian/rules
92
tar jcf debian/linux-iscsi-modules-source/usr/src/linux-iscsi-modules-source.tar.bz2 modules
94
# Add here commands to install the indep part of the package into
95
# debian/<package>-doc.
106
# Add here commands to install the arch part of the package into
108
install -m 755 usr/iscsiadm $(CURDIR)/debian/open-iscsi/usr/bin
109
install -m 755 usr/iscsi-iname $(CURDIR)/debian/open-iscsi/usr/sbin
110
install -m 755 usr/iscsid $(CURDIR)/debian/open-iscsi/usr/sbin
111
install -m 644 etc/iscsid.conf $(CURDIR)/debian/open-iscsi/etc
112
install -m 644 debian/initiatorname.iscsi $(CURDIR)/debian/open-iscsi/etc/initiatorname.iscsi
116
# Must not depend on anything. This is to be called by
117
# binary-arch/binary-indep
118
# in another 'make' thread.
137
# Build architecture independant packages using the common target.
138
binary-indep: build-indep install-indep
139
# $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
141
# Build architecture dependant packages using the common target.
142
binary-arch: build-arch install-arch
143
$(MAKE) -f debian/rules DH_OPTIONS=-a binary-common
145
binary: binary-arch binary-indep
146
.PHONY: build clean binary-indep binary-arch binary install install-indep install-arch configure