6
6
# libtool will stupidly relink against the system version of the library
7
7
# when installing, and create a dependency on the old version of libgimp.
9
## WARNING: compiling without -O2 (DEB_BUILD_OPTIONS=noopt) may produce
10
##undesired effects, especially when scaling JPEG images.
9
## WARNING: compiling without -O2 (DEB_BUILD_OPTIONS=noopt)may produce
10
## undesired effects, especially when scaling JPEG images
12
12
include /usr/share/cdbs/1/rules/debhelper.mk
13
13
include /usr/share/cdbs/1/class/autotools.mk
19
19
micro=$(shell echo ${version} | cut -d. -f3 | cut -d+ -f1)
20
20
nextmicro=$(shell expr ${micro} + 1)
22
LDFLAGS = -Wl,--as-needed
23
23
DEB_CONFIGURE_EXTRA_FLAGS := \
24
--enable-python --disable-print --enable-default-binary
24
--enable-python --without-print --enable-default-binary
25
25
DEB_BUILDDIR := $(DEB_SRCDIR)/build
27
27
DEB_DH_SHLIBDEPS_ARGS_ALL := \
28
-Llibgimp2.0 -l$(CURDIR)/debian/libgimp2.0/usr/lib -Xlibcontroller_midi.so
28
-Llibgimp2.0 -l$(CURDIR)/debian/libgimp2.0/usr/lib
29
DEB_DH_SHLIBDEPS_ARGS_gimp := -Xlibcontroller_midi.so
30
31
# For the stable branch:
31
DEB_DH_MAKESHLIBS_ARGS_libgimp2.0 := -V "libgimp2.0 (>= 2.2.0+rel)"
32
#DEB_DH_MAKESHLIBS_ARGS_libgimp2.0 := -V "libgimp2.0 (>= 2.4.0)"
32
33
# For the development branch:
33
#DEB_DH_MAKESHLIBS_ARGS_libgimp2.0 := \
34
# -V "libgimp2.0 (>= ${version}), libgimp2.0 (<< ${major}.${nextmicro})"
34
DEB_DH_MAKESHLIBS_ARGS_libgimp2.0 := \
35
-V "libgimp2.0 (>= ${version}), libgimp2.0 (<< ${major}.${nextmicro})"
39
40
common-install-impl::
40
41
# Add translation domain to .desktop and .server files
41
42
DOMAIN=$$(grep --max-count 1 '^GETTEXT_PACKAGE[[:space:]]*=' $(DEB_BUILDDIR)/po/Makefile | sed 's/^.*=[[:space:]]\([^[:space:]]\)/\1/'); \
42
for d in $$(find debian/tmp -type f -name "*.desktop" ); do \
43
for d in $$(find debian/tmp -type f -name "*.desktop" ); do \
43
44
echo "Adding translation domain $$DOMAIN to $$d..."; \
44
45
echo "X-Ubuntu-Gettext-Domain=$$DOMAIN" >> $$d; \
47
48
cd po; intltool-update -p
48
49
cd po-libgimp; intltool-update -p
49
50
cd po-plug-ins; intltool-update -p
50
51
cd po-script-fu; intltool-update -p
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
53
# 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 '{}' ';'
55
find $(CURDIR)/debian/tmp -name "*.py[co]" -exec rm '{}' ';'
57
rm debian/tmp/usr/lib/gimp/2.0/plug-ins/uri
60
binary-install/gimp-gnomevfs::
61
# Build gnomevfs URI plugin
62
rm $(DEB_BUILDDIR)/plug-ins/uri/uri.o
64
cd $(DEB_BUILDDIR)/plug-ins/uri && make
66
cp $(DEB_BUILDDIR)/plug-ins/uri/.libs/uri \
67
$(CURDIR)/debian/gimp-gnomevfs/usr/lib/gimp/2.0/plug-ins/uri
69
binary-install/gimp-libcurl::
70
# Build libcurl URI plugin
71
rm $(DEB_BUILDDIR)/plug-ins/uri/uri.o
73
sed -e 's/\(backend_sources.*gnome\)/#\1/' \
74
-e 's/#\(backend_sources.*libcurl\)/\1/' \
75
-e 's/\(am__objects.*gnome\)/#\1/' \
76
-e 's/#\(am__objects.*libcurl\)/\1/' \
77
-e 's/$$(URI_GNOME_VFS/$$(URI_LIBCURL/g' \
78
$(DEB_BUILDDIR)/plug-ins/uri/Makefile > \
79
$(DEB_BUILDDIR)/plug-ins/uri/Makefile.libcurl
80
cd $(DEB_BUILDDIR)/plug-ins/uri && make -f Makefile.libcurl
82
cp $(DEB_BUILDDIR)/plug-ins/uri/.libs/uri \
83
$(CURDIR)/debian/gimp-libcurl/usr/lib/gimp/2.0/plug-ins/uri
68
85
binary-install/gimp-python::
69
dh_python -pgimp-python /usr/lib/gimp/2.0/python
86
dh_pysupport -pgimp-python /usr/lib/gimp/2.0/python
89
sed -i -e 's/libgtk2.0-0 (>= 2.8.0)/libgtk2.0-0 (>= 2.8.17)/' \