~ubuntu-branches/ubuntu/edgy/gimp/edgy-updates

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Holbach
  • Date: 2006-07-10 13:32:45 UTC
  • Revision ID: james.westby@ubuntu.com-20060710133245-ifb5c8dhmz58w5rq
Tags: 2.2.11-3.1ubuntu1
* Resynchronized with Debian, only Ubuntu changes are:
  - debian/patches/10_dont_show_wizard.patch: don't show setup wizard.
  - debian/rules:
    - added gettext Domain to .desktop file.
    - run "intltool-update -p" for the different po directories of the
      package.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/usr/bin/make -f
2
 
# Based on sample debhelper debian/rules file.
3
 
# Written 2 Jun 1998 by Ben Gertzfield <che@debian.org>
4
 
# Hacked 29 May 2000 by Ian McKellar <yakk@gimp.org>
5
 
# Further hacked 20 Jun 2002 by Bastien Nocera <hadess@hadess.net>
6
 
# And again on 14 Nov 2002 by Ari Pollak <ari@debian.org>
7
2
# PLEASE NOTE: when building a development version or a version where the minor
8
3
# library version changes or has changed but the major so version stays the 
9
4
# same, make sure to Build-Conflict on libgimpX.X, Where libgimpX.X contains
11
6
# libtool will stupidly relink against the system version of the library
12
7
# when installing, and create a dependency on the old version of libgimp.
13
8
 
14
 
#export DH_VERBOSE=1
15
 
 
16
 
# These are used for cross-compiling and for saving the configure script
17
 
# from having to guess our platform (since we know it already)
18
 
DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
19
 
DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
20
 
 
21
 
## WARNING: compiling without -O2 may produce undesired effects, especially
22
 
## when scaling JPEG images
23
 
CFLAGS = -Wall -g
24
 
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
25
 
        CFLAGS += -O0
26
 
else
27
 
        CFLAGS += -O2
28
 
endif
29
 
 
30
 
major=2.0
 
9
## WARNING: compiling without -O2 (DEB_BUILD_OPTIONS=noopt) may produce
 
10
##undesired effects, especially when scaling JPEG images.
 
11
 
 
12
include /usr/share/cdbs/1/rules/debhelper.mk
 
13
include /usr/share/cdbs/1/class/autotools.mk
 
14
include /usr/share/cdbs/1/rules/simple-patchsys.mk
31
15
 
32
16
## Read version numbers from the changelog (for upstream dev versions)
33
 
#version=$(shell dpkg-parsechangelog | grep '^Version: ' | sed -e 's/^Version: //' | sed -e 's/-.*//')
34
 
#major=$(shell echo ${version} | cut -d. -f1-2)
35
 
#micro=$(shell echo ${version} | cut -d. -f3 | cut -d+ -f1)
36
 
#nextmicro=$(shell expr ${micro} + 1)
37
 
 
38
 
 
39
 
configure: config.status
40
 
config.status:
41
 
        dh_testdir
42
 
 
43
 
        # Add here commands to compile the pacckage.
44
 
        CC=$(CC) CFLAGS="$(CFLAGS)" ./configure --sysconfdir=/etc \
45
 
        --prefix=/usr --enable-python --mandir=\$${prefix}/share/man \
46
 
        --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \
47
 
        --enable-default-binary --disable-print
48
 
 
49
 
build: configure build-stamp
50
 
build-stamp:
51
 
        dh_testdir
52
 
        $(MAKE)
53
 
 
54
 
#       Commented out because you have to be in X to build the docs, yuck
55
 
#       cd docs && $(MAKE)
56
 
#       cd ..
57
 
        touch build-stamp
58
 
 
59
 
clean:
60
 
        dh_testdir
61
 
        dh_testroot
62
 
 
63
 
        rm -f build-stamp install-stamp
64
 
        # Add here commands to clean up after the build process.
65
 
        -$(MAKE) clean
66
 
        -$(MAKE) distclean
67
 
        find . -name '*.o' -o -name '_libs' -o -name '*.deps' -o -name \
68
 
                '*.lo' -o -name '*.a' -o -name '*.P' -o -name 'Makefile'| xargs rm -rf
69
 
        rm -f config.h config.log config.status libtool
70
 
        rm -f intltool-extract intltool-merge \
71
 
                intltool-update {po,tips}/.intltool-merge-cache{,make} \
