summaryrefslogtreecommitdiff
path: root/debian/rules
diff options
context:
space:
mode:
authorMartin Schulze <joey@finlandia.infodrom.north.de>2002-03-04 18:50:02 +0100
committerMattia Rizzolo <mattia@mapreri.org>2014-10-03 14:05:00 +0000
commit8b372c9248930ae29763202121434d3d676d0f30 (patch)
treee0c052af107a86192d8b261adbb3e8bba8351c84 /debian/rules
parent2d113e8792747151bf5d830f1a1485f2f951f940 (diff)
Imported Debian patch 0.50-5.1debian/0.50-5.1
Diffstat (limited to 'debian/rules')
-rwxr-xr-xdebian/rules135
1 files changed, 135 insertions, 0 deletions
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..898556d
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,135 @@
+#!/usr/bin/make -f
+# Sample debian.rules file - for GNU Hello (1.3).
+# Copyright 1994,1995 by Ian Jackson.
+# I hereby give you perpetual unlimited permission to copy,
+# modify and relicense this file, provided that you do not remove
+# my name from the file itself. (I assert my moral right of
+# paternity under the Copyright, Designs and Patents Act 1988.)
+# This file may have to be extensively modified
+# Copyright 1996 by Kevin Dalley
+#
+
+
+CC = gcc
+CFLAGS = -O2 -g
+# LDFLAGS = -s LDFLAGS is not correctly defined in Makefile.in
+prefix=/usr
+package=xsane
+gimp-version=1.0
+
+build:
+ $(checkdir)
+ -rm -f debian/control
+ cp debian/control.$(package) debian/control
+ ./configure --prefix=$(prefix) --sysconfdir=/etc \
+ --datadir='$$(prefix)/share/doc/$(package)' \
+ --mandir='$$(prefix)/share/man'
+ $(MAKE) CC="$(CC)" CFLAGS="$(CFLAGS)"
+ touch build
+
+clean:
+ $(checkdir)
+ -rm -f build
+ -$(MAKE) -i distclean || $(MAKE) -f Makefile.in distclean
+ -rm -rf *~ debian/*~ debian/files*
+ -rm -rf debian/tmp-xsane debian/tmp-xsane-gimp1.1
+ -rm -f debian/control
+ cp debian/control.$(package) debian/control
+
+binary-indep: checkroot build
+ $(checkdir)
+
+# There are no architecture-independent files to be uploaded
+# generated by this package. If there were any they would be
+# made here.
+
+binary-arch: checkroot build
+ $(checkdir)
+ -rm -rf debian/tmp-xsane debian/tmp-xsane-gimp1.1
+ install -d debian/tmp-$(package) debian/tmp-$(package)/DEBIAN
+ install -d debian/tmp-$(package)$(prefix)/share/doc/$(package)
+ install -d debian/tmp-$(package)$(prefix)/bin
+ install debian/postrm.$(package) debian/tmp-$(package)/DEBIAN/postrm
+ install debian/prerm.$(package) debian/tmp-$(package)/DEBIAN/prerm
+ install debian/postinst.$(package) debian/tmp-$(package)/DEBIAN/postinst
+ install -d debian/tmp-$(package)/usr/share/doc-base
+ install -m 0644 debian/doc-base-$(package) \
+ debian/tmp-$(package)/usr/share/doc-base/xsane
+ $(MAKE) prefix=`pwd`/debian/tmp-$(package)$(prefix) \
+ sysconfdir=`pwd`/debian/tmp-$(package)/etc \
+ CC="$(CC)" CFLAGS="$(CFLAGS)" \
+ INSTALL_PROGRAM='install -s' \
+ install
+ install -d debian/tmp-$(package)$(prefix)/lib/gimp/$(gimp-version)/plug-ins
+ ln -sf ../../../../bin/xsane \
+ debian/tmp-$(package)$(prefix)/lib/gimp/$(gimp-version)/plug-ins
+ for file in xsane.AUTHOR xsane.CHANGES \
+ xsane.IMAGE xsane.LANGUAGES xsane.ONLINEHELP \
+ xsane.PROBLEMS xsane.TODO \
+ xsane-*.lsm; \
+ do \
+ install -m 644 $${file} \
+ debian/tmp-$(package)$(prefix)/share/doc/$(package); \
+ gzip -9v debian/tmp-$(package)$(prefix)/share/doc/$(package)/$${file}; \
+ done
+ ln -s xsane.CHANGES.gz \
+ debian/tmp-$(package)$(prefix)/share/doc/$(package)/changelog.gz
+ ln -s ../sane \
+ debian/tmp-$(package)$(prefix)/share/doc/$(package)/html
+ gzip -9v debian/tmp-$(package)$(prefix)/share/man/man[15]/*
+ install -m 0644 debian/copyright debian/tmp-$(package)$(prefix)/share/doc/$(package)/.
+ install -m 0644 debian/changelog \
+ debian/tmp-$(package)$(prefix)/share/doc/$(package)/changelog.Debian
+ gzip -9v \
+ debian/tmp-$(package)$(prefix)/share/doc/$(package)/changelog.Debian
+ install -d debian/tmp-$(package)/usr/lib/menu
+ install -m 0644 debian/menu.$(package) debian/tmp-$(package)/usr/lib/menu/$(package)
+ dpkg-shlibdeps debian/tmp-$(package)$(prefix)/bin/*
+ strip debian/tmp-$(package)$(prefix)/bin/*
+ dpkg-gencontrol -isp -p$(package) -Pdebian/tmp-$(package)
+ dpkg --build debian/tmp-$(package) ..
+
+define checkdir
+ test -f xsane.INSTALL -a -f debian/rules
+endef
+
+# Below here is fairly generic really
+
+binary: binary-indep binary-arch
+
+source diff:
+ @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
+
+checkroot:
+ $(checkdir)
+ test root = "`whoami`"
+
+# change files so that xsane-gimp1.1 will be built
+xsane-gimp1.1-files:
+ $(checkdir)
+ rm -f debian/changelog.new
+ sed -e'1,1s/xsane /xsane-gimp1.1 /' debian/changelog > \
+ debian/changelog.new
+ mv debian/changelog.new debian/changelog
+ rm -f debian/rules.new
+ sed -e's/^package=xsane$$/package=xsane-gimp1.1/' \
+ -e 's/^gimp-version=1.0$$/gimp-version=1.1/' debian/rules > \
+ debian/rules.new
+ mv debian/rules.new debian/rules
+ chmod a+x debian/rules
+
+# change files so that xsane will be built
+xsane-files:
+ $(checkdir)
+ rm -f debian/changelog.new
+ sed -e'1,1s/xsane-gimp1.1 /xsane /' debian/changelog > \
+ debian/changelog.new
+ mv debian/changelog.new debian/changelog
+ rm -f debian/rules.new
+ sed -e's/^package=xsane-gimp1.1$$/package=xsane/' \
+ -e 's/^gimp-version=1.1$$/gimp-version=1.0/' debian/rules > \
+ debian/rules.new
+ mv debian/rules.new debian/rules
+ chmod a+x debian/rules
+
+.PHONY: binary binary-arch binary-indep clean checkroot