summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjc_gargma <jc_gargma@iserlohn-fortress.net>2019-09-25 22:33:59 -0700
committerjc_gargma <jc_gargma@iserlohn-fortress.net>2019-09-25 22:33:59 -0700
commit28f47e04f20dd41b2fc98cc340757ae18082963d (patch)
treede138d226643221d3a56e6097bfacd8d5d5d140b
downloadsingularity-28f47e04f20dd41b2fc98cc340757ae18082963d.tar.xz
Initial commit
-rw-r--r--PKGBUILD57
-rw-r--r--singularity3
-rw-r--r--singularity.desktop11
3 files changed, 71 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 0000000..cf5d87e
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,57 @@
+# Maintainer: jc_gargma <jc_gargma@iserlohn-fortress.net>
+# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
+# Contributor: Lone_Wolf <lonewolf@xs4all.nl>
+# Contributor: sausageandeggs <s_stoakley at hotmail.co.uk>
+
+# # I maintain this because:
+# Arch version desktop file points to raw executable
+
+pkgname=singularity
+pkgver=0.30c
+_pkgver=007
+pkgrel=9
+pkgdesc="Strategy game - simulation of true AI"
+arch=('any')
+url="http://emhsoft.com/singularity/index.html"
+license=('GPL2' 'custom')
+depends=('python2' 'python2-pygame' 'sdl_image' 'sdl_mixer' 'python2-numpy')
+source=("http://www.emhsoft.com/singularity/${pkgname}-${pkgver}-src.tar.gz"
+ "${pkgname}-music-${_pkgver}.zip::http://www.emhsoft.com/singularity/endgame-${pkgname}-music-${_pkgver}.zip"
+ "singularity"
+ "singularity.desktop")
+sha512sums=('ffca50c179b745561a25e3fb3525abb862d72f63f533f8a41472067d0ce94c8a236486c9c40a5040335d84e903c498805d591dc546a92d0a7651105103fe114f'
+ 'ab46e77c833085f0c5b1b46fef72ab807e79ca422ad043ef67a4bf4384cb0177319f21b4bd01496e6c3fc6fe9a2f36ec256e19f0e829ad7bf9f0c5bd38bf0fe5'
+ '30710a6b7cc78f3e341d6b32a632f3e1f76cdc513b481226b710612d47611cccb037b35fdfc3d2a564b8d16683e2b6bec307e1c3cbf3d830dc90d85d821ad049'
+ 'f648c261a95def207852ab8b74daf97abb6fe9486120db2fde55bc056f03325afc2521292fa38ad4a86d72105b678dda2553087fb1686bd07582480d16bfc7f0')
+
+prepare() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ sed -i 's|/usr/bin/env python|/usr/bin/env python2|g' "code/singularity.py"
+
+ find . -name \*.pyc -delete
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ # install game
+ install -Dm644 singularity.py ${pkgdir}/usr/share/singularity/singularity.py
+ cp -R code data "${pkgdir}/usr/share/${pkgname}"
+ cp -R "${srcdir}/endgame-${pkgname}-music-${_pkgver}" "${pkgdir}/usr/share/${pkgname}/music"
+
+ # install shell script
+ install -Dm755 "${srcdir}/singularity" "${pkgdir}/usr/bin/singularity"
+
+ # desktop file
+ install -Dm644 "${srcdir}/singularity.desktop" "${pkgdir}/usr/share/applications/singularity.desktop"
+
+ # license: code is GPL2, but data & music fall under other licenses
+ install -Dm644 README.txt "${pkgdir}/usr/share/doc/${pkgname}/README.txt"
+ install -d "${pkgdir}/usr/share/licenses/${pkgname}/"
+ cd "${pkgdir}/usr/share/licenses/${pkgname}/"
+ ln -s ../../doc/${pkgname}/README.txt .
+
+ python2 -m compileall "${pkgdir}/usr/share/${pkgname}"
+ python2 -O -m compileall "${pkgdir}/usr/share/${pkgname}"
+}
diff --git a/singularity b/singularity
new file mode 100644
index 0000000..28058d2
--- /dev/null
+++ b/singularity
@@ -0,0 +1,3 @@
+#!/bin/sh
+cd /usr/share/singularity
+exec python2 singularity.py "$@"
diff --git a/singularity.desktop b/singularity.desktop
new file mode 100644
index 0000000..160b718
--- /dev/null
+++ b/singularity.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Version=1.0
+Type=Application
+Name=Endgame: Singularity
+Comment=Simulation of true AI
+Icon=/usr/share/singularity/data/images/icon.png
+Exec=singularity
+Path=
+Terminal=false
+StartupNotify=false
+Categories=Game;Simulation;