72
 
                libgimpmath/test-md5
73
 
        rm -f po-libgimp/*.gmo
74
 
        rm -f plug-ins/pygimp/*.py{c,o}
75
 
        
76
 
ifneq "$(wildcard /usr/share/misc/config.sub)" ""
77
 
        cp -f /usr/share/misc/config.sub config.sub
78
 
endif
79
 
ifneq "$(wildcard /usr/share/misc/config.guess)" ""
80
 
        cp -f /usr/share/misc/config.guess config.guess
81
 
endif
82
 
 
83
 
        dh_clean
84
 
 
85
 
install: install-stamp
86
 
install-stamp: build
87
 
        dh_testdir
88
 
        dh_testroot
89
 
        dh_clean
90
 
        dh_installdirs
91
 
        
92
 
        $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
93
 
        
94
 
        # Remove compiled python files from the distribution, this is done in
95
 
        # postrm using dh_python
96
 
        find ${CURDIR}/debian/tmp -name "*.py[co]" | xargs rm -rf
97
 
        
98
 
        mkdir -p debian/tmp/usr/share/mime-info/ \
99
 
                debian/tmp/usr/share/application-registry/ \
100
 
                debian/tmp/usr/share/pixmaps
101
 
#       install -m644 debian/tmp/usr/share/gimp/2.0/images/wilber-icon.png \
102
 
#               debian/tmp/usr/share/pixmaps/gimp.png
103
 
        install -D -m644 debian/tmp/usr/share/gimp/$(major)/misc/gimp.desktop \
104
 
                debian/tmp/usr/share/applications/gimp-2.2.desktop
105
 
        install -m644 debian/tmp/usr/share/gimp/$(major)/misc/gimp.keys \
106
 
                debian/tmp/usr/share/mime-info/gimp-2.2.keys
107
 
        install -m644 debian/tmp/usr/share/gimp/$(major)/misc/gimp.applications \
108
 
                debian/tmp/usr/share/application-registry/gimp-2.2.applications
109
 
        
 
17
version=$(shell dpkg-parsechangelog | grep '^Version: ' | sed -e 's/^Version: //' | sed -e 's/-.*//')
 
18
major=$(shell echo ${version} | cut -d. -f1-2)
 
19
micro=$(shell echo ${version} | cut -d. -f3 | cut -d+ -f1)
 
20
nextmicro=$(shell expr ${micro} + 1)
 
21
 
 
22
 
 
23
DEB_CONFIGURE_EXTRA_FLAGS := \
 
24
        --enable-python --disable-print --enable-default-binary
 
25
DEB_BUILDDIR := $(DEB_SRCDIR)/build
 
26
 
 
27
DEB_DH_SHLIBDEPS_ARGS_ALL := \
 
28
        -Llibgimp2.0 -l$(CURDIR)/debian/libgimp2.0/usr/lib -Xlibcontroller_midi.so
 
29
 
 
30
# For the stable branch:
 
31
DEB_DH_MAKESHLIBS_ARGS_libgimp2.0 := -V "libgimp2.0 (>= 2.2.0+rel)"
 
32
# For the development branch:
 
33
#DEB_DH_MAKESHLIBS_ARGS_libgimp2.0 := \
 
34
#       -V "libgimp2.0 (>= ${version}), libgimp2.0 (<< ${major}.${nextmicro})"
 
35
 
 
36
clean::
 
37
        rm -rf build
 
38
 
 
39
common-install-impl::
110
40
        # Add translation domain to .desktop and .server files
111
41
        DOMAIN=$$(grep --max-count 1 '^GETTEXT_PACKAGE[[:space:]]*=' $(CURDIR)/po/Makefile | sed 's/^.*=[[:space:]]\([^[:space:]]\)/\1/'); \
112
 
        for d in $$(find debian/tmp -type f -name "*.desktop" ); do \
113
 
                echo "Adding translation domain $$DOMAIN to $$d..."; \
 
42
        for d in $$(find debian/tmp -type f -name "*.desktop" ); do \
 
43
                echo "Adding translation domain $$DOMAIN to $$d..."; \
114
44
                echo "X-Ubuntu-Gettext-Domain=$$DOMAIN" >> $$d; \
115
45
        done;
116
 
 
 
46
        
117
47
        cd po; intltool-update -p
118
48
        cd po-libgimp; intltool-update -p
119
49
        cd po-plug-ins; intltool-update -p
