Package: xscavenger
Version: 1.4.5-8
Followup-For: Bug #1092434
Control: tags -1 patch ftbfs

Dear Maintainer,

Here is a patch that could help to solve this issue.
It may be not perfect but at least try to simplify the packaging
and be able to build the package (using sbuild on my system).

Thanks,
Patrice
diff --git a/debian/Imakefile.debian b/debian/Imakefile.debian
deleted file mode 100644
index eaabf9f..0000000
--- a/debian/Imakefile.debian
+++ /dev/null
@@ -1,79 +0,0 @@
-# set this to the path where data files should be stored.  LIBDIR
-# is automatically defined by imake, usually to /usr/X11R6/lib/X11, so
-# this should be a good default.
-
-LIBNAME = /usr/lib/games/xscavenger
-
-SRCS = anim.c edit.c scav.c x.c sound.c
-OBJS = $(SRCS:.c=.o)
-
-# the "subst" hack below is because imake uses the C preprocessor, which
-# will interpret an unquoted "/*" as a comment beginning.
-#LIB_DATA = $(subst S,/,..SdataS*)
-LIB_DATA = \
-       ../data/badguy.lbm      \
-       ../data/brownblue.lbm   \
-       ../data/death.raw       \
-       ../data/dig.raw         \
-       ../data/fall.raw        \
-       ../data/flashspiral.lbm \
-       ../data/gems.lbm        \
-       ../data/jungle.lbm      \
-       ../data/levels.scl      \
-       ../data/microman.lbm    \
-       ../data/pop.raw         \
-       ../data/redbrick.lbm    \
-       ../data/reddevil.lbm    \
-       ../data/regularguy.lbm  \
-       ../data/spiralthing.lbm \
-       ../data/victory.raw
-
-
-LOCAL_LIBRARIES = $(XLIB)
-EXTRA_DEFINES = -DLIBNAME=\"$(LIBNAME)\"
-EXTRA_LOAD_FLAGS = -lasound
-
-AllTarget(xscavenger)
-NormalProgramTarget(xscavenger,$(OBJS),,,$(XLIB))
-InstallProgram(xscavenger,/usr/games)
-
-InstallMultipleFlags($(LIB_DATA),$(LIBNAME),-m 644)
-# set this to the path where data files should be stored.  LIBDIR
-# is automatically defined by imake, usually to /usr/X11R6/lib/X11, so
-# this should be a good default.
-
-LIBNAME = /usr/lib/games/xscavenger
-
-SRCS = anim.c edit.c scav.c x.c sound.c
-OBJS = $(SRCS:.c=.o)
-
-# the "subst" hack below is because imake uses the C preprocessor, which
-# will interpret an unquoted "/*" as a comment beginning.
-#LIB_DATA = $(subst S,/,..SdataS*)
-LIB_DATA = \
-       ../data/badguy.lbm      \
-       ../data/brownblue.lbm   \
-       ../data/death.raw       \
-       ../data/dig.raw         \
-       ../data/fall.raw        \
-       ../data/flashspiral.lbm \
-       ../data/gems.lbm        \
-       ../data/jungle.lbm      \
-       ../data/levels.scl      \
-       ../data/microman.lbm    \
-       ../data/pop.raw         \
-       ../data/redbrick.lbm    \
-       ../data/reddevil.lbm    \
-       ../data/regularguy.lbm  \
-       ../data/spiralthing.lbm \
-       ../data/victory.raw
-
-
-LOCAL_LIBRARIES = $(XLIB)
-EXTRA_DEFINES = -DLIBNAME=\"$(LIBNAME)\"
-
-AllTarget(xscavenger)
-NormalProgramTarget(xscavenger,$(OBJS),,,$(XLIB))
-InstallProgram(xscavenger,/usr/games)
-
-InstallMultipleFlags($(LIB_DATA),$(LIBNAME),-m 644)
diff --git a/debian/Imakefile.default b/debian/Imakefile.default
deleted file mode 100644
index 1980627..0000000
--- a/debian/Imakefile.default
+++ /dev/null
@@ -1,20 +0,0 @@
-# set this to the path where data files should be stored.  LIBDIR
-# is automatically defined by imake, usually to /usr/X11R6/lib/X11, so
-# this should be a good default.
-LIBNAME = $(LIBDIR)/scavenger
-
-SRCS = anim.c edit.c scav.c x.c sound.c
-OBJS = $(SRCS:.c=.o)
-
-LIB_DATA = \
-       ../data/badguy.lbm   ../data/brownblue.lbm ../data/death.raw \
-       ../data/dig.raw      ../data/fall.raw      ../data/levels.scl \
-        ../data/microman.lbm ../data/pop.raw       ../data/redbrick.lbm \
-       ../data/reddevil.lbm ../data/regularguy.lbm ../data/spiralthing.lbm \
-       ../data/victory.raw
-
-LOCAL_LIBRARIES = $(XLIB) -lasound
-EXTRA_DEFINES = -DLIBNAME=\"$(LIBNAME)\"
-
-ComplexProgramTarget(scavenger)
-InstallMultipleFlags($(LIB_DATA),$(LIBNAME),-m 644)
diff --git a/debian/install b/debian/install
new file mode 100644
index 0000000..10b4faf
--- /dev/null
+++ b/debian/install
@@ -0,0 +1,2 @@
+debian/xscavenger.desktop usr/share/applications
+debian/xscavenger-icon.xpm usr/share/pixmaps
diff --git a/debian/manpages b/debian/manpages
new file mode 100644
index 0000000..2347827
--- /dev/null
+++ b/debian/manpages
@@ -0,0 +1 @@
+debian/xscavenger.6
diff --git a/debian/rules b/debian/rules
index 4f51fa7..8e81c35 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,141 +1,16 @@
 #!/usr/bin/make -f
