~jontai/openvista-gtm-integration/bug413322

« back to all changes in this revision

Viewing changes to packages/deb/openvista-libs-5.3004/debian/rules

  • Committer: Jonathan Tai
  • Date: 2009-08-07 16:05:49 UTC
  • mfrom: (74.3.51 bug358242)
  • Revision ID: jon.tai@medsphere.com-20090807160549-z5pfkz1gehlbaxnx
Merge bug 358242 - Create Debian/Ubuntu packages of OpenVista utilities, GT.M

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
DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH)
 
20
 
 
21
ifeq ($(DEB_HOST_ARCH),amd64)
 
22
GTM_DIST = /opt/lsb-gtm/V5.3-004_x86_64
 
23
else
 
24
GTM_DIST = /opt/lsb-gtm/V5.3-004_i686
 
25
endif
 
26
 
 
27
 
 
28
 
 
29
configure: configure-stamp
 
30
configure-stamp:
 
31
        dh_testdir
 
32
        # Add here commands to configure the package.
 
33
 
 
34
        touch configure-stamp
 
35
 
 
36
 
 
37
#Architecture
 
38
build: build-arch build-indep
 
39
 
 
40
build-arch: build-arch-stamp
 
41
build-arch-stamp: configure-stamp  
 
42
        cd src/libopenvista && gtm_dist="$(GTM_DIST)" ./compile.sh
 
43
        cd src/gtmsignal && ./compile.sh
 
44
        touch $@
 
45
 
 
46
build-indep: build-indep-stamp
 
47
build-indep-stamp: configure-stamp  
 
48
 
 
49
        # Add here commands to compile the indep part of the package.
 
50
        #$(MAKE) doc
 
51
        touch $@
 
52
 
 
53
clean: 
 
54
        dh_testdir
 
55
        dh_testroot
 
56
        rm -f build-arch-stamp build-indep-stamp configure-stamp
 
57
 
 
58
        rm -f src/libopenvista/libopenvista.so
 
59
        rm -f src/libopenvista/openvista.xc
 
60
        rm -f src/gtmsignal/gtmsignal
 
61
 
 
62
        dh_clean 
 
63
 
 
64
install: install-indep install-arch
 
65
install-indep:
 
66
        dh_testdir
 
67
        dh_testroot
 
68
        dh_prep -i 
 
69
        dh_installdirs -i
 
70
 
 
71
        # Add here commands to install the indep part of the package into
 
72
        # debian/<package>-doc.
 
73
        #INSTALLDOC#
 
74
 
 
75
        dh_install -i
 
76
 
 
77
install-arch:
 
78
        dh_testdir
 
79
        dh_testroot
 
80
        dh_prep -s 
 
81
        dh_installdirs -s
 
82
 
 
83
        install COPYING.AGPL debian/openvista-libs-5.3004/usr/share/doc/openvista-libs-5.3004/AGPL
 
84
 
 
85
        mkdir -p debian/openvista-libs-5.3004$(GTM_DIST)
 
86
 
 
87
        install src/libopenvista/libopenvista.so debian/openvista-libs-5.3004$(GTM_DIST)
 
88
        install -m 644 src/libopenvista/openvista.xc debian/openvista-libs-5.3004$(GTM_DIST)
 
89
 
 
90
        install src/gtmsignal/gtmsignal debian/openvista-libs-5.3004$(GTM_DIST)
 
91
 
 
92
        dh_install -s
 
93
# Must not depend on anything. This is to be called by
 
94
# binary-arch/binary-indep
 
95
# in another 'make' thread.
 
96
binary-common:
 
97
        dh_testdir
 
98
        dh_testroot
 
99
        dh_installchangelogs 
 
100
        dh_installdocs
 
101
        dh_installexamples
 
102
#       dh_installmenu
 
103
#       dh_installdebconf
 
104
#       dh_installlogrotate
 
105
#       dh_installemacsen
 
106
#       dh_installpam
 
107
#       dh_installmime
 
108
#       dh_python
 
109
#       dh_installinit
 
110
#       dh_installcron
 
111
#       dh_installinfo
 
112
        dh_installman
 
113
        dh_link
 
114
        dh_strip
 
115
        dh_compress
 
116
        dh_fixperms
 
117
        # use group bin for now; will change to group gtm in postinst
 
118
        chown bin:bin debian/openvista-libs-5.3004$(GTM_DIST)/*
 
119
        chmod 440 debian/openvista-libs-5.3004$(GTM_DIST)/*
 
120
        chown root debian/openvista-libs-5.3004$(GTM_DIST)/gtmsignal
 
121
        chmod 4550 debian/openvista-libs-5.3004$(GTM_DIST)/gtmsignal
 
122
#       dh_perl
 
123
        dh_makeshlibs
 
124
        dh_installdeb
 
125
        dh_shlibdeps
 
126
        dh_gencontrol
 
127
        dh_md5sums
 
128
        dh_builddeb
 
129
# Build architecture independant packages using the common target.
 
130
binary-indep: build-indep install-indep
 
131
        $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
 
132
 
 
133
# Build architecture dependant packages using the common target.
 
134
binary-arch: build-arch install-arch
 
135
        $(MAKE) -f debian/rules DH_OPTIONS=-s binary-common
 
136
 
 
137
binary: binary-arch binary-indep
 
138
.PHONY: build clean binary-indep binary-arch binary install install-indep install-arch configure