~ubuntu-branches/ubuntu/wily/globus-xio-pipe-driver/wily

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Package Import Robot
  • Author(s): Mattias Ellert
  • Date: 2014-09-23 17:07:21 UTC
  • mfrom: (1.1.3)
  • Revision ID: package-import@ubuntu.com-20140923170721-ywgnt4r9wn1a2tj1
Tags: 3.7-1
* Update to Globus Toolkit 6.0
* Drop GPT build system and GPT packaging metadata
* Rename binary package due to dropped soname (this is a plugin)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/usr/bin/make -f
2
2
# -*- makefile -*-
3
3
 
 
4
-include /usr/share/dpkg/buildflags.mk
 
5
 
4
6
name = globus-xio-pipe-driver
5
7
_name = globus_xio_pipe_driver
6
 
soname = 0
7
8
 
8
9
INSTALLDIR = $(CURDIR)/debian/tmp
9
 
GLOBUSPACKAGEDIR = $(INSTALLDIR)$(_datadir)/globus/packages
10
10
 
11
11
_prefix = /usr
12
12
_bindir = $(_prefix)/bin
16
16
_mandir = $(_datadir)/man
17
17
_docdir = $(_datadir)/doc/lib$(name)-dev
18
18
 
19
 
DEB_HOST_ARCH_BITS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_BITS)
20
19
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
21
20
 
22
 
ifeq ($(DEB_HOST_ARCH_BITS), 64)
23
 
flavor = gcc64-$(DEB_HOST_MULTIARCH)
24
 
else
25
 
flavor = gcc32-$(DEB_HOST_MULTIARCH)
26
 
endif
27
 
 
28
21
configure: configure-stamp
29
22
 
30
23
configure-stamp:
31
24
        dh_testdir
32
25
 
33
 
        dh_autotools-dev_updateconfig
34
 
 
35
 
        /usr/share/globus/globus-bootstrap.sh
36
 
 
 
26
        dh_autoreconf
 
27
 
 
28
        CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" \
 
29
        FFLAGS="$(FFLAGS)" CPPFLAGS="$(CPPFLAGS)" \
 
30
        LDFLAGS="$(LDFLAGS) -Wl,--as-needed -Wl,-z,defs" \
37
31
        ./configure \
38
32
           --disable-static \
39
 
           --with-flavor=$(flavor) \
40
 
           --with-docdir=$(_docdir)
 
33
           --prefix=$(_prefix) \
 
34
           --libdir='$${prefix}/lib/$(DEB_HOST_MULTIARCH)' \
 
35
           --sysconfdir=/etc \
 
36
           --localstatedir=/var \
 
37
           --sharedstatedir=/var/lib \
 
38
           --mandir='$${datadir}/man' \
 
39
           --includedir='$${prefix}/include/globus' \
 
40
           --libexecdir='$${datadir}/globus' \
 
41
           --docdir=$(_docdir)
41
42
 
42
43
        # Reduce overlinking
43
44
        sed 's!CC -shared !CC \\$${wl}--as-needed -shared !g' -i libtool
63
64
 
64
65
        if [ -r Makefile ] ; then $(MAKE) distclean ; fi
65
66
 
66
 
        dh_autotools-dev_restoreconfig
67
 
 
68
 
        # Remove autogenerated files
69
 
 
70
 
        rm -f aclocal.m4
71
 
        rm -f compile
72
 
        rm -f configure
73
 
        rm -f install-sh
74
 
        rm -f ltmain.sh
75
 
        rm -f missing
76
 
        rm -f mkinstalldirs
77
 
 
78
 
        rm -f doxygen/Doxyfile*
79
 
        rm -f doxygen/Makefile.am
80
 
        rm -f pkgdata/Makefile.am
81
 
        rm -f pkgdata/*.filelist
82
 
        rm -f pkgdata/*.gpt
83
 
        rm -f pkgdata/$(name).pc
84
 
        rm -f pkgdata/pkg_data_src.pc.in
85
 
        rm -f gptdata.sh
86
 
        rm -f globus_automake*
87
 
        rm -rf autom4te.cache
88
 
 
89
 
        find . -name Makefile.in -exec rm {} ';'
 
67
        dh_autoreconf_clean
90
68
 
91
69
        rm -f build-stamp configure-stamp
92
70
 
93
 
        dh_clean debian/*.install
 
71
        dh_clean
94
72
 
95
73
install: build-stamp
96
74
        dh_testdir
99
77
 
100
78
        $(MAKE) install DESTDIR=$(INSTALLDIR)
101
79
 
102
 
        # This library is opened using lt_dlopenext, so the libtool archive
103
 
        # (.la file) can not be removed - fix libdir and clear dependency_libs
104
 
        # ... and move it to the main package
105
 
        for lib in `find $(INSTALLDIR)$(_libdir) -name 'lib*.la'` ; do \
106
 
          sed -e "s!^libdir=.*!libdir=\'$(_libdir)\'!" \
107
 
              -e "s!^dependency_libs=.*!dependency_libs=\'\'!" -i $$lib ; \
108
 
        done
109
 
        grep 'lib.*\.la$$' $(GLOBUSPACKAGEDIR)/$(_name)/$(flavor)_dev.filelist \
110
 
          >> $(GLOBUSPACKAGEDIR)/$(_name)/$(flavor)_rtl.filelist
111
 
        sed '/lib.*\.la$$/d' \
112
 
          -i $(GLOBUSPACKAGEDIR)/$(_name)/$(flavor)_dev.filelist
 
80
        # Remove libtool archives (.la files)
 
81
        rm $(INSTALLDIR)$(_libdir)/*.la
113
82
 
114
83
        # Remove installed license file
115
 
        rm -f $(INSTALLDIR)$(_docdir)/GLOBUS_LICENSE
116
 
        sed /GLOBUS_LICENSE/d \
117
 
          -i $(GLOBUSPACKAGEDIR)/$(_name)/noflavor_doc.filelist
118
 
 
119
 
        # Generate package filelists
120
 
        cat $(GLOBUSPACKAGEDIR)/$(_name)/$(flavor)_rtl.filelist \
121
 
            $(GLOBUSPACKAGEDIR)/$(_name)/noflavor_doc.filelist \
122
 
          | sed s!^!debian/tmp$(_prefix)! > debian/lib$(name)$(soname).install
123
 
        cat $(GLOBUSPACKAGEDIR)/$(_name)/$(flavor)_dev.filelist \
124
 
          | sed s!^!debian/tmp$(_prefix)! > debian/lib$(name)-dev.install
 
84
        rm $(INSTALLDIR)$(_docdir)/GLOBUS_LICENSE
125
85
 
126
86
binary: binary-arch binary-indep
127
87
 
132
92
        dh_installchangelogs
133
93
        dh_install --fail-missing
134
94
        dh_installman
 
95
        dh_lintian
135
96
        dh_link
136
97
        dh_strip --dbg-package=lib$(name)-dbg
137
98
        dh_compress