~ubuntu-branches/ubuntu/maverick/gnome-chemistry-utils/maverick

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Bazaar Package Importer
  • Author(s): Micah Gersten
  • Date: 2010-03-29 10:49:13 UTC
  • mfrom: (1.1.6 upstream) (2.1.11 sid)
  • Revision ID: james.westby@ubuntu.com-20100329104913-o335elk75e3emtf8
Tags: 0.10.12-2ubuntu1
* Merge from debian testing (LP: #550972).  Remaining changes:
  - debian/patches/disable_check_omf.dpatch: Added to disable check-doc-omf
    as it requires Internet access
  - debian/patches/00list: Adjusted.

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
# Sample debian/rules that uses debhelper.
4
4
# GNU copyright 1997 to 1999 by Joey Hess.
5
5
 
6
 
# Uncomment this to turn on verbose mode.
7
6
#export DH_VERBOSE=1
8
7
 
9
 
PACKAGE = gnome-chemistry-utils
10
 
 
11
8
include /usr/share/dpatch/dpatch.make
12
9
 
13
 
CFLAGS   = -Wall -g
14
 
CXXFLAGS = -Wall -g
15
 
# -Wl,-z,defs FTBFS
16
 
LDFLAGS  = -Wl,--as-needed
17
 
 
18
 
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
19
 
        CFLAGS += -O0
20
 
        CXXFLAGS += -O0
21
 
else
22
 
        CFLAGS += -O2
23
 
        CXXFLAGS += -O2
24
 
        LDFLAGS += -Wl,-O1
25
 
endif
26
 
 
27
 
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
28
 
  NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
29
 
  MAKEFLAGS += -j$(NUMJOBS)
30
 
endif
31
 
 
32
 
config.status: patch-stamp configure
33
 
        dh_testdir
34
 
        test -r /usr/share/misc/config.sub && \
35
 
            cp -f /usr/share/misc/config.sub config.sub
36
 
        test -r /usr/share/misc/config.guess && \
37
 
            cp -f /usr/share/misc/config.guess config.guess
38
 
        # Add here commands to configure the package.
39
 
        LDFLAGS="$(LDFLAGS)" CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" \
40
 
            ./configure \
41
 
                --prefix=/usr \
42
 
                --mandir=\$${prefix}/share/man \
43
 
                --infodir=\$${prefix}/share/info \
44
 
                --sysconfdir=/etc \
45
 
                --with-gconf-schema-file-dir=\$${datadir}/gconf/schemas \
46
 
                --libexecdir=\$${libdir}/gchemutils \
47
 
                --with-mozilla-libdir=\$${libdir}/xulrunner-addons \
48
 
                --disable-schemas-install \
49
 
                --disable-scrollkeeper \
50
 
                --disable-update-databases
51
 
 
52
 
 
53
 
build: build-stamp
54
 
build-stamp: config.status
55
 
        dh_testdir
56
 
        # Add here commands to compile the package.
57
 
        $(MAKE)
58
 
        touch build-stamp
59
 
 
 
10
DEB_VENDOR := $(shell dpkg-vendor --query vendor)
 
11
 
 
12
LDFLAGS ?=
 
13
LDFLAGS += -Wl,--as-needed
 
14
 
 
15
%:
 
16
        dh $@
 
17
 
 
18
build: patch-stamp
60
19
clean: unpatch
61
 
        dh_testdir
62
 
        dh_testroot
63
 
        [ ! -f Makefile ] || $(MAKE) distclean
64
 
        rm -rf debian/tmp/
 
20
 
 
21
override_dh_auto_configure: patch-stamp configure
 
22
        dh_auto_configure -- \
 
23
            --with-gconf-schema-file-dir=\$${datadir}/gconf/schemas \
 
24
            --libexecdir=\$${libdir}/gchemutils \
 
25
            --with-mozilla-libdir=\$${libdir}/xulrunner-addons \
 
26
            --disable-schemas-install \
 
27
            --disable-scrollkeeper \
 
28
            --disable-update-databases \
 
29
            LDFLAGS="$(LDFLAGS)"
 
30
 
 
31
override_dh_clean:
 
32
        #$(RM) -r debian/tmp/
65
33
        dh_clean po/*.gmo po/.intltool-merge-cache build-stamp patch-stamp
66
34
 
67
 
install: build
68
 
        dh_testdir
69
 
        dh_testroot
70
 
        dh_clean -k 
71
 
        dh_installdirs
72
 
        # Add here commands to install the package into debian/gchemutils.
73
 
        $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
74
 
 
75
 
binary-indep: build install
76
 
binary-arch: build install
77
 
        dh_testdir -a
78
 
        dh_testroot -a
79
 
        dh_installchangelogs -a NEWS
80
 
        dh_installdocs -a
81
 
        dh_install -a --sourcedir=$(CURDIR)/debian/tmp --list-missing -X.la
82
 
        dh_installexamples -a
83
 
        dh_installmenu -a
84
 
        dh_installmime -a
85
 
        dh_lintian -a
86
 
        # dh_desktop -a # deprecated since debhelper (7.2.8)
87
 
        dh_gconf -a
88
 
        # dh_scrollkeeper -a # deprecated since debhelper (7.2.15)
89
 
        dh_icons -a
90
 
        dh_link -a
91
 
        dh_strip -a --dbg-package=libgcu-dbg
92
 
        dh_compress -a -Xexamples
93
 
        dh_fixperms -a
 
35
override_dh_installdirs:
 
36
        dh_installdirs -Ngcu-plugin
 
37
ifneq (,$(filter Ubuntu,$(DEB_VENDOR)))
 
38
        dh_installdirs -pgcu-plugin usr/lib/seamonkey/plugins usr/lib/firefox/plugins
 
39
else
 
40
        dh_installdirs -pgcu-plugin usr/lib/iceape/plugins usr/lib/iceweasel/plugins
 
41
endif
 
42
 
 
43
override_dh_install:
 
44
        dh_install --list-missing -X.la
 
45
 
 
46
override_dh_installchangelogs:
 
47
        dh_installchangelogs NEWS
 
48
 
 
49
override_dh_link:
 
50
        dh_link -Ngcu-plugin
 
51
ifneq (,$(filter Ubuntu,$(DEB_VENDOR)))
 
52
        dh_link -pgcu-plugin \
 
53
            usr/lib/xulrunner-addons/plugins/libmozgcu.so usr/lib/seamonkey/plugins/libmozgcu.so \
 
54
            usr/lib/xulrunner-addons/plugins/libmozgcu.so usr/lib/firefox/plugins/libmozgcu.so
 
55
else
 
56
        dh_link -pgcu-plugin \
 
57
            usr/lib/xulrunner-addons/plugins/libmozgcu.so usr/lib/iceape/plugins/libmozgcu.so \
 
58
            usr/lib/xulrunner-addons/plugins/libmozgcu.so usr/lib/iceweasel/plugins/libmozgcu.so
 
59
endif
 
60
 
 
61
override_dh_strip:
 
62
        dh_strip --dbg-package=libgcu-dbg
 
63
 
 
64
override_dh_makeshlibs:
94
65
        dh_makeshlibs -a -V'libgcu0 (>= 0.10), libgcu0 (<< 0.11)'
95
 
        dh_installdeb -a
96
 
        dh_shlibdeps -a -L libgcu0 -l debian/libgcu0/usr/lib
97
 
        dh_gencontrol -a
98
 
        dh_md5sums -a
99
 
        dh_builddeb -a
100
66
 
101
 
binary: binary-indep binary-arch
102
 
.PHONY: build clean binary-indep binary-arch binary install
 
67
override_dh_gencontrol:
 
68
        dh_gencontrol -Ngcu-plugin
 
69
ifneq (,$(filter Ubuntu,$(DEB_VENDOR)))
 
70
        dh_gencontrol -pgcu-plugin -- -Vvendor:Browser='firefox | seamonkey'
 
71
else
 
72
        dh_gencontrol -pgcu-plugin -- -Vvendor:Browser='iceweasel | iceape'
 
73
endif