120
50
        cd po-script-fu; intltool-update -p
121
51
 
122
 
        touch install-stamp
123
 
 
124
 
# Build architecture-independent files here.
125
 
binary-indep: build install
126
 
        dh_testdir
127
 
        dh_testroot
128
 
        dh_movefiles -i
129
 
#       dh_installdebconf
130
 
        dh_installdocs -i
131
 
        
132
 
        dh_installexamples -i
133
 
        dh_installmenu -i
134
 
        dh_installcron -i
135
 
        dh_installman -i
136
 
        dh_installinfo -i 
137
 
        dh_installchangelogs -i ChangeLog
138
 
        dh_link -i
139
 
        dh_strip -i
140
 
        dh_compress -i
141
 
        dh_fixperms -i
142
 
#       dh_perl
143
 
        dh_python /usr/lib/gimp/$(major)/python
144
 
 
145
 
#       dh_makeshlibs
146
 
 
147
 
        dh_installdeb -i
148
 
#       dh_perl
149
 
#       dh_shlibdeps
150
 
        dh_gencontrol -i
151
 
        dh_md5sums -i
152
 
        dh_builddeb -i
153
 
 
154
 
# Build architecture-dependent files here.
155
 
binary-arch: build install
156
 
        dh_testdir
157
 
        dh_testroot
158
 
        dh_movefiles -a
159
 
#       dh_installdebconf
160
 
        dh_installdocs -a
161
 
        
162
 
        dh_installexamples -a
163
 
        dh_installmenu -a
164
 
        dh_installcron -a
165
 
        dh_installman -a
166
 
        dh_installinfo -a
167
 
        dh_installchangelogs -a ChangeLog
168
 
        dh_desktop
169
 
        dh_link -a
170
 
        dh_strip -a --dbg-package=gimp-dbg
171
 
        dh_compress -a
172
 
        dh_fixperms -a
173
 
#       dh_perl
174
 
        dh_python -a /usr/lib/gimp/$(major)/python
175
 
 
176
 
        dh_makeshlibs -a -Nlibgimp$(major)
177
 
# For the stable branch:
178
 
        dh_makeshlibs -a -plibgimp$(major) \
179
 
                -V "libgimp2.0 (>= 2.2.0+rel)"
180
 
# For the development branch:
181
 
#       dh_makeshlibs -a -plibgimp$(major) \
182
 
#               -V "libgimp${major} (>= ${version}), \
183
 
#                       libgimp${major} (<< ${major}.${nextmicro})"
184
 
 
185
 
        dh_installdeb -a
186
 
#       dh_perl
187
 
        dh_shlibdeps -a -L libgimp$(major) -l$(CURDIR)/debian/libgimp$(major)/usr/lib -Xlibcontroller_midi.so
188
 
        sed -i -e 's/libfreetype6 (>= 2.1.5-1)/libfreetype6 (>= 2.1.7)/' \
189
 
                debian/gimp.substvars
190
 
        dh_gencontrol -a
191
 
        dh_md5sums -a
192
 
        dh_builddeb -a
193
 
 
194
 
binary: binary-indep binary-arch
195
 
.PHONY: configure build clean binary-indep binary-arch binary
 
52
        mkdir -p debian/tmp/usr/share/mime-info/ \
 
53
                debian/tmp/usr/share/application-registry/ \
 
54
                debian/tmp/usr/share/pixmaps
 
55
        install -D -m644 debian/tmp/usr/share/gimp/2.0/misc/gimp.desktop \
 
56
                debian/tmp/usr/share/applications/gimp-2.2.desktop
 
57
        install -m644 debian/tmp/usr/share/gimp/2.0/misc/gimp.keys \
 
58
                debian/tmp/usr/share/mime-info/gimp-2.2.keys
 
59
        install -m644 debian/tmp/usr/share/gimp/2.0/misc/gimp.applications \
 
60
                debian/tmp/usr/share/application-registry/gimp-2.2.applications
 
61
 
 
62
        # Remove compiled python files from the distribution, this is done in
 
63
        # postrm using dh_python
 
64
        find $(CURDIR)/debian/tmp -name "*.py[co]" -exec xargs rm '{}' ';'
 
65
 
 
66
        dh_movefiles
 
67
 
 
68
binary-install/gimp-python::
 
69
        dh_python -pgimp-python /usr/lib/gimp/2.0/python