games-strategy/ja2-stracciatella: bump to 0.15.0
This commit is contained in:
@@ -1,16 +0,0 @@
|
||||
#!/bin/sh
|
||||
# Convert names of data-files to lower-case
|
||||
|
||||
# location of the data-files
|
||||
GAMES_DATADIR="/usr/share/ja2/data"
|
||||
|
||||
cd "${GAMES_DATADIR}" || exit 1
|
||||
|
||||
# convert to lowercase
|
||||
find . -exec sh -c 'echo "${1}"
|
||||
lower="`echo "${1}" | tr [:upper:] [:lower:]`"
|
||||
[ -d `dirname "${lower}"` ] || mkdir `dirname ${lower}`
|
||||
[ "${1}" = "${lower}" ] || mv "${1}" "${lower}"' - {} \;
|
||||
|
||||
# remove leftover
|
||||
rm -r ./TILECACHE ./STSOUNDS
|
||||
@@ -1,22 +0,0 @@
|
||||
Author: Julian Ospald <hasufell@posteo.de>
|
||||
Upstream: not yet
|
||||
Reason: Fix install permissions
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 27ef953..cc1e2cd 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -610,11 +610,11 @@ install: $(BINARY)
|
||||
test -z "$(INSTALLABLE)" || install -d $(BINARY_DIR)
|
||||
test -z "$(INSTALLABLE)" || install -d $(MANPAGE_DIR)
|
||||
test -z "$(INSTALLABLE)" || install -d $(FULL_PATH_EXTRA_DATA_DIR)
|
||||
- test -z "$(INSTALLABLE)" || install -m 555 $(BINARY) $(BINARY_DIR)
|
||||
+ test -z "$(INSTALLABLE)" || install -m 755 $(BINARY) $(BINARY_DIR)
|
||||
test -z "$(INSTALLABLE)" || cp -r externalized $(FULL_PATH_EXTRA_DATA_DIR)
|
||||
test -z "$(INSTALLABLE)" || cp -r mods $(FULL_PATH_EXTRA_DATA_DIR)
|
||||
test -z "$(INSTALLABLE)" || cp -r _unittests $(FULL_PATH_EXTRA_DATA_DIR)
|
||||
- test -z "$(INSTALLABLE)" || install -m 444 ja2_manpage $(MANPAGE_DIR)/ja2.6
|
||||
+ test -z "$(INSTALLABLE)" || install -m 644 ja2_manpage $(MANPAGE_DIR)/ja2.6
|
||||
|
||||
@test -n "$(INSTALLABLE)" || echo "------------------------------------------------------------------------------"
|
||||
@test -n "$(INSTALLABLE)" || echo "This build doesn't support installation."
|
||||
@@ -1,66 +0,0 @@
|
||||
# Copyright 2016 Julian Ospald <hasufell@posteo.de>
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
require bitbucket [ user=gennady tag=v${PV} ]
|
||||
|
||||
SUMMARY="A port of Jagged Alliance 2 to SDL"
|
||||
HOMEPAGE+=" http://tron.homeunix.org/ja2/"
|
||||
DOWNLOADS+=" mirror://gentoo/editor.slf.gz"
|
||||
|
||||
LICENCES="SFI-SCLA"
|
||||
SLOT="0"
|
||||
PLATFORMS="~amd64 ~x86"
|
||||
|
||||
DEPENDENCIES="
|
||||
build+run:
|
||||
media-libs/SDL:0[X]
|
||||
"
|
||||
|
||||
DEFAULT_SRC_PREPARE_PATCHES=( "${FILES}"/${PNV}-makefile.patch )
|
||||
|
||||
src_unpack() {
|
||||
default
|
||||
edo mv gennady-ja2-stracciatella-* "${WORK}"
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# not an autoconf script
|
||||
edo ./configure --prefix=/usr
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake Q=""
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake \
|
||||
BINARY_DIR="${IMAGE}/usr/$(exhost --target)/bin" \
|
||||
MANPAGE_DIR="${IMAGE}/usr/share/man/man6" \
|
||||
FULL_PATH_EXTRA_DATA_DIR="${IMAGE}/usr/share/ja2" \
|
||||
install
|
||||
|
||||
insinto /usr/share/ja2/data
|
||||
doins "${WORKBASE}"/editor.slf
|
||||
|
||||
insinto /usr/share/applications
|
||||
hereins ${PN}.desktop <<EOF
|
||||
[Desktop Entry]
|
||||
Name=ja2-stracciatella
|
||||
Type=Application
|
||||
Comment=A port of Jagged Alliance 2 to SDL
|
||||
Exec=ja2
|
||||
TryExec=ja2
|
||||
Icon=ja2-stracciatella
|
||||
Categories=Game;StrategyGame;
|
||||
EOF
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
elog "You need to copy all files from the Data directory of"
|
||||
elog "Jagged Alliance 2 installation to"
|
||||
elog "/usr/share/ja2/data "
|
||||
elog "Make sure the filenames are lowercase. You may want to run the"
|
||||
elog "script"
|
||||
elog "/usr/bin/ja2-convert"
|
||||
}
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
# Copyright 2016 Julian Ospald <hasufell@posteo.de>
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
require github [ user=ja2-stracciatella tag=v${PV} ]
|
||||
require desktop-utils gtk-icon-cache
|
||||
|
||||
SUMMARY="A port of Jagged Alliance 2 to SDL"
|
||||
HOMEPAGE+=" http://tron.homeunix.org/ja2/"
|
||||
DOWNLOADS+=" mirror://gentoo/editor.slf.gz"
|
||||
|
||||
LICENCES="
|
||||
SFI-SCLA [[ note = [ Original Jagged Alliance source codes ] ]]
|
||||
public-domain [[ note = [ all changes since commit 8287b98 ] ]]
|
||||
ZLIB [[ note = [ _build/lib-MicroIni ] ]]
|
||||
LGPL-2.1 [[ note = [ _build/lib-SDL-* ] ]]
|
||||
Boost-1.0 [[ note = [ _build/lib-boost, _build/lib-utf8cpp ] ]]
|
||||
BSD-3 [[ note = [ _build/lib-gtest ] ]]
|
||||
MIT [[ note = [ _build/lib-rapidjson, _build/lib-slog ] ]]
|
||||
CCPL-Attribution-NonCommercial-2.0 [[ note = [ _build/lib-smacker ] ]]
|
||||
"
|
||||
SLOT="0"
|
||||
PLATFORMS="~amd64 ~x86"
|
||||
|
||||
DEPENDENCIES="
|
||||
build+run:
|
||||
media-libs/SDL:0[X]
|
||||
suggestion:
|
||||
games-strategy/ja2-stracciatella-data [[ description = [ GOG data files
|
||||
of ja2 ] ]]
|
||||
"
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
# set the default datadir in ja2.ini to a sane value
|
||||
edo sed -i \
|
||||
-e '/fprintf(IniFile/s#/some/place/where/the/data/is#/usr/share/ja2#' \
|
||||
sgp/SGP.cc
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# not an autoconf script
|
||||
edo ./configure --prefix=/usr
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake Q=""
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake \
|
||||
BINARY_DIR="${IMAGE}/usr/$(exhost --target)/bin" \
|
||||
MANPAGE_DIR="${IMAGE}/usr/share/man/man6" \
|
||||
SHARED_DIR="${IMAGE}/usr/share" \
|
||||
FULL_PATH_EXTRA_DATA_DIR="${IMAGE}/usr/share/ja2" \
|
||||
install
|
||||
|
||||
insinto /usr/share/ja2/data
|
||||
doins "${WORKBASE}"/editor.slf
|
||||
|
||||
# install our own desktop file
|
||||
edo rm "${IMAGE}"/usr/share/applications/ja2-stracciatella.desktop
|
||||
install_desktop_entry 'Exec=ja2'
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
elog "If you don't use games-strategy/ja2-stracciatella-data, then"
|
||||
elog "you need to copy all files from the Data directory of"
|
||||
elog "Jagged Alliance 2 installation to some directory and set it in"
|
||||
elog " ~/.ja2/ja2.ini"
|
||||
elog "possibly utilizing app-arch/innoextract for windows .exe files."
|
||||
elog
|
||||
elog "Make sure the filenames are all lowercase."
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user