Commit 78fa7251 by Marco Z

Implement deployer scripts for Travis -- OSX and Linux package building

parent 80e30c6a
......@@ -19,3 +19,5 @@ Win32_LIB_ASM_Release
*.db
*.opendb
/.vs
/debian
/assets/debian
cmake_minimum_required(VERSION 3.0)
# DO NOT CHANGE THIS SRB2 STRING! Some variable names depend on this string.
# Version change is fine.
project(SRB2
VERSION 2.1.23
LANGUAGES C)
......@@ -86,8 +88,8 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
set(CMAKE_PDB_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
# Set EXE names so the assets CMakeLists can refer to its target
set(SRB2_SDL2_EXE_NAME srb2)
set(SRB2_WIN_EXE_NAME srb2dd)
set(SRB2_SDL2_EXE_NAME srb2 CACHE STRING "Executable binary output name")
set(SRB2_WIN_EXE_NAME srb2dd CACHE STRING "Executable binary output name for DirectDraw build")
include_directories(${CMAKE_CURRENT_BINARY_DIR}/src)
......@@ -116,8 +118,8 @@ if(${CMAKE_SYSTEM} MATCHES "Darwin")
set(CPACK_GENERATOR "DragNDrop")
endif()
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Sonic Robo Blast 2")
set(CPACK_PACKAGE_VENDOR "Sonic Team Jr.")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Sonic Robo Blast 2" CACHE STRING "Program name for display purposes")
set(CPACK_PACKAGE_VENDOR "Sonic Team Jr." CACHE STRING "Vendor name for display purposes")
#set(CPACK_PACKAGE_DESCRIPTION_FILE )
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE")
set(CPACK_PACKAGE_VERSION_MAJOR ${SRB2_VERSION_MAJOR})
......
*
*.*
*.srb
*.pk3
*.dta
*.wad
*.txt
!README.txt
!LICENSE.txt
!LICENSE-3RD-PARTY.txt
\ No newline at end of file
!LICENSE-3RD-PARTY.txt
!CMakeLists.txt
!debian-template/*
## Assets Target Configuration ##
# MD5 generation
set(SRB2_ASSET_ALL
${CMAKE_CURRENT_SOURCE_DIR}/srb2.srb
${CMAKE_CURRENT_SOURCE_DIR}/player.dta
${CMAKE_CURRENT_SOURCE_DIR}/rings.dta
${CMAKE_CURRENT_SOURCE_DIR}/zones.dta
${CMAKE_CURRENT_SOURCE_DIR}/patch.dta
${CMAKE_CURRENT_SOURCE_DIR}/music.dta
${CMAKE_CURRENT_SOURCE_DIR}/README.txt
${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.txt
${CMAKE_CURRENT_SOURCE_DIR}/LICENSE-3RD-PARTY.txt
# For prepending the current source path, later
FUNCTION(PREPEND var prefix)
SET(listVar "")
FOREACH(f ${ARGN})
LIST(APPEND listVar "${prefix}/${f}")
ENDFOREACH(f)
SET(${var} "${listVar}" PARENT_SCOPE)
ENDFUNCTION(PREPEND)
set(SRB2_ASSET_REQUIRED
"srb2.srb;\
player.dta;\
rings.dta;\
zones.dta;\
patch.dta"
CACHE STRING "Required asset files for packaging. No spaces between entries!"
)
set(SRB2_ASSET_DOCS
"README.txt;\
LICENSE.txt;\
LICENSE-3RD-PARTY.txt"
CACHE STRING "Documentation files; will not fail if they do not exist. Packaged differently from optional assets. No spaces between entries!"
)
set(SRB2_ASSET_OPTIONAL
"music.dta"
CACHE STRING "Optional asset files. No spaces between entries!"
)
# MD5 generation - Filename only, we don't append path to this
set(SRB2_ASSET_HASHED
srb2.srb
player.dta
rings.dta
zones.dta
patch.dta
${SRB2_ASSET_REQUIRED}
)
PREPEND(SRB2_ASSET_REQUIRED ${CMAKE_CURRENT_SOURCE_DIR} ${SRB2_ASSET_REQUIRED})
PREPEND(SRB2_ASSET_DOCS ${CMAKE_CURRENT_SOURCE_DIR} ${SRB2_ASSET_DOCS})
PREPEND(SRB2_ASSET_OPTIONAL ${CMAKE_CURRENT_SOURCE_DIR} ${SRB2_ASSET_OPTIONAL})
foreach(SRB2_ASSET ${SRB2_ASSET_HASHED})
file(MD5 ${CMAKE_CURRENT_SOURCE_DIR}/${SRB2_ASSET} "SRB2_ASSET_${SRB2_ASSET}_HASH")
set(SRB2_ASSET_${SRB2_ASSET}_HASH ${SRB2_ASSET_${SRB2_ASSET}_HASH} PARENT_SCOPE)
......@@ -28,13 +46,29 @@ endforeach()
# Installation
if(CLANG)
if(${CMAKE_SYSTEM} MATCHES Darwin)
get_target_property(outname SRB2SDL2 OUTPUT_NAME)
install(FILES ${SRB2_ASSET_ALL}
install(FILES ${SRB2_ASSET_REQUIRED}
DESTINATION "${outname}.app/Contents/Resources"
)
install(FILES ${SRB2_ASSET_OPTIONAL}
DESTINATION "${outname}.app/Contents/Resources"
OPTIONAL
)
install(FILES ${SRB2_ASSET_DOCS}
DESTINATION .
OPTIONAL
)
else()
install(FILES ${SRB2_ASSET_ALL}
install(FILES ${SRB2_ASSET_REQUIRED}
DESTINATION .
)
install(FILES ${SRB2_ASSET_OPTIONAL}
DESTINATION .
OPTIONAL
)
install(FILES ${SRB2_ASSET_DOCS}
DESTINATION .
OPTIONAL
)
endif()
......@@ -12,9 +12,39 @@ with apt-key add. Thanks!
-- Callum Dickinson <gcfreak_ag20@hotmail.com> Fri, 26 Nov 2010 18:25:31 +1300
---------------
Templating
Note that you MUST run [repo-root]/debian_template.sh before running debuild
on these scripts! debian_template.sh fills these template files with working values.
You should also set PACKAGE_NAME_EMAIL="John Doe <jdoe@example.com>" to match
the identity of the key you will use to sign the package.
Building for Launchpad PPA
Run this step first:
1. source [repo-root]/debian_template.sh
* Initializes defaults for the package variables and fills in templates.
Use these steps to prepare building a source package for Launchpad:
1. cd [repo-root]/assets/
2. debuild -T clean-all (optional; if you already have asset files, this clears them)
Build the source package:
1. debuild -T build (this downloads the asset files from srb2.org if necessary)
2. debuild -S (builds the source package for Launchpad, including the asset files)
Signing for Launchpad PPA
First, follow the above instructions to generate a GnuPG key with your identity. You will need
First, follow Callum's instructions to generate a GnuPG key with your identity. You will need
to publish the fingerprint of that key to Ubuntu's key server.
https://help.ubuntu.com/community/GnuPrivacyGuardHowto#Uploading_the_key_to_Ubuntu_keyserver
......@@ -26,22 +56,18 @@ upload signed source packages and publish them onto your PPA.
IF YOU UPLOAD A PACKAGE and Launchpad does NOT send you a confirmation or rejection email, that
means your key is not set up correctly with your Launchpad account.
Finally, if your packages have not already been signed, follow these steps:
Building for Launchpad PPA
1. cd ..
* Packages are located in the parent folder of where debuild was called
2. debsign "srb2-data_[version]_source.changes"
* You may need to specify -k [key-fingerprint]
Use these steps to prepare building a source package for Launchpad:
1. Highly recommend copying the assets/ folder to outside your repo folder, or else the asset
files may be included in the main source package, when you build that.
2. cd [wherever-your-assets-folder-is]/assets/
3. debuild -T clean (optional, if you already have asset files)
Building the source package is a two-step process:
1. debuild -T build (this downloads the asset files from srb2.org if necessary)
2. debuild -S (builds the source package for Launchpad, including the asset files)
Uploading for Launchpad PPA
Then follow the instructions at <https://help.launchpad.net/Packaging/PPA/Uploading> to upload
Follow the instructions at <https://help.launchpad.net/Packaging/PPA/Uploading> to upload
to your PPA and have Launchpad build your binary deb packages.
-- Marco Zafra <marco.a.zafra@gmail.com> Mon, 26 Nov 2018 21:13:00 -0500
${PACKAGE_NAME}-data (${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION}) ${PACKAGE_DISTRO}; urgency=${PACKAGE_URGENCY}
* ${PROGRAM_NAME} v${PROGRAM_VERSION} asset data
-- ${PACKAGE_NAME_EMAIL} ${__PACKAGE_DATETIME}
# SRB2-data Debian package control file.
Source: srb2-data
Source: ${PACKAGE_NAME}-data
Section: games
Priority: extra
Maintainer: Sonic Team Junior <stjr@srb2.org>
Maintainer: ${PACKAGE_GROUP_NAME_EMAIL}
Build-Depends: debhelper (>= 7.0.50~),
wget
Standards-Version: 3.8.4
Homepage: http://www.srb2.org
Homepage: ${PACKAGE_WEBSITE}
Package: srb2-data
Package: ${PACKAGE_NAME}-data
Architecture: all
Description: A cross-platform 3D Sonic fangame
Sonic Robo Blast 2 is a 3D open-source Sonic the Hedgehog
......
This work was packaged for Debian by:
Marco Zafra <marco.a.zafra@gmail.com> Mon, 26 Nov 2018 14:31:00 -0500
${PACKAGE_NAME_EMAIL} ${__PACKAGE_DATETIME}
It was downloaded from:
<http://srb2.org>
${PACKAGE_WEBSITE}
Upstream Author(s):
Sonic Team Junior <stjr@srb2.org>
${PACKAGE_GROUP_NAME_EMAIL}
Copyright:
Copyright (C) 1998-2018 Sonic Team Junior
Copyright (C) 1998-2018 by Sonic Team Junior
License:
......@@ -21,7 +21,7 @@ License:
The Debian packaging is:
Copyright (C) 2010 Callum Dickinson <gcfreak_ag20@hotmail.com>
Copyright (C) 2010-2018 Sonic Team Junior <stjr@srb2.org>
Copyright (C) 2010-2018 by Sonic Team Junior <stjr@srb2.org>
and is licensed under the GPL version 2,
see "/usr/share/common-licenses/GPL-2".
......@@ -23,6 +23,16 @@
#
#############################################################################
#############################################################################
#
# !!!!!!!!!! DEPLOYER NOTE !!!!!!!!!!
#
# Variables to be templated are curly-braced ${PACKAGE_INSTALL_PATH}
# Variables used by the rules script are parenthese'd $(DATADIR)
# See [repo-root]/debian_template.sh
#
#############################################################################
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
......@@ -37,9 +47,12 @@ RM := rm -rf
DIR := $(shell pwd)
PACKAGE := $(shell cat $(DIR)/debian/control | grep 'Package:' | sed -e 's/Package: //g')
DATAFILES := srb2.srb zones.dta player.dta rings.dta music.dta patch.dta README.txt LICENSE.txt LICENSE-3RD-PARTY.txt
DATAFILES := ${ASSET_FILES_REQUIRED}
DOCFILES := ${ASSET_FILES_DOCS}
OPTIONALFILES := ${ASSET_FILES_OPTIONAL}
GETOPTIONALFILES := ${ASSET_FILES_OPTIONAL_GET}
DATADIR := usr/games/SRB2
DATADIR := $(shell echo "${PACKAGE_INSTALL_PATH}" | sed -e 's/^\///')
RESOURCEDIR := .
WGET := wget -P $(RESOURCEDIR) -c -nc
......@@ -49,18 +62,41 @@ build:
# This will need to be updated every time SRB2 official version is
# Copy data files to their install locations, and add data files to include-binaries
for file in $(DATAFILES); do \
if [ ! -f $(RESOURCEDIR)/$$file ]; then \
$(WGET) http://alam.srb2.org/SRB2/2.1.21-Final/Resources/$$file; \
if [ ! -f $(RESOURCEDIR)/${DEBFILEVAR} ]; then \
$(WGET) ${ASSET_BASE_PATH}/${DEBFILEVAR}; \
fi; \
if [ -f $(RESOURCEDIR)/$$file ]; then \
$(INSTALL) $(RESOURCEDIR)/$$file $(DIR)/debian/tmp/$(DATADIR)/$$file; \
echo $(RESOURCEDIR)/$$file >> $(DIR)/debian/source/include-binaries; \
if [ -f $(RESOURCEDIR)/${DEBFILEVAR} ]; then \
$(INSTALL) $(RESOURCEDIR)/${DEBFILEVAR} $(DIR)/debian/tmp/$(DATADIR)/${DEBFILEVAR}; \
echo $(RESOURCEDIR)/${DEBFILEVAR} >> $(DIR)/debian/source/include-binaries; \
fi; \
if [ ! -f $(DIR)/debian/tmp/$(DATADIR)/$$file ]; then \
echo $(DIR)/debian/tmp/$(DATADIR)/$$file not found and could not be downloaded!; \
if [ ! -f $(DIR)/debian/tmp/$(DATADIR)/${DEBFILEVAR} ]; then \
echo $(DIR)/debian/tmp/$(DATADIR)/${DEBFILEVAR} not found and could not be downloaded!; \
return 1; \
fi; \
done
# Do the same for DOCFILES, but don't error out if not found
for file in $(DOCFILES); do \
if [ ! -f $(RESOURCEDIR)/${DEBFILEVAR} ]; then \
$(WGET) ${ASSET_BASE_PATH}/${DEBFILEVAR}; \
fi; \
if [ -f $(RESOURCEDIR)/${DEBFILEVAR} ]; then \
$(INSTALL) $(RESOURCEDIR)/${DEBFILEVAR} $(DIR)/debian/tmp/$(DATADIR)/${DEBFILEVAR}; \
echo $(RESOURCEDIR)/${DEBFILEVAR} >> $(DIR)/debian/source/include-binaries; \
fi; \
done
# Do the same for OPTIONALFILES if GETOPTIONALFILES == 1
if [ "$(GETOPTIONALFILES)" = "1" ]; then \
for file in $(OPTIONALFILES); do \
if [ ! -f $(RESOURCEDIR)/${DEBFILEVAR} ]; then \
$(WGET) ${ASSET_BASE_PATH}/${DEBFILEVAR}; \
fi; \
if [ -f $(RESOURCEDIR)/${DEBFILEVAR} ]; then \
$(INSTALL) $(RESOURCEDIR)/${DEBFILEVAR} $(DIR)/debian/tmp/$(DATADIR)/${DEBFILEVAR}; \
echo $(RESOURCEDIR)/${DEBFILEVAR} >> $(DIR)/debian/source/include-binaries; \
fi; \
done; \
fi;
binary-indep:
# Generate install folder file
......
srb2-data (2.1.21~7) trusty; urgency=high
* Updated for SRB2 v2.1.21
-- Marco Zafra <marco.a.zafra@gmail.com> Mon, 26 Nov 2018 14:31:00 -0500
srb2-data (2.1.14~1) unstable; urgency=low
* Updated for SRB2 v2.1.14
-- Alam Arias <alam+debian@srb2.org> Sat, 6 Jan 2016 11:00:00 -0500
srb2-data (2.0.6-2) maverick; urgency=high
* Initial proper release..
-- Callum Dickinson <gcfreak_ag20@hotmail.com> Sat, 29 Jan 2011 01:18:42 +1300
......@@ -10,10 +10,38 @@ and give them to your users to install with apt-key add. Thanks!
-- Callum Dickinson <gcfreak_ag20@hotmail.com> Fri, 26 Nov 2010 18:25:31 +1300
---------------
Templating
Note that you MUST run [repo-root]/debian_template.sh before running debuild
on these scripts! debian_template.sh fills these template files with working values.
You should also set PACKAGE_NAME_EMAIL="John Doe <jdoe@example.com>" to match
the identity of the key you will use to sign the package.
Building for Launchpad PPA
Use these steps to prepare building a source package for Launchpad:
1. cd [repo-root]
2. git reset --hard; git clean -fd; git clean -fx;
* Resets your repo folder to a committed state and removes untracked files
* If you built srb2-data in the assets/ folder, MAKE SURE THAT FOLDER DOES NOT HAVE ASSETS,
OR THEY MAY BE INCLUDED IN THE MAIN SOURCE PACKAGE!
Build the source package:
1. source [repo-root]/debian_template.sh
* Initializes defaults for the package variables and fills in templates.
2. debuild -S (builds the source package for Launchpad)
Signing for Launchpad PPA
First, follow the above instructions to generate a GnuPG key with your identity. You will need
First, follow Callum's instructions to generate a GnuPG key with your identity. You will need
to publish the fingerprint of that key to Ubuntu's key server.
https://help.ubuntu.com/community/GnuPrivacyGuardHowto#Uploading_the_key_to_Ubuntu_keyserver
......@@ -25,22 +53,18 @@ upload signed source packages and publish them onto your PPA.
IF YOU UPLOAD A PACKAGE and Launchpad does NOT send you a confirmation or rejection email, that
means your key is not set up correctly with your Launchpad account.
Finally, if your packages have not already been signed, follow these steps:
Building for Launchpad PPA
1. cd ..
* Packages are located in the parent folder of where debuild was called
2. debsign "srb2_[version]_source.changes"
* You may need to specify -k [key-fingerprint]
Use these steps to prepare building a source package for Launchpad:
1. cd [srb2repo]
2. git reset --hard; git clean -fd; git clean -fx;
* Resets your repo folder to a committed state and removes untracked files
* If you built srb2-data in the assets/ folder, MAKE SURE THAT FOLDER DOES NOT HAVE ASSETS,
OR THEY MAY BE INCLUDED IN THE MAIN SOURCE PACKAGE!
Uploading for Launchpad PPA
Building the source package takes just one step:
1. debuild -S (builds the source package for Launchpad)
Then follow the instructions at <https://help.launchpad.net/Packaging/PPA/Uploading> to upload
Follow the instructions at <https://help.launchpad.net/Packaging/PPA/Uploading> to upload
to your PPA and have Launchpad build your binary deb packages.
-- Marco Zafra <marco.a.zafra@gmail.com> Mon, 26 Nov 2018 21:13:00 -0500
${PACKAGE_NAME} (${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION}) ${PACKAGE_DISTRO}; urgency=${PACKAGE_URGENCY}
* ${PROGRAM_NAME} v${PROGRAM_VERSION} program build
-- ${PACKAGE_NAME_EMAIL} ${__PACKAGE_DATETIME}
# SRB2 Debian package control file.
Source: srb2
Source: ${PACKAGE_NAME}
Section: games
Priority: extra
Maintainer: Sonic Team Junior <stjr@srb2.org>
Maintainer: ${PACKAGE_GROUP_NAME_EMAIL}
Build-Depends: debhelper (>= 7.0.50~),
libsdl2-dev,
libsdl2-mixer-dev,
libpng12-dev (>= 1.2.7) | libpng-dev,
libpng-dev | libpng16-dev | libpng12-dev (>= 1.2.7),
zlib1g-dev,
libgme-dev,
libglu1-dev | libglu-dev,
libosmesa6-dev | libgl-dev,
nasm [i386]
Standards-Version: 3.8.4
Homepage: http://www.srb2.org
Homepage: ${PACKAGE_WEBSITE}
Package: srb2
Package: ${PACKAGE_NAME}
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, srb2-data (>= 2.1.15), srb2-data (<= 2.1.23)
Depends: ${SHLIBS_DEPENDS}, ${MISC_DEPENDS},
${PACKAGE_NAME}-data (>> ${PACKAGE_ASSET_MINVERSION}), ${PACKAGE_NAME}-data (<< ${PACKAGE_ASSET_MAXVERSION}),
libsdl2-2.0-0,
libsdl2-mixer-2.0-0,
zlib1g,
libgme0,
libpng | libpng16-16 | libpng12-0
Description: A cross-platform 3D Sonic fangame
Sonic Robo Blast 2 is a 3D open-source Sonic the Hedgehog
fangame built using a modified version of the Doom Legacy
......@@ -28,10 +34,10 @@ Description: A cross-platform 3D Sonic fangame
and quite a lot of the fun that the original Sonic games provided.
Package: srb2-dbg
Package: ${PACKAGE_NAME}-dbg
Architecture: any
# FIXME: should be Depends: ${shlibs:Depends}, ${misc:Depends}, srb2-data (= 2.1.14), srb2 but dh_shlibdeps is being an asshat
Depends: libc6, ${misc:Depends}, srb2-data (>= 2.1.15), srb2-data (<= 2.1.23), srb2
# FIXME: should be Depends: ${SHLIBS_DEPENDS}, ${MISC_DEPENDS}, srb2-data (= 2.1.14), srb2 but dh_shlibdeps is being an asshat
Depends: libc6, ${MISC_DEPENDS}, ${PACKAGE_NAME}-data (>> ${PACKAGE_ASSET_MINVERSION}), ${PACKAGE_NAME}-data (<< ${PACKAGE_ASSET_MAXVERSION}), ${PACKAGE_NAME}
Description: A cross-platform 3D Sonic fangame
Sonic Robo Blast 2 is a 3D open-source Sonic the Hedgehog
fangame built using a modified version of the Doom Legacy
......
This work was packaged for Debian by:
Marco Zafra <marco.a.zafra@gmail.com> Mon, 26 Nov 2018 14:31:00 -0500
${PACKAGE_NAME_EMAIL} ${__PACKAGE_DATETIME}
It was downloaded from:
<http://srb2.org>
${PACKAGE_WEBSITE}
Upstream Author(s):
Sonic Team Junior <stjr@srb2.org>
${PACKAGE_GROUP_NAME_EMAIL}
Copyright:
Copyright (C) 1998-2018 Sonic Team Junior
Copyright (C) 1998-2018 by Sonic Team Junior
License:
......@@ -21,7 +21,7 @@ License:
The Debian packaging is:
Copyright (C) 2010 Callum Dickinson <gcfreak_ag20@hotmail.com>
Copyright (C) 2010-2018 Sonic Team Junior <stjr@srb2.org>
Copyright (C) 2010-2018 by Sonic Team Junior <stjr@srb2.org>
and is licensed under the GPL version 2,
see "/usr/share/common-licenses/GPL-2".
......@@ -23,6 +23,16 @@
#
#############################################################################
#############################################################################
#
# !!!!!!!!!! DEPLOYER NOTE !!!!!!!!!!
#
# Variables to be templated are curly-braced ${PACKAGE_INSTALL_PATH}
# Variables used by the rules script are parenthese'd $(PKGDIR)
# See [repo-root]/debian_template.sh
#
#############################################################################
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
......@@ -50,16 +60,16 @@ DIR := $(shell pwd)
# FIXME: hate hate hate head/tail hack :(
CONTROLF = $(DIR)/debian/control
PACKAGE = srb2
DBGPKG = $(PACKAGE)-dbg
TITLE = Sonic Robo Blast 2
PACKAGE = ${PACKAGE_NAME}
DBGPKG = ${PACKAGE}-dbg
TITLE = ${PROGRAM_NAME}
SECTION = Games/Action
EXENAME = srb2
EXENAME = ${PROGRAM_FILENAME}
DBGNAME = debug/$(EXENAME)
PKGDIR = usr/games/SRB2
PKGDIR = $(shell echo "${PACKAGE_INSTALL_PATH}" | sed -e 's/^\///')
DBGDIR = usr/lib/debug/$(PKGDIR)
LINKDIR = usr/games
LINKDIR = $(shell echo "${PACKAGE_LINK_PATH}" | sed -e 's/^\///')
PIXMAPS_DIR = usr/share/pixmaps
DESKTOP_DIR = usr/share/applications
PREFIX = $(shell test "$(CROSS_COMPILE_BUILD)" != "$(CROSS_COMPILE_HOST)" && echo "PREFIX=$(CROSS_COMPILE_HOST)")
......@@ -102,8 +112,8 @@ binary-arch:
$(INSTALL) $(BINDIR)/$(EXENAME) $(DIR)/debian/tmp/$(PKGDIR)/$(PACKAGE)
$(INSTALL) $(BINDIR)/$(DBGNAME) $(DIR)/debian/tmp/$(DBGDIR)/$(PACKAGE)
# Install desktop file and banner image
$(INSTALL) $(DIR)/srb2.png $(DIR)/debian/tmp/usr/share/pixmaps
$(INSTALL) $(DIR)/debian/srb2.desktop $(DIR)/debian/tmp/usr/share/applications
$(INSTALL) $(DIR)/srb2.png $(DIR)/debian/tmp/usr/share/pixmaps/${PROGRAM_FILENAME}.png
$(INSTALL) $(DIR)/debian/srb2.desktop $(DIR)/debian/tmp/usr/share/applications/${PROGRAM_FILENAME}.desktop
# add compiled binaries to include-binaries
echo $(BINDIR)/$(EXENAME) >> $(DIR)/debian/source/include-binaries
echo $(BINDIR)/$(EXENAME) >> $(DIR)/debian/source/include-binaries
......
......@@ -2,7 +2,7 @@ tar-ignore = "assets/*.srb"
tar-ignore = "assets/*.pk3"
tar-ignore = "assets/*.dta"
tar-ignore = "assets/*.wad"
tar-ignore = "assets/debian/srb2-data/*"
tar-ignore = "assets/debian/${PACKAGE_NAME}-data/*"
tar-ignore = "assets/debian/tmp/*"
tar-ignore = "*.obj"
tar-ignore = "*.dep"
......
[Desktop Entry]
Name=Sonic Robo Blast 2
Comment=A free 3D Sonic the Hedgehog fangame closely inspired by the original Sonic games on the Sega Genesis.
Name=${PROGRAM_NAME}
Comment=${PROGRAM_DESCRIPTION}
Encoding=UTF-8
Exec=/usr/games/SRB2/srb2
Icon=/usr/share/pixmaps/srb2.png
Exec=${PACKAGE_INSTALL_PATH}/${PROGRAM_FILENAME}
Icon=/usr/share/pixmaps/${PROGRAM_FILENAME}.png
Terminal=false
Type=Application
StartupNotify=false
......
srb2 (2.1.23~9) trusty; urgency=high
* SRB2 v2.1.23 release
-- Marco Zafra <marco.a.zafra@gmail.com> Mon, 27 Nov 2018 16:45:00 -0500
srb2 (2.0.6-5) maverick; urgency=high
* Initial proper release..
-- Callum Dickinson <gcfreak_ag20@hotmail.com> Sat, 29 Jan 2011 01:18:42 +1300
#!/bin/bash
# Deployer for Travis-CI
# Debian package templating
#
# Call this script BEFORE running debuild!
# source ./debian_template.sh [clean] [main/asset]
#
# Before running this script,
# you should also set PACKAGE_NAME_EMAIL="John Doe <jdoe@example.com>" to match
# the identity of the key you will use to sign the package.
#
# Get script's actual path
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
# Recursive function for directory crawling
# $1 = Directory root to crawl
# $2 = Code to eval on file
# $3 = Code to eval on directory
# Exposes $dirtails, $dirlevel, and $dirtailname
dirlevel=0 # initialize
dirtails=()
# Utility function to make dira/dirb/dirc string
makedirtailname () {
dirtailname=""
for tail in $dirtails; do
if [[ "$dirtailname" == "" ]]; then
dirtailname="/$tail";
else
dirtailname="$dirtailname/$tail";
fi;
done;
}
evaldirectory () {
if [ -d "$1" ]; then
# Set contextual variables
# dirtails is an array of directory basenames after the crawl root
if (( $dirlevel > 0 )); then
dirtails+=( "$(basename $1)" );
else
dirtails=();
fi;
dirlevel=$((dirlevel+1));
# Generate directory path after the crawl root
makedirtailname;
# Eval our directory with the latest contextual info
# Don't eval on root
if (( $dirlevel > 1 )) && [[ "$3" != "" ]]; then
eval "$3";
fi;
# Iterate entries
for name in $1/*; do
if [ -d "$name" ]; then
# Name is a directory, but don't eval yet
# Recurse so our vars are updated
evaldirectory "$name" "$2" "$3";
# Decrement our directory level and remove a dirtail
unset 'dirtails[ ${#dirtails[@]}-1 ]';
dirlevel=$((dirlevel-1));
makedirtailname;
else
# Name is a file
if [ -f "$name" ] && [[ "$2" != "" ]]; then
eval "$2";
fi;
fi;
done;
# Reset our variables; we're done iterating
if (( $dirlevel == 1 )); then
dirlevel=0;
fi;
fi;
}
#
# Initialize package parameter defaults
#
if [[ "$__DEBIAN_PARAMETERS_INITIALIZED" != "1" ]]; then
. ${DIR}/deployer/travis/deployer_defaults.sh;
fi;
# Clean up after ourselves; we only expect to run this script once
# during buildboting
__DEBIAN_PARAMETERS_INITIALIZED=0
# for envsubst
export __PACKAGE_DATETIME="$(date '+%a, %d %b %Y %H:%M:%S %z')"
export __PACKAGE_DATETIME_DIGIT="$(date -u '+%Y%m%d%H%M%S')"
if [[ "$PACKAGE_REVISION" == "" ]]; then
PACKAGE_REVISION="-$__PACKAGE_DATETIME_DIGIT";
__PACKAGE_REVISION_BY_DATE=1;
export PACKAGE_REVISION=${PACKAGE_REVISION}; # for envsubst
fi;
#
# Clean the old debian/ directories
#
if [[ "$1" == "clean" ]]; then
toclean=$2;
else
toclean=$1;
fi;