From 48adbac207264c05e8601362f9165d16258b7e15 Mon Sep 17 00:00:00 2001 From: enigma9o7 <30579733+enigma9o7@users.noreply.github.com> Date: Sat, 4 Dec 2021 22:32:36 -0800 Subject: [PATCH] Add install target to makefile; add debian folder Allows running "make install" to install; includes desktop file, png version of icon, and launcher script. Allows running "debuild" to create deb package. --- Makefile | 30 ++++++++++++++++++++++++++++++ debian/changelog | 5 +++++ debian/compat | 1 + debian/control | 21 +++++++++++++++++++++ debian/copyright | 23 +++++++++++++++++++++++ debian/files | 1 + debian/gnukem.desktop | 8 ++++++++ debian/gnukem.png | Bin 0 -> 993 bytes debian/gnukem.sh | 4 ++++ debian/rules | 21 +++++++++++++++++++++ debian/source/format | 1 + debian/source/include-binaries | 1 + 12 files changed, 116 insertions(+) create mode 100644 debian/changelog create mode 100644 debian/compat create mode 100644 debian/control create mode 100644 debian/copyright create mode 100644 debian/files create mode 100644 debian/gnukem.desktop create mode 100644 debian/gnukem.png create mode 100644 debian/gnukem.sh create mode 100644 debian/rules create mode 100644 debian/source/format create mode 100644 debian/source/include-binaries diff --git a/Makefile b/Makefile index d651b26..199bfa8 100644 --- a/Makefile +++ b/Makefile @@ -106,3 +106,33 @@ fixme: %.o: %.cpp $(CPP) $(CCFLAGS) -c $< -o $@ +# The following was added to support debian packaging. The make install +# command will probably work on other unix like OS but not sure. +# There probably should be some checks for different OS to be perfect. +# Previously there was no install target at all which makes using +# packaging tools harder (easier for me to add install to Makefile). +# Note DESTDIR variable is used by Debian packaging tools for staging +# and PREFIX may already set as environment variable for some distro +# -Craig +ifeq ($(PREFIX),) + PREFIX := /usr/local +endif + +install: + @install -m 755 -d $(DESTDIR)/opt/gnukem + @install -m 755 davegnukem $(DESTDIR)/opt/gnukem + @install -d $(DESTDIR)/usr/share/icons/hicolor/32x32/apps + @install -m 644 debian/gnukem.png $(DESTDIR)/usr/share/icons/hicolor/32x32/apps + @install -d $(DESTDIR)/usr/share/applications + @install -m 644 debian/gnukem.desktop $(DESTDIR)/usr/share/applications + @install -d $(DESTDIR)$(PREFIX)/bin/ + @install -m 755 debian/gnukem.sh $(DESTDIR)$(PREFIX)/bin/gnukem + @cp -r data $(DESTDIR)/opt/gnukem/ + @echo Dave Gnukem Installed. Launch with $(DESTDIR)$(PREFIX)/bin/gnukem + + +uninstall: + rm -rf $(DESTDIR)/opt/gnukem + rm -f $(DESTDIR)$(PREFIX)/bin/gnukem + rm -f $(DESTDIR)/usr/share/applications/gnukem.desktop + rm -f $(DESTDIR)/usr/share/icons/hicolor/32x32/apps/gnukem.png diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..140daae --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +gnukem (1.0.1-9~focal) focal; urgency=medium + + * no change + + -- Craig Langman Sat, 04 Dec 2021 22:00:00 -0800 diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..f599e28 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +10 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..3005d34 --- /dev/null +++ b/debian/control @@ -0,0 +1,21 @@ +Source: gnukem +Section: games +Priority: optional +Maintainer: Craig Langman +Build-Depends: libsdl1.2-dev, libsdl-mixer1.2-dev, debhelper +Standards-Version: 4.5.0 +Homepage: https://djoffe.com/gnukem/ +#Vcs-Browser: https://salsa.debian.org/debian/gnukem +#Vcs-Git: https://salsa.debian.org/debian/gnukem.git +Rules-Requires-Root: no + +Package: gnukem +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, libsdl1.2debian, libsdl-mixer1.2 +Description: Retro platform shooter inspired by Duke Nukem. + Dave Gnukem is a retro-style 2D scrolling platform shooter similar to, + and inspired by, Duke Nukem 1 (~1991). The original Duke Nukem 1 had + 16-color EGA 320x200 graphics; the aim here is 'similar but different' + gameplay and 'look and feel'. It is kind of a parody of the original. + Please note it is not a 'clone', and not a 're-make'. + diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..957f698 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,23 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: dave_gnukem +Upstream-Contact: David Joffe +Source: https://github.com/davidjoffe/dave_gnukem + +Files: * +Copyright: 1994-2021+ David Joffe +License: GPL-2+ + This package 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 package 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, see + . + On Debian systems, the complete text of the GNU General + Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". diff --git a/debian/files b/debian/files new file mode 100644 index 0000000..c5e58bc --- /dev/null +++ b/debian/files @@ -0,0 +1 @@ +gnukem_1.0.1-9~focal_source.buildinfo games optional diff --git a/debian/gnukem.desktop b/debian/gnukem.desktop new file mode 100644 index 0000000..848686d --- /dev/null +++ b/debian/gnukem.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Version=1.0.1 +Name=Dave Gnukem +Comment=Retro Style Platform Game +Type=Application +Exec=gnukem +Icon=gnukem +Categories=Game; diff --git a/debian/gnukem.png b/debian/gnukem.png new file mode 100644 index 0000000000000000000000000000000000000000..f7205a515980149d13f8e3b89e0e7d9b8bd440fc GIT binary patch literal 993 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE3?yBabR7dyEa{HEjtmSN`?>!lvVtU&J%W50 z7^>757#dm_7=8hT8eT9klo~KFyh>nTu$sZZAYL$MSD+0810!F6Pl&6cdO@hUilSOx zf0*`kZ;@_S;YL4A1=Var-7tTbg-)jH%yfEPZ9C*uGD96LFLdS@s@L0@SI8-+{{R2K z*-_9-g-cc`X?JU$jAGo}^gwBaC@HzHDcMnyvO(g~ej1^=CLOl2jp|Y*%KXkE>H*qf zQl1LE+M*IJp)xXJ39`as4)*r;u`)6_GBSF4dR_)<+bZI8b4`RqtqTeYVq;?sO3as6 zqzDL`g@%TTXDRRt8S)9}^6+VJ^C}zFTj{16adFFYa7hbziLrBtdsyvZV;2tgTrDH+ z&C15_WL3+;$`fj1psP~B%)-%}=;oy*mE)n4?q|)!%+?-dp5&+zZmG<~#GDsw8|Pup z$jF%WI^7BwWQVSyJMySIh+L^k;M!Q+(IDCcc92 zI%l>6_3ZX^aSX9IJ@ry<`6UC910SPfw_nJLT2g#%`I=Owr4AD|D$ce#+Wv}ZN#24F zfA@EAn!NqGbU%~&pM1ZnDnG`5{Y(GOmP@#HxS9F)g+rWu0zt(x$4liSpL9%EbTGN4 zYTMgiUURR!O1b}l)5&)K!<&t=GP_$uc;|(^=v;o&u^>iW?T~THJF^zYgo&FD7Ppv5 z@#^y&c3z$Jf$8G+fX~xKOe-S|^UD#p%BtPa)t?~DylzV0t``>`>#nQ&k#~41<8{`mmmfWH1KP5hPhS6UZ^0B- z!ROAc>TAw?Sa`^8)$)+-4^HxGE7v&PaJ8B1Cv3W2s^-`YpWexm&Yb%ap1k%cJ z@z?28*1o^ouXe9|Jpb}TRbb4jmbgZgq$HN4S|t~y0x1R~10zFSLqlC-gAgM_D^m+A p0|RXX10cENvalJ7hTQy=%(P0}8m{)O?gDCH@O1TaS?83{1OSr}c9Z}B literal 0 HcmV?d00001 diff --git a/debian/gnukem.sh b/debian/gnukem.sh new file mode 100644 index 0000000..03ab7c1 --- /dev/null +++ b/debian/gnukem.sh @@ -0,0 +1,4 @@ +#!/bin/sh +# Must run from its own folder or cannot find data. +cd /opt/gnukem +/opt/gnukem/davegnukem diff --git a/debian/rules b/debian/rules new file mode 100644 index 0000000..0d6f53e --- /dev/null +++ b/debian/rules @@ -0,0 +1,21 @@ +#!/usr/bin/make -f +# See debhelper(7) (uncomment to enable) +# output every command that modifies files on the build system. +#export DH_VERBOSE = 1 + + +# see FEATURE AREAS in dpkg-buildflags(1) +#export DEB_BUILD_MAINT_OPTIONS = hardening=+all + +# see ENVIRONMENT in dpkg-buildflags(1) +# package maintainers to append CFLAGS +#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic +# package maintainers to append LDFLAGS +#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed + + +%: + dh $@ + +override_dh_auto_install: + dh_auto_install -- PREFIX=/usr diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/debian/source/include-binaries b/debian/source/include-binaries new file mode 100644 index 0000000..549b6bb --- /dev/null +++ b/debian/source/include-binaries @@ -0,0 +1 @@ +debian/gnukem.png