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