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.
19
# These are used for cross-compiling and for saving the configure script
20
# from having to guess our platform (since we know it already)
21
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
22
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
4
24
LSB_RELEASE_ID ?= $(shell lsb_release --short --id)
5
25
ifeq (Ubuntu,$(LSB_RELEASE_ID))
6
26
INSTALLUDEV_OPTS="--priority=80"
24
dh --before dh_installudev binary-arch
25
cp udev/88-ltsp.rules debian/ltspfsd.udev
31
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
37
config.status: configure
39
# Add here commands to configure the package.
40
./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info CFLAGS="$(CFLAGS)" LDFLAGS="-Wl,-z,defs"
44
build: build-arch build-indep
46
build-arch: build-arch-stamp
47
build-arch-stamp: config.status
49
# Add here commands to compile the arch part of the package.
53
build-indep: build-indep-stamp
54
build-indep-stamp: config.status
56
# Add here commands to compile the indep part of the package.
63
rm -f build-arch-stamp build-indep-stamp #CONFIGURE-STAMP#
65
# Add here commands to clean up after the build process.
66
[ ! -f Makefile ] || $(MAKE) distclean
67
ifneq "$(wildcard /usr/share/misc/config.sub)" ""
68
cp -f /usr/share/misc/config.sub config.sub
70
ifneq "$(wildcard /usr/share/misc/config.guess)" ""
71
cp -f /usr/share/misc/config.guess config.guess
77
#install: install-indep install-arch
85
# # Add here commands to install the indep part of the package into
86
# # debian/<package>-doc.
98
# Add here commands to install the arch part of the package into
100
$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
102
dh_install --sourcedir=debian/tmp -a
103
# Must not depend on anything. This is to be called by
104
# binary-arch/binary-indep
105
# in another 'make' thread.
114
# dh_installlogrotate
26
123
dh_installudev $(INSTALLUDEV_OPTS)
27
rm debian/ltspfsd.udev
28
dh --after dh_installudev binary-arch
135
# Build architecture independant packages using the common target.
136
binary-indep: build-indep install-indep
137
$(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
139
# Build architecture dependant packages using the common target.
140
binary-arch: build-arch install-arch
141
$(MAKE) -f debian/rules DH_OPTIONS=-s binary-common
30
143
binary: binary-arch binary-indep
31
.PHONY: build clean binary-indep binary-arch binary install
144
.PHONY: build clean binary-indep binary-arch binary install install-indep install-arch