~derek-name/openvista-gtm-integration/bug887649

« back to all changes in this revision

Viewing changes to packages/deb/Ubuntu/9.10/fis-gtm-5.3004a/debian/rules

  • Committer: Derek Veit
  • Date: 2011-09-29 23:55:44 UTC
  • mfrom: (149.1.6 bug834215)
  • Revision ID: derek.veit@medsphere.com-20110929235544-qqib8ojo7tlvcph0
Merge bug 834215 - Add support for Ubuntu 11.04 "Natty Narwhal".

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/usr/bin/make -f
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
 
#enable dpatch
20
 
include /usr/share/dpatch/dpatch.make
21
 
 
22
 
DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH)
23
 
DEB_HOST_ARCH_OS := $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
24
 
 
25
 
ifeq ($(DEB_HOST_ARCH),amd64)
26
 
GTM_DIST = /opt/lsb-gtm/V5.3-004A_x86_64
27
 
else
28
 
GTM_DIST = /opt/lsb-gtm/V5.3-004A_i686
29
 
endif
30
 
 
31
 
ifeq ($(DEB_HOST_ARCH_OS),linux)
32
 
GTM_HOSTOS = Linux
33
 
else
34
 
GTM_HOSTOS = $(DEB_HOST_ARCH_OS)
35
 
endif
36
 
 
37
 
GT_CC_COMPILER = gcc-4.1
38
 
 
39
 
GTM_ICU_VERSION_MAJMIN = $(shell icu-config --version | sed 's/\.//' | cut -f 1 -d '.')
40
 
GTM_ICU_VERSION_MINORVER = $(shell expr $(GTM_ICU_VERSION_MAJMIN) % 10)
41
 
GTM_ICU_VERSION_MAJORVER = $(shell expr $(GTM_ICU_VERSION_MAJMIN) / 10)
42
 
GTM_ICU_VERSION = $(GTM_ICU_VERSION_MAJORVER).$(GTM_ICU_VERSION_MINORVER)
43
 
 
44
 
PACKAGE=fis-gtm-5.3004a
45
 
 
46
 
 
47
 
 
48
 
configure:
49
 
        dh_testdir
50
 
 
51
 
        # GT.M needs to be built with tcsh, and with a bunch of environmental variables
52
 
        # set.  Since we can't run tcsh interactively, we put all the setenv commands
53
 
        # and the build command itself into a temporary script, then execute it with
54
 
        # tcsh.
55
 
        echo 'setenv gtm_curpro $(GTM_DIST)' > build.csh
56
 
        echo 'setenv gtm_exe $(GTM_DIST)' >> build.csh
57
 
        echo 'setenv HOSTOS $(GTM_HOSTOS)' >> build.csh
58
 
        echo 'setenv gtm_tools $(CURDIR)/sr_linux' >> build.csh
59
 
        echo 'setenv gtm_inc $(CURDIR)/sr_linux' >> build.csh
60
 
        if [ "$(DEB_HOST_ARCH)" = "amd64" ]; then \
61
 
                echo 'setenv OBJECT_MODE 64' >> build.csh ; \
62
 
        fi
63
 
        echo 'setenv distro ubuntu' >> build.csh
64
 
        echo 'setenv gtm_icu_version $(GTM_ICU_VERSION)' >> build.csh
65
 
        echo 'setenv gtm_version_change 1' >> build.csh
66
 
        cat sr_unix/gtm_env.csh >> build.csh
67
 
 
68
 
        # GT.M 5.3004 requires gcc-4.1, Jaunty's default (gcc 4.3) doesn't work
69
 
        echo 'setenv gt_cc_compiler $(GT_CC_COMPILER)' >> build.csh
70
 
 
71
 
        # GT.M's makefiles get confused if this isn't reset back to 0
72
 
        echo 'setenv MAKELEVEL 0' >> build.csh
73
 
 
74
 
 
75
 
#Architecture
76
 
build: patch-stamp build-arch build-indep
77
 
 
78
 
build-arch: build-arch-stamp
79
 
build-arch-stamp: configure
80
 
        echo '$(MAKE) -f sr_unix/comlist.mk -I./sr_unix -I./sr_linux buildtypes=pro gtm_ver=$(CURDIR)' >> build.csh
81
 
        tcsh -b build.csh
82
 
 
83
 
        touch $@
