~ubuntu-branches/ubuntu/lucid/ltspfs/lucid

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Bazaar Package Importer
  • Author(s): Stéphane Graber
  • Date: 2009-06-03 17:31:29 UTC
  • mfrom: (1.1.15 upstream)
  • Revision ID: james.westby@ubuntu.com-20090603173129-drd1uiq91na7ryzy
Tags: 0.5.12-0ubuntu1
* New upstream version (0.5.12):
 * Remove ltspfs_fstab entry before unmounting device (LP: #378495)
 * Code simplification
 * Make sure delayed_mounter sets USER=root for local ltspfsmounting
 * Do not remove ltspfs mount on "already mounted" errors

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/usr/bin/make -f
2
2
# -*- makefile -*-
 
3
# Sample debian/rules that uses debhelper.
 
4
#
 
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.
 
9
#
 
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
 
12
 
 
13
# Uncomment this to turn on verbose mode.
 
14
#export DH_VERBOSE=1
 
15
 
 
16
# This has to be exported to make some magic below work.
 
17
export DH_OPTIONS
 
18
 
 
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)
3
23
 
4
24
LSB_RELEASE_ID ?= $(shell lsb_release --short --id)
5
25
ifeq (Ubuntu,$(LSB_RELEASE_ID))
6
26
        INSTALLUDEV_OPTS="--priority=80"
7
27
endif
8
28
 
9
 
build: build-stamp
10
 
build-stamp:
11
 
        dh build
12
 
        touch build-stamp
13
 
 
14
 
clean:
15
 
        dh clean
16
 
 
17
 
install:
18
 
        dh install
19
 
 
20
 
binary-indep: install
21
 
        dh binary-indep
22
 
 
23
 
binary-arch: install
24
 
        dh --before dh_installudev binary-arch
25
 
        cp udev/88-ltsp.rules debian/ltspfsd.udev
 
29
CFLAGS = -Wall -g
 
30
 
 
31
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
 
32
        CFLAGS += -O0
 
33
else
 
34
        CFLAGS += -O2
 
35
endif
 
36
 
 
37
config.status: configure
 
38
        dh_testdir
 
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"
 
41
 
 
42
 
 
43
#Architecture 
 
44
build: build-arch build-indep
 
45
 
 
46
build-arch: build-arch-stamp
 
47
build-arch-stamp:  config.status
 
48
 
 
49
        # Add here commands to compile the arch part of the package.
 
50
        $(MAKE) 
 
51
        touch $@
 
52
 
 
53
build-indep: build-indep-stamp
 
54
build-indep-stamp:  config.status
 
55
 
 
56
        # Add here commands to compile the indep part of the package.
 
57
        #$(MAKE) doc
 
58
        touch $@
 
59
 
 
60
clean: 
 
61
        dh_testdir
 
62
        dh_testroot
 
63
        rm -f build-arch-stamp build-indep-stamp #CONFIGURE-STAMP#
 
64
 
 
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
 
69
endif
 
70
ifneq "$(wildcard /usr/share/misc/config.guess)" ""
 
71
        cp -f /usr/share/misc/config.guess config.guess
 
72
endif
 
73
 
 
74
 
 
75
        dh_clean 
 
76
 
 
77
#install: install-indep install-arch
 
78
install: install-arch
 
79
#install-indep:
 
80
#       dh_testdir
 
81
#       dh_testroot
 
82
#       dh_clean -k -i 
 
83
#       dh_installdirs -i
 
84
#
 
85
#       # Add here commands to install the indep part of the package into
 
86
#       # debian/<package>-doc.
 
87
#       #INSTALLDOC#
 
88
#
 
89
#       dh_install -i
 
90
 
 
91
install-arch:
 
92
        dh_testdir
 
93
        dh_testroot
 
94
        dh_clean -k -s 
 
95
        dh_installdirs -ptmp
 
96
 
 
97
 
 
98
        # Add here commands to install the arch part of the package into 
 
99
        # debian/tmp.
 
100
        $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
 
101
        
 
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.
 
106
binary-common:
 
107
        dh_testdir
 
108
        dh_testroot
 
109
        dh_installchangelogs
 
110
        dh_installdocs
 
111
        dh_installexamples
 
112
#       dh_installmenu
 
113
#       dh_installdebconf       
 
114
#       dh_installlogrotate     
 
115
#       dh_installemacsen
 
116
#       dh_installpam
 
117
#       dh_installmime
 
118
#       dh_python
 
119
#       dh_installinit
 
120
#       dh_installcron
 
121
#       dh_installinfo
 
122
        dh_installman -a
26
123
        dh_installudev $(INSTALLUDEV_OPTS)
27
 
        rm debian/ltspfsd.udev
28
 
        dh --after dh_installudev binary-arch
 
124
        dh_link
 
125
        dh_strip
 
126
        dh_compress 
 
127
        dh_fixperms
 
128
#       dh_perl
 
129
        dh_makeshlibs
 
130
        dh_installdeb
 
131
        dh_shlibdeps
 
132
        dh_gencontrol
 
133
        dh_md5sums
 
134
        dh_builddeb
 
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
 
138
 
 
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
29
142
 
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