debian/0000755000000000000000000000000012234113670007165 5ustar debian/README.Debian0000644000000000000000000000210112234113670011220 0ustar Note on the high score file: The high-score file is kept in /var/games/greed and is named greed.hs. These file is writable by group "games", and greed is sgid "games" so that it can write to it. If you want to change the permissions on greed, you should be aware that these file must match -- it must somehow be writable by greed. If it isn't, you're on your own. In earlier versions of greed, the /var/games/greed directory was owned by root:games, and was group-writable. This is no longer the case, so greed cannot recreate these files if they disappear (assuming it ever could, which I've never tested). In this case you should use # dpkg-reconfigure greed You may also want to know that these file is not technically part of the greed package. It is created by the post-install script if it don't already exists, and removed by the pre-remove script when you purge the package. If you're trying to install this Debian package on a RPM or Slackware system, this may be important information for you. -- Josue Abarca , Sat, 17 Apr 2010 03:23:44 -0600 debian/postinst0000644000000000000000000000237712234113670011004 0ustar #!/bin/sh # postinst script for greed set -e case "$1" in configure) GREEDVARDIR="/var/games/greed" SCOREFILE="/var/games/greed/greed.hs" # Old score files are now incompatible # and the permissions and owner of the directory must be updated if dpkg --compare-versions "$2" lt "3.7-1"; then if [ -d $GREEDVARDIR ]; then chown root:root $GREEDVARDIR chmod 755 $GREEDVARDIR fi if [ -f $SCOREFILE ]; then echo -n "Preserving user scores to $SCOREFILE.dpkg-old..." mv -f "$SCOREFILE" "$SCOREFILE".dpkg-old chown root:games "$SCOREFILE".dpkg-old chmod 664 "$SCOREFILE".dpkg-old echo "done." fi fi if [ ! -e $SCOREFILE ]; then touch $SCOREFILE fi # Debian Policy 11.11 # Set permissions, owner and group (fixes permissions of pre 3.4-2 files) chown root:games $SCOREFILE chmod 664 $SCOREFILE ;; abort-upgrade|abort-remove|abort-deconfigure) ;; *) echo "postinst called with unknown argument \`$1'" >&2 exit 1 ;; esac # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. #DEBHELPER# exit 0 debian/rules0000755000000000000000000000030412234113670010242 0ustar #!/usr/bin/make -f # -*- makefile -*- %: dh $@ # Debian Policy 11.11 override_dh_fixperms: dh_fixperms chown root:games debian/greed/usr/games/greed chmod 2755 debian/greed/usr/games/greed debian/postrm0000644000000000000000000000120112234113670010426 0ustar #!/bin/sh # postrm script for greed set -e case "$1" in purge) SCOREFILE="/var/games/greed/greed.hs" OLDSCOREFILE="/var/games/greed/greed.hs.dpkg-old" if [ -f $SCOREFILE ]; then rm -rf $SCOREFILE fi if [ -f $OLDSCOREFILE ]; then rm -rf $OLDSCOREFILE fi ;; remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) ;; *) echo "postrm called with unknown argument \`$1'" >&2 exit 1 ;; esac # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. #DEBHELPER# exit 0 debian/patches/0000755000000000000000000000000012234113670010614 5ustar debian/patches/lockfile.diff0000644000000000000000000000112512234113670013235 0ustar Description: This patch replaces the use of the creat function with the open function in order avoid open and/or truncate an existing lock file/link. Forwarded: yes Bug-Debian: http://bugs.debian.org/692490 Author: Josue Abarca Last-Update: 2013-06-11 --- a/greed.c +++ b/greed.c @@ -583,7 +583,7 @@ int fd, x = 1; if (on) { - while ((fd = creat(LOCKPATH, 0)) == -1) { + while ((fd = open(LOCKPATH, O_RDWR | O_CREAT | O_EXCL, 0)) < 0) { printf("Waiting for scorefile access... %d/15\n", x); if (x++ >= 15) { puts("Overriding stale lock..."); debian/patches/series0000644000000000000000000000007712234113670012035 0ustar greed.xml.diff MakefileCFlags.diff Makefile.diff lockfile.diff debian/patches/Makefile.diff0000644000000000000000000000201312234113670013157 0ustar Description: This patch changes the place where the program saves the high scores file. See Debian Policy 11.11. Also, adds changes in order to respect both CC and CFLAGS. Forwarded: Yes Author: Pierre Machard , Josué Abarca Bug-Debian: http://bugs.debian.org/437088 Last-Update: 2013-06-06 --- a/Makefile +++ b/Makefile @@ -4,9 +4,9 @@ VERS=3.8 -SFILE=/usr/games/lib/greed.hs +SFILE=$(DESTDIR)/var/games/greed/greed.hs # Location of game executable -BIN=/usr/games +BIN=$(DESTDIR)/usr/games greed: greed.c $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -DSCOREFILE=\"$(SFILE)\" -DRELEASE=\"$(VERS)\" -o greed greed.c -O3 -lcurses @@ -19,10 +19,10 @@ install: greed.6 uninstall cp greed $(BIN) - cp greed.6 /usr/share/man/man6/greed.6 + cp greed.6 $(DESTDIR)/usr/share/man/man6/greed.6 uninstall: - rm -f $(BIN)/install /usr/share/man/man6/greed.6 + rm -f $(BIN)/greed $(DESTDIR)/usr/share/man/man6/greed.6 clean: rm -f *~ *.o greed greed-*.tar.gz greed*.rpm *.html debian/patches/MakefileCFlags.diff0000644000000000000000000000106112234113670014241 0ustar Description: Include the build flags in the compilation command. This allow us to compile the software with options like hardening flags enabled. Forwarded: Yes Author: Josué Abarca Last-Update: 2013-09-09 --- a/Makefile +++ b/Makefile @@ -9,7 +9,7 @@ BIN=/usr/games greed: greed.c - $(CC) -DSCOREFILE=\"$(SFILE)\" -DRELEASE=\"$(VERS)\" -o greed greed.c -O3 -lcurses + $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -DSCOREFILE=\"$(SFILE)\" -DRELEASE=\"$(VERS)\" -o greed greed.c -O3 -lcurses greed.6: greed.xml xmlto man greed.xml debian/patches/greed.xml.diff0000644000000000000000000000143612234113670013337 0ustar Description: This patch update the location of docbookx.dtd and the place where the high scores file is stored. Forwarded: not-needed Author: Pierre Machard Last-Update: 2013-06-05 --- a/greed.xml +++ b/greed.xml @@ -1,7 +1,8 @@ + "/usr/share/xml/docbook/schema/dtd/4.1.2/docbookx.dtd" + > greed @@ -79,7 +80,7 @@ FILES -/usr/lib/games/greed.hs +/var/games/greed/greed.hs Default location of Greed high scores. debian/dirs0000644000000000000000000000006012234113670010045 0ustar usr/games/ usr/share/man/man6/ var/games/greed/ debian/control0000644000000000000000000000133712234113670010574 0ustar Source: greed Section: games Priority: optional Maintainer: Debian Games Team Uploaders: Josue Abarca Build-Depends: debhelper (>=9), xmlto, libncurses5-dev Standards-Version: 3.9.4 Vcs-Git: git://anonscm.debian.org/pkg-games/greed.git Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-games/greed.git Homepage: http://www.catb.org/~esr/greed/ Package: greed Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Description: curses-based clone of the DOS free-ware game Greed This is a curses-based clone of the DOS free-ware game Greed. The goal of this game is to try to eat as much as possible of the board before munching yourself into a corner. debian/watch0000644000000000000000000000007412234113670010217 0ustar version=3 http://www.catb.org/~esr/greed/greed-(.+)\.tar\.gzdebian/source/0000755000000000000000000000000012234113670010465 5ustar debian/source/format0000644000000000000000000000001412234113670011673 0ustar 3.0 (quilt) debian/compat0000644000000000000000000000000212234113670010363 0ustar 9 debian/docs0000644000000000000000000000000712234113670010035 0ustar README debian/copyright0000644000000000000000000000367012234113670011126 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: Greed Upstream-Contact: Eric S. Raymond Source: http://catb.org/~esr/greed/ Files: * Copyright: 1989, Written by Matthew T. Day Now maintained by Eric S. Raymond License: BSD-3-clause Files: debian/* Copyright: 2003, Pierre Machard 2010, Josué Abarca License: BSD-3-clause License: BSD-3-clause BSD LICENSE . Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: . Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. . Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. . Neither name of the this project nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. . THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. debian/changelog0000644000000000000000000000671112234113670011044 0ustar greed (3.8-1) unstable; urgency=low * New upstream release. * Makefile.diff and greed.xml.diff patches were updated. * lockfile.diff patch added in order to avoid following symlinks and truncate existing lock files (Closes: #692490). * debian/copyright Format field updated. * debian/control standars version updated to 3.9.4, no changes required. * MakefileCFlags.diff patch added in order to use the buildflags in the makefile. * debian/compat Level changed to 9 in order to use hardened compiler flags. * debian/control - (Build-Depends): Updated to debhelper 9. -- Josue Abarca Tue, 04 Jun 2013 18:24:37 -0600 greed (3.7-1) unstable; urgency=low * Imported Upstream version 3.7. * debian/patches/fix_quit_option.diff removed because the bug was fixed by upstream. * debian/patches/fix_warnings.diff removed because the bug was fixed by upstream. * debian/patches/Makefile.diff updated. * debian/copyright - The license has been changed from GPL-2 to BSD-3-clause. - Updated as per the latest version of the DEP-5 specification. * debian/postinst and debian/postrm were rewritten in to properly handle. the transition to the new format of the score file. * debian/control Standards-Version updated to 3.9.2. + The BSD license is now included directly in `debian/copyright'. * debian/control Vcs-* fields updated. -- Josue Abarca Thu, 17 Nov 2011 12:49:48 -0600 greed (3.6-1) unstable; urgency=low * Imported Upstream version 3.6. * debian/docs READ.ME is now README. * debian/watch The regex is now more specific. * debian/copyright - Use DEP-5 specification. - The license has been changed from BSD-like to GPL-2. * Makefile.diff patch updated. -- Josue Abarca Mon, 14 Jun 2010 22:36:15 -0600 greed (3.4-3) unstable; urgency=low * New Maintainer (closes: #576554) * Debhelper 7 used to simplify debian/rules. * Switch to dpkg-source 3.0 (quilt) format * Makefile.diff patch changed to quilt format it was added in order to change the path where files are installed. Also, adds changes in order to respect both CC and CFLAGS. (closes: 437088) * greed.xml.diff patch changed to quilt format it was added in order to update the location of docbookx.dtd and to update the location of the greed.hs file * fix_quit_option.diff patch changed to quilt format it was added in order to fix debian bug #214086 greed: Really quit quits always * maint-scripts added to fix greed.hs file permissions (closes: #399425) * debian/README.Debian added * DEP-3 doc. added to the patches * debian/control - ${misc:Depends} added - home-page field added - author's name removed from package description - the package is now maintained in Debian Games Team - Vcs-Git and Vcs-Browser added * debian/watch added * debian/docs added * fix_warnings.diff patch added. This patch fixes some "incompatible implicit declarations of built-in functions" warnings -- Josue Abarca Fri, 16 Apr 2010 10:38:43 -0600 greed (3.4-2) unstable; urgency=low * Fix call to quit() in greed.c thanks to Helge Kreutzmann (closes: #214086) -- Pierre Machard Sun, 23 May 2004 21:11:29 +0200 greed (3.4-1) unstable; urgency=low * Initial Release (closes: #208339) -- Pierre Machard Tue, 2 Sep 2003 11:56:51 +0200 debian/NEWS.Debian0000644000000000000000000000151112234113670011043 0ustar greed (3.7-1) unstable; urgency=low Newest score files (since version 3.7) of greed are not compatible with old score files (< version 3.7). If you upgrade to greed 3.7-1 from a version lesser than 3.7, and you have an score file then it will be moved to /var/games/greed/greed.hs.dpkg-old in order to preserve your scores. Please be aware that in the above case any file with name greed.hs.dpkg-old in the greed directory will be overwritten during the upgrade. Downgrade: If greed (>=3.7) is installed or was removed, but not purged, then you must purge the package before installing any version lesser than 3.7. As expected if you purge the greed 3.7-1 package all the score files will be deleted including greed.hs.dpkg-{old,new}. -- Josue Abarca Wed, 16 Nov 2011 14:12:47 -0600