-############################ -*- Mode: Makefile -*- ###########################
-## rules ---
-## Author           : Marcus Brinkmann <marcus.brinkm...@ruhr-uni-bochum.de
-## Created On       : Wed, 11 Mar 1998 15:05:54 +0100
-## Created On Node  : localhost
-## Last Modified By : Marcus Brinkmann
-## Last Modified On : Wed, 11 Mar 1998 15:05:54 +0100
-## Last Machine Used: localhost
-## Update Count     : 0
-## Status           : Unknown, Use with caution!
-## HISTORY          :
-## Description      :
-##
-###############################################################################
 
-# The name of the package (for example, `Emacs').
-package   := xscavenger
+%:
+       dh $@ --sourcedirectory=src
 
-# Configuration variables (these should be pretty generic)
-#CC = cc
-CC = gcc
-CFLAGS = `dpkg-buildflags --get CFLAGS` \
-       `dpkg-buildflags --get CPPFLAGS` \
-       `dpkg-buildflags --get LDFLAGS` \
-       `pkg-config --cflags --libs alsa` \
-       -O2 -g -pipe -Wall -Wno-pointer-sign
-ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
-       DONTSTRIP = true
-       LDFLAGS = $(LDFLAGS) -s
-endif
-PREFIX = /usr
-BINDIR = $(PREFIX)/games
-MANDIR = $(PREFIX)/share/man
-MAN6DIR = $(MANDIR)/man6
-DOCDIR = $(PREFIX)/share/doc/$(package)
-#PIXMAPSDIR = $(PREFIX)/X11R6/include/X11/pixmaps
-PIXMAPSDIR = $(PREFIX)/share/pixmaps
+override_dh_auto_configure:
+       cd src && xmkmf && cp scavenger.6 scavenger.man
 
-#  Package specific stuff.  The idea is to try to make the rules
-#  generic (gradually).
+override_dh_auto_build:
+       dh_auto_build -- LIBNAME=/usr/share/games/xscavenger
 
