File: rules

package info (click to toggle)
globus-xio-pipe-driver 2.2-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 1,260 kB
  • sloc: sh: 9,574; ansic: 470; makefile: 180
file content (148 lines) | stat: -rwxr-xr-x 3,353 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
#!/usr/bin/make -f
# -*- makefile -*-

name = globus-xio-pipe-driver
_name = globus_xio_pipe_driver
version = 2.1
soname = 0

INSTALLDIR = $(CURDIR)/debian/tmp
GLOBUSPACKAGEDIR = $(INSTALLDIR)$(_datadir)/globus/packages

_prefix = /usr
_bindir = $(_prefix)/bin
_sbindir = $(_prefix)/sbin
_libdir = $(_prefix)/lib
_datadir = $(_prefix)/share
_mandir = $(_datadir)/man
_docdir = $(_datadir)/doc/lib$(name)-dev

DEB_HOST_ARCH_CPU ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU)

ifneq (,$(filter $(DEB_HOST_ARCH_CPU), amd64 alpha ia64 s390x ppc64 sparc64))
flavor = gcc64
else
flavor = gcc32
endif

configure: configure-stamp

configure-stamp:
	dh_testdir

	/usr/share/globus/globus-bootstrap.sh

	dh_autotools-dev_updateconfig

	./configure \
	   --disable-static \
	   --with-flavor=$(flavor) \
	   --with-docdir=$(_docdir)

	# Reduce overlinking
	sed 's!CC -shared !CC \\$${wl}--as-needed -shared !g' -i libtool

	touch $@

build: build-arch build-indep

build-arch: build-stamp

build-indep:

build-stamp: configure-stamp
	dh_testdir

	$(MAKE)

	touch $@

clean:
	dh_testdir
	dh_testroot

	if [ -r Makefile ] ; then $(MAKE) distclean ; fi

	dh_autotools-dev_restoreconfig

	# Remove autogenerated files

	rm -f aclocal.m4
	rm -f configure
	rm -f config.guess
	rm -f config.sub
	rm -f ltmain.sh
	rm -f mkinstalldirs

	rm -f doxygen/Doxyfile*
	rm -f doxygen/Makefile.am
	rm -f pkgdata/Makefile.am
	rm -f pkgdata/*.filelist
	rm -f pkgdata/*.gpt
	rm -f pkgdata/$(name).pc
	rm -f pkgdata/pkg_data_src.pc.in
	rm -f gptdata.sh
	rm -f globus_automake*
	rm -rf autom4te.cache

	find . -name Makefile.in -exec rm {} ';'

	rm -f build-stamp configure-stamp

	dh_clean debian/*.install

install: build-stamp
	dh_testdir
	dh_testroot
	dh_prep

	$(MAKE) install DESTDIR=$(INSTALLDIR)

	# This library is opened using lt_dlopenext, so the libtool archive
	# (.la file) can not be removed - fix libdir and clear dependency_libs
	# ... and move it to the main package
	for lib in `find $(INSTALLDIR)$(_libdir) -name 'lib*.la'` ; do \
	  sed -e "s!^libdir=.*!libdir=\'$(_libdir)\'!" \
	      -e "s!^dependency_libs=.*!dependency_libs=\'\'!" -i $$lib ; \
	done
	grep 'lib.*\.la$$' $(GLOBUSPACKAGEDIR)/$(_name)/$(flavor)_dev.filelist \
	  >> $(GLOBUSPACKAGEDIR)/$(_name)/$(flavor)_rtl.filelist
	sed '/lib.*\.la$$/d' \
	  -i $(GLOBUSPACKAGEDIR)/$(_name)/$(flavor)_dev.filelist

	# Remove installed license file
	rm -f $(INSTALLDIR)$(_docdir)/GLOBUS_LICENSE
	sed /GLOBUS_LICENSE/d \
	  -i $(GLOBUSPACKAGEDIR)/$(_name)/noflavor_doc.filelist

	# Generate package filelists
	cat $(GLOBUSPACKAGEDIR)/$(_name)/$(flavor)_rtl.filelist \
	    $(GLOBUSPACKAGEDIR)/$(_name)/noflavor_doc.filelist \
	  | sed s!^!debian/tmp$(_prefix)! > debian/lib$(name)$(soname).install
	cat $(GLOBUSPACKAGEDIR)/$(_name)/$(flavor)_dev.filelist \
	  | sed s!^!debian/tmp$(_prefix)! > debian/lib$(name)-dev.install

binary: binary-arch binary-indep

binary-arch: install
	dh_testdir
	dh_testroot
	dh_installdocs debian/README
	dh_installchangelogs
	dh_install --fail-missing
	dh_installman
	dh_link
	dh_strip --dbg-package=$(name)-dbg
	dh_compress
	dh_fixperms
	dh_perl
	dh_makeshlibs
	dh_installdeb
	dh_shlibdeps -l debian/lib$(name)$(soname)/usr/lib
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary-indep:

.PHONY: binary binary-arch binary-indep build build-arch build-indep clean configure install