Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add install target to makefile; add debian folder #131

Merged
merged 1 commit into from
Nov 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
5 changes: 5 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
gnukem (1.0.1-9~focal) focal; urgency=medium

* no change

-- Craig Langman <[email protected]> Sat, 04 Dec 2021 22:00:00 -0800
1 change: 1 addition & 0 deletions debian/compat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
10
21 changes: 21 additions & 0 deletions debian/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Source: gnukem
Section: games
Priority: optional
Maintainer: Craig Langman <[email protected]>
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'.

23 changes: 23 additions & 0 deletions debian/copyright
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: dave_gnukem
Upstream-Contact: David Joffe <[email protected]>
Source: https://github.com/davidjoffe/dave_gnukem

Files: *
Copyright: 1994-2021+ David Joffe <[email protected]>
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 <https://www.gnu.org/licenses/>
.
On Debian systems, the complete text of the GNU General
Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
1 change: 1 addition & 0 deletions debian/files
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
gnukem_1.0.1-9~focal_source.buildinfo games optional
8 changes: 8 additions & 0 deletions debian/gnukem.desktop
Original file line number Diff line number Diff line change
@@ -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;
Binary file added debian/gnukem.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions debian/gnukem.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
# Must run from its own folder or cannot find data.
cd /opt/gnukem
/opt/gnukem/davegnukem
21 changes: 21 additions & 0 deletions debian/rules
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions debian/source/format
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.0 (quilt)
1 change: 1 addition & 0 deletions debian/source/include-binaries
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
debian/gnukem.png