mirror of
https://github.com/void-linux/void-packages.git
synced 2025-06-05 06:33:50 +02:00
endless-sky-gl21: merge data, use --install-sandbox
This commit is contained in:
parent
f3180e2f83
commit
400a18fc3b
3 changed files with 69 additions and 17 deletions
|
@ -1 +0,0 @@
|
||||||
endless-sky-gl21
|
|
|
@ -1,6 +1,6 @@
|
||||||
--- a/SConstruct.old 2017-12-06 12:54:20.524502000 -0800
|
--- a/SConstruct
|
||||||
+++ b/SConstruct 2017-12-12 12:39:21.764384877 -0800
|
+++ b/SConstruct
|
||||||
@@ -18,7 +18,7 @@
|
@@ -18,7 +18,7 @@ if 'SCHROOT_CHROOT_NAME' in os.environ a
|
||||||
env.Append(LINKFLAGS = ["-static-libstdc++"])
|
env.Append(LINKFLAGS = ["-static-libstdc++"])
|
||||||
|
|
||||||
opts = Variables()
|
opts = Variables()
|
||||||
|
@ -9,12 +9,72 @@
|
||||||
opts.Add(PathVariable("DESTDIR", "Destination root directory", "", PathVariable.PathAccept))
|
opts.Add(PathVariable("DESTDIR", "Destination root directory", "", PathVariable.PathAccept))
|
||||||
opts.Add(EnumVariable("mode", "Compilation mode", "release", allowed_values=("release", "debug", "profile")))
|
opts.Add(EnumVariable("mode", "Compilation mode", "release", allowed_values=("release", "debug", "profile")))
|
||||||
opts.Update(env)
|
opts.Update(env)
|
||||||
@@ -66,7 +66,7 @@
|
@@ -66,22 +66,22 @@ sky = env.Program("endless-sky", Glob("b
|
||||||
|
|
||||||
|
|
||||||
# Install the binary:
|
# Install the binary:
|
||||||
-env.Install("$DESTDIR$PREFIX/games", sky)
|
-env.Install("$DESTDIR$PREFIX/games", sky)
|
||||||
+env.Install("$DESTDIR$PREFIX/bin", sky)
|
+install = env.Install("$PREFIX/bin", sky)
|
||||||
|
|
||||||
# Install the desktop file:
|
# Install the desktop file:
|
||||||
env.Install("$DESTDIR$PREFIX/share/applications", "endless-sky.desktop")
|
-env.Install("$DESTDIR$PREFIX/share/applications", "endless-sky.desktop")
|
||||||
|
+install += env.Install("$PREFIX/share/applications", "endless-sky.desktop")
|
||||||
|
|
||||||
|
# Install app center metadata:
|
||||||
|
-env.Install("$DESTDIR$PREFIX/share/appdata", "endless-sky.appdata.xml")
|
||||||
|
+install += env.Install("$PREFIX/share/appdata", "endless-sky.appdata.xml")
|
||||||
|
|
||||||
|
# Install icons, keeping track of all the paths.
|
||||||
|
# Most Ubuntu apps supply 16, 22, 24, 32, 48, and 256, and sometimes others.
|
||||||
|
sizes = ["16x16", "22x22", "24x24", "32x32", "48x48", "256x256"]
|
||||||
|
icons = []
|
||||||
|
for size in sizes:
|
||||||
|
- destination = "$DESTDIR$PREFIX/share/icons/hicolor/" + size + "/apps/endless-sky.png"
|
||||||
|
+ destination = "$PREFIX/share/icons/hicolor/" + size + "/apps/endless-sky.png"
|
||||||
|
icons.append(destination)
|
||||||
|
- env.InstallAs(destination, "icons/icon_" + size + ".png")
|
||||||
|
+ install += env.InstallAs(destination, "icons/icon_" + size + ".png")
|
||||||
|
|
||||||
|
# If any of those icons changed, also update the cache.
|
||||||
|
# Do not update the cache if we're not installing into "usr".
|
||||||
|
@@ -90,28 +90,30 @@ if env.get("PREFIX").startswith("/usr/")
|
||||||
|
env.Command(
|
||||||
|
[],
|
||||||
|
icons,
|
||||||
|
- "gtk-update-icon-cache -t $DESTDIR$PREFIX/share/icons/hicolor/")
|
||||||
|
+ "gtk-update-icon-cache -t $PREFIX/share/icons/hicolor/")
|
||||||
|
|
||||||
|
# Install the man page.
|
||||||
|
env.Command(
|
||||||
|
- "$DESTDIR$PREFIX/share/man/man6/endless-sky.6.gz",
|
||||||
|
+ "$PREFIX/share/man/man6/endless-sky.6.gz",
|
||||||
|
"endless-sky.6",
|
||||||
|
"gzip -c $SOURCE > $TARGET")
|
||||||
|
|
||||||
|
# Install the data files.
|
||||||
|
def RecursiveInstall(env, target, source):
|
||||||
|
rootIndex = len(env.Dir(source).abspath) + 1
|
||||||
|
+ inst = []
|
||||||
|
for node in env.Glob(os.path.join(source, '*')):
|
||||||
|
if node.isdir():
|
||||||
|
name = node.abspath[rootIndex:]
|
||||||
|
- RecursiveInstall(env, os.path.join(target, name), node.abspath)
|
||||||
|
+ inst += RecursiveInstall(env, os.path.join(target, name), node.abspath)
|
||||||
|
else:
|
||||||
|
- env.Install(target, node)
|
||||||
|
-RecursiveInstall(env, "$DESTDIR$PREFIX/share/games/endless-sky/data", "data")
|
||||||
|
-RecursiveInstall(env, "$DESTDIR$PREFIX/share/games/endless-sky/images", "images")
|
||||||
|
-RecursiveInstall(env, "$DESTDIR$PREFIX/share/games/endless-sky/sounds", "sounds")
|
||||||
|
-env.Install("$DESTDIR$PREFIX/share/games/endless-sky", "credits.txt")
|
||||||
|
-env.Install("$DESTDIR$PREFIX/share/games/endless-sky", "keys.txt")
|
||||||
|
+ inst += env.Install(target, node)
|
||||||
|
+ return inst
|
||||||
|
+install += RecursiveInstall(env, "$PREFIX/share/games/endless-sky/data", "data")
|
||||||
|
+install += RecursiveInstall(env, "$PREFIX/share/games/endless-sky/images", "images")
|
||||||
|
+install += RecursiveInstall(env, "$PREFIX/share/games/endless-sky/sounds", "sounds")
|
||||||
|
+install += env.Install("$PREFIX/share/games/endless-sky", "credits.txt")
|
||||||
|
+install += env.Install("$PREFIX/share/games/endless-sky", "keys.txt")
|
||||||
|
|
||||||
|
# Make the word "install" in the command line do an installation.
|
||||||
|
-env.Alias("install", "$DESTDIR$PREFIX")
|
||||||
|
+env.Alias("install", install)
|
||||||
|
|
|
@ -1,24 +1,17 @@
|
||||||
# Template file for 'endless-sky-gl21'
|
# Template file for 'endless-sky-gl21'
|
||||||
pkgname=endless-sky-gl21
|
pkgname=endless-sky-gl21
|
||||||
version=0.9.2.20170822
|
version=0.9.2.20170822
|
||||||
revision=2
|
revision=3
|
||||||
_commit=fc707954b0eb61ff2bb6888c5712e6b55d1c2f91
|
_commit=fc707954b0eb61ff2bb6888c5712e6b55d1c2f91
|
||||||
wrksrc="endless-sky-${_commit}"
|
wrksrc="endless-sky-${_commit}"
|
||||||
build_style=scons
|
build_style=scons
|
||||||
hostmakedepends="scons"
|
hostmakedepends="scons"
|
||||||
makedepends="SDL2-devel glew-devel libjpeg-turbo-devel libmad-devel libopenal-devel libpng-devel"
|
makedepends="SDL2-devel glew-devel libjpeg-turbo-devel libmad-devel libopenal-devel libpng-devel"
|
||||||
depends="${pkgname}-data"
|
|
||||||
conflicts="endless-sky endless-sky-data"
|
|
||||||
short_desc="Space exploring, trading, and combat game. opengl21 version"
|
short_desc="Space exploring, trading, and combat game. opengl21 version"
|
||||||
maintainer="Benjamín Albiñana <benalb@gmail.com>"
|
maintainer="Benjamín Albiñana <benalb@gmail.com>"
|
||||||
license="GPL-3.0-or-later"
|
license="GPL-3.0-or-later"
|
||||||
homepage="https://github.com/SolraBizna/endless-sky"
|
homepage="https://github.com/SolraBizna/endless-sky"
|
||||||
distfiles="https://github.com/SolraBizna/endless-sky/archive/${_commit}.tar.gz"
|
distfiles="https://github.com/SolraBizna/endless-sky/archive/${_commit}.tar.gz"
|
||||||
checksum=46918d0cc35aaeb1219194099223e3338245aa04aa3f29fd76e3376bf5779376
|
checksum=46918d0cc35aaeb1219194099223e3338245aa04aa3f29fd76e3376bf5779376
|
||||||
|
replaces="endless-sky-gl21-data>=0"
|
||||||
endless-sky-gl21-data_package() {
|
conflicts="endless-sky>=0 endless-sky-data>=0"
|
||||||
short_desc+=" - data files"
|
|
||||||
pkg_install() {
|
|
||||||
vmove usr/share/games/endless-sky
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue