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.
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)
21
## WARNING: compiling without -O2 may produce undesired effects, especially
22
## when scaling JPEG images
24
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
9
## WARNING: compiling without -O2 (DEB_BUILD_OPTIONS=noopt) may produce
10
##undesired effects, especially when scaling JPEG images.
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
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)
39
configure: config.status
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
49
build: configure build-stamp
54
# Commented out because you have to be in X to build the docs, yuck
63
rm -f build-stamp install-stamp
64
# Add here commands to clean up after the build process.
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} \
73
rm -f po-libgimp/*.gmo
74
rm -f plug-ins/pygimp/*.py{c,o}
76
ifneq "$(wildcard /usr/share/misc/config.sub)" ""
77
cp -f /usr/share/misc/config.sub config.sub
79
ifneq "$(wildcard /usr/share/misc/config.guess)" ""
80
cp -f /usr/share/misc/config.guess config.guess
85
install: install-stamp
92
$(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
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
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
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)
23
DEB_CONFIGURE_EXTRA_FLAGS := \
24
--enable-python --disable-print --enable-default-binary
25
DEB_BUILDDIR := $(DEB_SRCDIR)/build
27
DEB_DH_SHLIBDEPS_ARGS_ALL := \
28
-Llibgimp2.0 -l$(CURDIR)/debian/libgimp2.0/usr/lib -Xlibcontroller_midi.so
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})"
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; \
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
124
# Build architecture-independent files here.
125
binary-indep: build install
132
dh_installexamples -i
137
dh_installchangelogs -i ChangeLog
143
dh_python /usr/lib/gimp/$(major)/python
154
# Build architecture-dependent files here.
155
binary-arch: build install
162
dh_installexamples -a
167
dh_installchangelogs -a ChangeLog
170
dh_strip -a --dbg-package=gimp-dbg
174
dh_python -a /usr/lib/gimp/$(major)/python
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})"
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
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
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 '{}' ';'
68
binary-install/gimp-python::
69
dh_python -pgimp-python /usr/lib/gimp/2.0/python