--- pathological-1.1.3.orig/Makefile +++ pathological-1.1.3/Makefile @@ -2,59 +2,60 @@ DATADIR = $(DESTDIR)/usr/share/games/pathological -all: write-highscores html/wheel.png +all: write-highscores docs write-highscores: write-highscores.c gcc -s -o write-highscores write-highscores.c +docs: html/wheel.png html/wheel.png: ./makehtml -install: all - mkdir -p $(DATADIR) - cp pathological.py $(DATADIR)/ - cp -r circuits graphics music sounds $(DATADIR)/ +install: install-dep install-indep install-scores + +# Install architecture-independent data +install-indep: + install -d $(DATADIR) + install -D -m 755 pathological.py $(DATADIR)/pathological.py + cp -r circuits graphics sounds $(DATADIR)/ rm -f $(DATADIR)/graphics/*.xcf rm -f $(DATADIR)/sounds/*.orig - mkdir -p $(DESTDIR)/usr/games - cp pathological $(DESTDIR)/usr/games/ - - mkdir -p $(DESTDIR)/usr/lib/pathological/bin - cp write-highscores $(DESTDIR)/usr/lib/pathological/bin - - # The following changes should also be performed in a post-install script - -chgrp games $(DESTDIR)/usr/lib/pathological/bin/write-highscores - -chmod 2755 $(DESTDIR)/usr/lib/pathological/bin/write-highscores + install -D -m 755 pathological $(DESTDIR)/usr/games/pathological - mkdir -p $(DESTDIR)/usr/X11R6/include/X11/pixmaps - cp pathological.xpm $(DESTDIR)/usr/X11R6/include/X11/pixmaps + zcat pathological.6.gz > pathological.6 + install -D -m 644 pathological.6 $(DESTDIR)/usr/share/man/man6/pathological.6 - mkdir -p $(DESTDIR)/var/games - cp pathological_scores $(DESTDIR)/var/games - - # The following changes should also be performed in a post-install script - -chgrp games $(DESTDIR)/var/games/pathological_scores - -chmod 664 $(DESTDIR)/var/games/pathological_scores + install -d $(DESTDIR)/usr/share/doc/pathological + cp -r html $(DESTDIR)/usr/share/doc/pathological - mkdir -p $(DESTDIR)/usr/share/man/man6 - cp pathological.6.gz $(DESTDIR)/usr/share/man/man6 + install -D -m 644 pathological.xpm $(DESTDIR)/usr/share/pixmaps/pathological.xpm - mkdir -p $(DESTDIR)/usr/share/doc/pathological - cp -r html $(DESTDIR)/usr/share/doc/pathological +# Install architecture-dependent data +install-dep: + install -d $(DESTDIR)/var/games + install -D -m 2755 --owner=root --group=games write-highscores $(DESTDIR)/usr/lib/games/pathological/bin/write-highscores + +# Install the scores file, if it doesn't already exist. +install-scores: + if [ ! -e $(DESTDIR)/var/games/pathological_scores ]; then \ + install -D -m 644 pathological_scores $(DESTDIR)/var/games/pathological_scores; \ + fi uninstall: rm -rf $(DATADIR) - rm -rf $(DESTDIR)/usr/lib/pathological + rm -rf $(DESTDIR)/usr/lib/games/pathological rm -f $(DESTDIR)/usr/games/pathological - rm -f $(DESTDIR)/usr/X11R6/include/X11/pixmaps/pathological.xpm + rm -f $(DESTDIR)/usr/share/pixmaps/pathological.xpm rm -f $(DESTDIR)/usr/share/man/man6/pathological.6.gz purge: uninstall rm -f $(DESTDIR)/var/games/pathological_scores empty: distclean +distclean: clean -distclean: +clean: rm -f write-highscores rm -f html/*.png + rm -f pathological.6 --- pathological-1.1.3.orig/pathological.py +++ pathological-1.1.3/pathological.py @@ -1,4 +1,5 @@ #!/usr/bin/python +# -*- coding: iso-8859-1 -*- """ Copyright (C) 2003 John-Paul Gignac @@ -22,7 +23,7 @@ from pygame.locals import * # Parse the command line -highscores_file = "pathological_scores" +highscores_file = os.path.join(os.environ["HOME"], ".pathological_scores") screenshot = 0 fullscreen = 0 colorblind = 0 @@ -51,7 +52,7 @@ # The location of the setgid script for writing highscores # This script is only used if the highscores file is not writable directly -write_highscores = "/usr/lib/pathological/bin/write-highscores" +write_highscores = "/usr/lib/games/pathological/bin/write-highscores" # Game constants wheel_steps = 9 --- pathological-1.1.3.orig/pathological +++ pathological-1.1.3/pathological @@ -32,8 +32,4 @@ cd /usr/share/games/pathological -if [ -z "$scoresfile" ]; then - scoresfile=/var/games/pathological_scores -fi - -exec ./pathological.py $options $scoresfile +exec ./pathological.py $options --- pathological-1.1.3.orig/debian/README.Debian +++ pathological-1.1.3/debian/README.Debian @@ -0,0 +1,6 @@ +write-highscores +---------------- +Normally, pathological comes with a small score writer program, that is +installed setgid. Since there is some debate at this time (Aug 01 2003) on +debian-devel as to how to properly handle packages like this, Pathological +in Debian currently only writes scores to your home directory. --- pathological-1.1.3.orig/debian/pathological.desktop +++ pathological-1.1.3/debian/pathological.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Type=Application +Encoding=UTF-8 +Name=Pathological +Icon=pathological.xpm +GenericName=A puzzle game involving paths and marbles +Exec=pathological +Categories=Application;Game;LogicGame --- pathological-1.1.3.orig/debian/changelog +++ pathological-1.1.3/debian/changelog @@ -0,0 +1,33 @@ +pathological (1.1.3-4) unstable; urgency=low + + * Remove pathological-score-related cruft in debian/. + * Add an fd.o .desktop entry. (Closes: #235860) + * Add an encoding string to pathological.py. (Closes: #217116) + * Quote the section and environment in the menu file. + + -- Joe Wreschnig Fri, 01 Aug 2003 14:46:15 -0500 + +pathological (1.1.3-3) unstable; urgency=low + + * On second thought, remove the setgid program altogether, and only + write to the users' high score file, based on discussions about + things I'm probably doing wrong on d-devel. + + -- Joe Wreschnig Fri, 01 Aug 2003 14:46:15 -0500 + +pathological (1.1.3-2) unstable; urgency=low + + * Fix the short description. (Closes: #203480) + * Split off the music from the main package. (Closes: #203479) + * Add correct Build-Depends-Indep. + * Remove dh_python call (we don't use any of the compiled stuff.) + + -- Joe Wreschnig Wed, 30 Jul 2003 14:37:39 -0500 + +pathological (1.1.3-1) unstable; urgency=low + + * Initial Release. (Closes: #200178) + * Patch the upstream Makefile to separate the build rules, and use + install(1) instead of cp(1). + + -- Joe Wreschnig Sat, 19 Jul 2003 13:40:00 -0500 --- pathological-1.1.3.orig/debian/compat +++ pathological-1.1.3/debian/compat @@ -0,0 +1 @@ +4 --- pathological-1.1.3.orig/debian/pathological.docs +++ pathological-1.1.3/debian/pathological.docs @@ -0,0 +1,2 @@ +README +TODO --- pathological-1.1.3.orig/debian/pathological.menu +++ pathological-1.1.3/debian/pathological.menu @@ -0,0 +1,3 @@ +?package(pathological):needs="X11" section="Games/Puzzles"\ + title="Pathological" command="/usr/games/pathological"\ + icon="/usr/share/pixmaps/pathological.xpm" --- pathological-1.1.3.orig/debian/copyright +++ pathological-1.1.3/debian/copyright @@ -0,0 +1,23 @@ +This package was debianized by Joe Wreschnig on +Sat, 19 Jul 2003 13:40:00 -0500. + +It was downloaded from http://pathological.sourceforge.net/ + +Copyright (C) 2003 John-Paul Gignac + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +On Debian GNU/Linux systems, the complete text of the GNU General +Public License can be found in `/usr/share/common-licenses/GPL'. --- pathological-1.1.3.orig/debian/control +++ pathological-1.1.3/debian/control @@ -0,0 +1,17 @@ +Source: pathological +Section: games +Priority: optional +Maintainer: Joe Wreschnig +Build-Depends-Indep: debhelper (>> 4.0.0), netpbm +Standards-Version: 3.6.0 + +Package: pathological +Architecture: all +Depends: python, python-pygame, pathological-music +Conflicts: pathological-scores +Description: puzzle game involving paths and marbles + Pathological is an enriched clone of the game "Logical" by Rainbow Arts. + To solve a level, fill each wheel with four marbles of matching color. + Various board elements such as teleporters, switches, filters, etc., make + the game interesting and challenging. New levels can be created using your + favorite text editor. --- pathological-1.1.3.orig/debian/rules +++ pathological-1.1.3/debian/rules @@ -0,0 +1,66 @@ +#!/usr/bin/make -f +# Based off the dh_make template for multiple binary packages. +# Also based off John-Paul Gignac's original Pathological package for woody + +export DH_OPTIONS + +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 + +configure: configure-stamp +configure-stamp: + dh_testdir + touch configure-stamp + +build: + $(MAKE) docs + +clean: + dh_testdir + dh_testroot + rm -f configure-stamp + + -$(MAKE) clean + + dh_clean + +install: + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + $(MAKE) install-indep DESTDIR=$(CURDIR)/debian/pathological + install -D -m 644 debian/pathological.desktop $(CURDIR)/debian/pathological//usr/share/applications/pathological.desktop + + dh_install + +# Build architecture independant packages using the common target. +binary-indep: build install + dh_testdir + dh_testroot + dh_installchangelogs changelog + dh_installdocs + dh_installexamples + dh_installmenu + dh_installman + dh_shlibdeps + dh_link + dh_strip + dh_compress + #dh_fixperms -Xwrite-highscores + dh_installdeb + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-arch binary-indep +.PHONY: build clean binary-indep binary-arch binary install install-indep install-arch configure