pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Fix the installation procedure for fallingtime.



Module Name:	pkgsrc-wip
Committed By:	Christian Koch <cfkoch%edgebsd.org@localhost>
Pushed By:	cfkoch
Date:		Fri Feb 19 20:08:38 2016 -0800
Changeset:	dff8b2cac881723e2d8fec865412c5d8e4a317e0

Modified Files:
	fallingtime/Makefile
	fallingtime/PLIST
Added Files:
	fallingtime/files/fallingtime.template
Removed Files:
	fallingtime/TODO

Log Message:
Fix the installation procedure for fallingtime.

The falling_time executable insists on getting the game's data from a folder
inside the same working directory as the binary itself. So we install a
script which sets up that environment and then runs the actual game.
Suggested-by: wiz@

While here, fix a typo with the LICENSE.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=dff8b2cac881723e2d8fec865412c5d8e4a317e0

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 fallingtime/Makefile                   | 13 +++++++++++--
 fallingtime/PLIST                      |  3 ++-
 fallingtime/TODO                       |  2 --
 fallingtime/files/fallingtime.template |  6 ++++++
 4 files changed, 19 insertions(+), 5 deletions(-)

diffs:
diff --git a/fallingtime/Makefile b/fallingtime/Makefile
index 2df4db4..0185ef0 100644
--- a/fallingtime/Makefile
+++ b/fallingtime/Makefile
@@ -5,19 +5,28 @@ PKGNAME=	fallingtime-${GITHUB_TAG}
 CATEGORIES=	games
 GITHUB_TAG=	1.0.1	
 MASTER_SITES=	${MASTER_SITE_GITHUB:=cxong/}
-LICENSE=	gpl-v2
 
 MAINTAINER=	cfkoch%edgebsd.org@localhost
 COMMENT=	Arcade game inspired by Fall Down
 HOMEPAGE=	https://github.com/cxong/FallingTime/
+LICENSE=	gnu-gpl-v2
 
+EXTRACT_USING=	gtar
 USE_LANGUAGES+=	c c++
 USE_CMAKE=	yes
-CMAKE_ARGS+=	"-DINSTALL_PREFIX:PATH=${PREFIX}/bin"
+CMAKE_ARGS+=	"-DINSTALL_PREFIX:PATH=${PREFIX}/libexec"
 CMAKE_ARGS+=	"-DINSTALL_DATA_PREFIX:PATH=${PREFIX}/share/fallingtime"
 
 WRKSRC=		${WRKDIR}/${DISTNAME}
 
+pre-install:
+	${SED} s,@@PREFIX@@,${PREFIX},g ${FILESDIR}/fallingtime.template > ${FILESDIR}/fallingtime
+	mkdir -p ${DESTDIR}${PREFIX}/bin
+	${INSTALL_SCRIPT} ${FILESDIR}/fallingtime ${DESTDIR}${PREFIX}/bin/fallingtime
+
+pre-clean:
+	${RM} -f ${FILESDIR}/fallingtime
+
 .include "../../devel/SDL2/buildlink3.mk"
 .include "../../audio/SDL2_mixer/buildlink3.mk"
 .include "../../fonts/SDL2_ttf/buildlink3.mk"
diff --git a/fallingtime/PLIST b/fallingtime/PLIST
index c191f81..480d0e7 100644
--- a/fallingtime/PLIST
+++ b/fallingtime/PLIST
@@ -1,5 +1,6 @@
 @comment $NetBSD$
-bin/falling_time
+bin/fallingtime
+libexec/falling_time
 share/fallingtime/data/LondrinaSolid-Regular.otf
 share/fallingtime/data/graphics/360.png
 share/fallingtime/data/graphics/anim.png
diff --git a/fallingtime/TODO b/fallingtime/TODO
deleted file mode 100644
index cd8794f..0000000
--- a/fallingtime/TODO
+++ /dev/null
@@ -1,2 +0,0 @@
-- No suitable "install" target; AFAICT the game's data MUST reside in a
-  subdirectory of the directory where the main executable resides.
diff --git a/fallingtime/files/fallingtime.template b/fallingtime/files/fallingtime.template
new file mode 100755
index 0000000..0eb8981
--- /dev/null
+++ b/fallingtime/files/fallingtime.template
@@ -0,0 +1,6 @@
+#!/bin/sh
+#
+# $NetBSD$
+# Launcher script for fallingtime.
+
+cd @@PREFIX@@/share/fallingtime && @@PREFIX@@/libexec/falling_time


Home | Main Index | Thread Index | Old Index