-FILES_TO_CLEAN  = TAGS tags make.aux make.cp make.cps make.fn \
-                       make.fns make.toc debian/files config.cache \
-                       make.dvi make.ps
-DIRS_TO_CLEAN   = debian/tmp
-STAMPS_TO_CLEAN = stamp-build stamp-binary stamp-xmkmf
-
-install_file= install -o root -g root -m 644
-install_program= install -s -o root -g root -m 755
-install_script= install -o root -g root -m 755
-make_directory= install -d -o root -g root -m 755
-
-define checkdir
-       test -f debian/rules
-endef
-
-define checkroot
-       @test 0 = "`id -u`" || (echo need root priviledges; exit 1)
-endef
-
-all build: build-arch build-indep
-build-arch: build-stamp
-build-indep: build-stamp
-
-# Compatibility with archaic build rules
-build-stamp: stamp-build
-
-xmkmf: stamp-xmkmf
-stamp-xmkmf:
-       -cd src && cp ../debian/Imakefile.debian Imakefile && xmkmf && touch 
../stamp-xmkmf
-
-stamp-build:
-       $(checkdir)
-       # build package
-       test -f stamp-xmkmf || $(MAKE) -f debian/rules xmkmf
-       cd src && $(MAKE) CCOPTIONS="$(CFLAGS)"
-       touch stamp-build
-
-clean:
-       $(checkdir)
-       -cd src && test -f Makefile && $(MAKE) clean
-       -rm -f $(FILES_TO_CLEAN) $(STAMPS_TO_CLEAN)
-       -rm -rf $(DIRS_TO_CLEAN)
-       -cd src && mv xscavenger.6 scavenger.6
-       -cd src && cp ../debian/Imakefile.default Imakefile
-       -rm src/Makefile*
-       -rm -f core `find . \( -name '*.orig' -o -name '*.rej' -o -name '*~' \
-               -o -name '*.bak' -o -name '#*#' -o -name '.*.orig' \
-               -o -name '.*.rej' -o -name '.SUMS' -o -size 0 \) -print` TAGS
-       -rm -f debian/substvars
-
-binary:                binary-indep binary-arch
-
-binary-indep:
-
-binary-arch: stamp-binary
-stamp-binary: build
-       $(checkroot)
-       $(checkdir)
-       -rm -rf                 debian/tmp
-
-       $(make_directory) debian/tmp/DEBIAN
-       $(make_directory) debian/tmp$(BINDIR)
-       $(make_directory) debian/tmp/usr/lib/games/$(package)
-       $(make_directory) debian/tmp$(DOCDIR)
-       $(make_directory) debian/tmp$(MAN6DIR)
-       $(make_directory) debian/tmp$(PIXMAPSDIR)
-
-       cd src && $(MAKE) install DESTDIR=../debian/tmp
-       [ "$(DONTSTRIP)" != true ] || \
-               strip -s -R.note -R.comment     debian/tmp$(BINDIR)/xscavenger
-
-       $(install_file)         src/scavenger.6 
debian/tmp$(MAN6DIR)/xscavenger.6
-       gzip -n -9frq           debian/tmp$(MANDIR)/.
-
-       $(install_script)       debian/xscavenger.postinst 
debian/tmp/DEBIAN/postinst
-       $(install_script)       debian/xscavenger.postrm 
debian/tmp/DEBIAN/postrm
-       $(install_script)       debian/xscavenger.prerm debian/tmp/DEBIAN/prerm
-       $(install_file)         debian/xscavenger-icon.xpm 
debian/tmp$(PIXMAPSDIR)/xscavenger-icon.xpm
-
-       # copy doc files but not INSTALL, it won't be needed
-       # compress all but copyright
-       $(install_file)         README debian/tmp$(DOCDIR)/README
-       $(install_file)         CREDITS debian/tmp$(DOCDIR)/CREDITS
-       $(install_file)         DOC debian/tmp$(DOCDIR)/DOC
-#      $(install_file)         TODO debian/tmp$(DOCDIR)/TODO
-       $(install_file)         debian/README.Debian 
debian/tmp$(DOCDIR)/README.Debian
-       $(install_file)         debian/changelog 
debian/tmp$(DOCDIR)/changelog.Debian
-       $(install_file)         changelog debian/tmp$(DOCDIR)/changelog
-       gzip -n -9frq           debian/tmp$(DOCDIR)/.
-       $(install_file)         debian/copyright debian/tmp$(DOCDIR)/copyright
-       $(make_directory)       debian/tmp/usr/share/applications
-       $(install_file)         debian/xscavenger.desktop 
debian/tmp/usr/share/applications/xscavenger.desktop
-
-       dpkg-shlibdeps          debian/tmp$(BINDIR)/xscavenger
-       dpkg-gencontrol         -p$(package) -Pdebian/tmp
-       chown -R root.root      debian/tmp
-       dpkg --build            debian/tmp ..
-
-.PHONY: build clean binary-indep binary-arch binary
+override_dh_auto_install:
+       dh_auto_install -- BINDIR=/usr/games LIBDIR=/usr/share/games
+       mv debian/xscavenger/usr/games/scavenger 
debian/xscavenger/usr/games/xscavenger
+       mv debian/xscavenger/usr/share/games/scavenger 
debian/xscavenger/usr/share/games/xscavenger
+       cp src/scavenger.6 debian/xscavenger.6

Reply via email to