84
 
 
85
 
build-indep: build-indep-stamp
86
 
build-indep-stamp: configure
87
 
 
88
 
        # Add here commands to compile the indep part of the package.
89
 
        #$(MAKE) doc
90
 
        touch $@
91
 
 
92
 
clean: unpatch configure
93
 
        dh_testdir
94
 
        dh_testroot
95
 
        rm -f build-arch-stamp build-indep-stamp
96
 
 
97
 
        echo '$(MAKE) -f sr_unix/comlist.mk -I./sr_unix -I./sr_linux buildtypes=pro gtm_ver=$(CURDIR) clean' >> build.csh
98
 
        tcsh -b build.csh
99
 
        rm -f build.csh
100
 
 
101
 
        rm -rf gtm
102
 
 
103
 
        dh_clean
104
 
 
105
 
install: install-indep install-arch
106
 
install-indep:
107
 
        dh_testdir
108
 
        dh_testroot
109
 
        dh_prep -i
110
 
        dh_installdirs -i
111
 
 
112
 
        # Add here commands to install the indep part of the package into
113
 
        # debian/<package>-doc.
114
 
        #INSTALLDOC#
115
 
 
116
 
        dh_install -i
117
 
 
118
 
install-arch:
119
 
        dh_testdir
120
 
        dh_testroot
121
 
        dh_prep -s
122
 
        dh_installdirs -s
123
 
 
124
 
        # Move the existing GT.M installation out of the way
125
 
        rm -rf $(GTM_DIST).bak
126
 
        mv $(GTM_DIST) $(GTM_DIST).bak
127
 
 
128
 
        # We need to patch the configure script to pre-answer all of the prompts and
129
 
        # set the installation directory
130
 
        cd pro ; \
131
 
        cat ../debian/patches/99-noninteractive-configure.patch | \
132
 
                sed 's,@GTM_DIST@,$(GTM_DIST),' | \
133
 
                sed 's,@GTM_ICU_VERSION@,$(GTM_ICU_VERSION),' | \
134
 
                patch -p0 -b ; \
135
 
        chmod +x configure ; \
136
 
        ./configure
137
 
 
138
 
        # Move the new GT.M installation to a temporary directory, but do not copy it into the package root yet
139
 
        mv $(GTM_DIST) gtm
140
 
 
141
 
        # Restore the existing GT.M installation
142
 
        mv $(GTM_DIST).bak $(GTM_DIST)
143
 
 
144
 
        dh_install -s
145
 
# Must not depend on anything. This is to be called by
146
 
# binary-arch/binary-indep
147
 
# in another 'make' thread.
148
 
binary-common:
149
 
        dh_testdir
150
 
        dh_testroot
151
 
        dh_installchangelogs
152
 
        dh_installdocs
153
 
        dh_installexamples
154
 
#       dh_installmenu
155
 
#       dh_installdebconf
156
 
#       dh_installlogrotate
157
 
#       dh_installemacsen
158
 
#       dh_installpam
159
 
#       dh_installmime
160
 
#       dh_python
161
 
#       dh_installinit
162
 
#       dh_installcron
163
 
#       dh_installinfo
164
 
        dh_installman
165
 
        dh_link
166
 
        dh_strip
167
 
        dh_compress
168
 
        dh_fixperms
169
 
        # copy files into package root after dh_fixperms to ensure permissions
170
 
        # are correct.  files are owned by group bin for now; will change to
171
 
        # group gtm in postinst
172
 
        rm -rf debian/$(PACKAGE)$(GTM_DIST)
173
 
        cp -a gtm debian/$(PACKAGE)$(GTM_DIST)
174
 
#       dh_perl
175
 
        dh_makeshlibs
176
 
        dh_installdeb
177
 
        dh_shlibdeps
178
 
        dh_gencontrol
179
 
        dh_md5sums
180
 
        dh_builddeb
181
 
# Build architecture independant packages using the common target.
182
 
binary-indep: build-indep install-indep
183
 
        $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
184
 
 
185
 
# Build architecture dependant packages using the common target.
186
 
binary-arch: build-arch install-arch
187
 
        $(MAKE) -f debian/rules DH_OPTIONS=-s binary-common
188
 
 
189
 
binary: binary-arch binary-indep
190
 
.PHONY: build clean binary-indep binary-arch binary install install-indep install-arch configure