assaultcube: unstable-2017-05-01 -> unstable-2018-05-20
This commit is contained in:
parent
5eb3edc8fb
commit
0a38c2794d
|
@ -1,11 +0,0 @@
|
||||||
--- 1.1.0.4/source/src/Makefile
|
|
||||||
+++ 1.1.0.4/source/src/Makefile
|
|
||||||
@@ -6,7 +6,7 @@
|
|
||||||
# found to have been caused by the g++ compiler in the past. This seems to have
|
|
||||||
# been fixed now by relaxing the optimization that g++ does, so although we'll
|
|
||||||
# continue using clang++ (just in case), you can use g++ if you prefer.
|
|
||||||
-CXX=clang++
|
|
||||||
+#CXX=clang++
|
|
||||||
|
|
||||||
# Changing this to ACDEBUG=yes will compile a debug version of AssaultCube.
|
|
||||||
ACDEBUG=no
|
|
|
@ -1,5 +1,5 @@
|
||||||
{ fetchFromGitHub, stdenv, makeDesktopItem, openal, pkgconfig, libogg,
|
{ fetchFromGitHub, stdenv, makeDesktopItem, openal, pkgconfig, libogg,
|
||||||
libvorbis, SDL, SDL_image, makeWrapper, zlib,
|
libvorbis, SDL, SDL_image, makeWrapper, zlib, file,
|
||||||
client ? true, server ? true }:
|
client ? true, server ? true }:
|
||||||
|
|
||||||
with stdenv.lib;
|
with stdenv.lib;
|
||||||
|
@ -8,38 +8,21 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
# master branch has legacy (1.2.0.2) protocol 1201 and gcc 6 fix.
|
# master branch has legacy (1.2.0.2) protocol 1201 and gcc 6 fix.
|
||||||
pname = "assaultcube";
|
pname = "assaultcube";
|
||||||
version = "unstable-2017-05-01";
|
version = "unstable-2018-05-20";
|
||||||
|
|
||||||
meta = {
|
|
||||||
description = "Fast and fun first-person-shooter based on the Cube fps";
|
|
||||||
homepage = https://assault.cubers.net;
|
|
||||||
maintainers = [ maintainers.genesis ];
|
|
||||||
platforms = platforms.linux; # should work on darwin with a little effort.
|
|
||||||
license = stdenv.lib.licenses.zlib;
|
|
||||||
};
|
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "assaultcube";
|
owner = "assaultcube";
|
||||||
repo = "AC";
|
repo = "AC";
|
||||||
rev = "9f537b0876a39d7686e773040469fbb1417de18b";
|
rev = "f58ea22b46b5013a520520670434b3c235212371";
|
||||||
sha256 = "0nvckn67mmfaa7x3j41xyxjllxqzfx1dxg8pnqsaak3kkzds34pl";
|
sha256 = "1vfn3d55vmmipdykrcfvgk6dddi9y95vlclsliirm7jdp20f15hd";
|
||||||
};
|
};
|
||||||
|
|
||||||
# ${branch} not accepted as a value ?
|
nativeBuildInputs = [ makeWrapper pkgconfig ];
|
||||||
# TODO: write a functional BUNDLED_ENET option and restore it in deps.
|
|
||||||
patches = [ ./assaultcube-next.patch ];
|
|
||||||
|
|
||||||
nativeBuildInputs = [ pkgconfig ];
|
buildInputs = [ file zlib ] ++ optionals client [ openal SDL SDL_image libogg libvorbis ];
|
||||||
|
|
||||||
# add optional for server only ?
|
|
||||||
buildInputs = [ makeWrapper openal SDL SDL_image libogg libvorbis zlib ];
|
|
||||||
|
|
||||||
#makeFlags = [ "CXX=g++" ];
|
|
||||||
|
|
||||||
targets = (optionalString server "server") + (optionalString client " client");
|
targets = (optionalString server "server") + (optionalString client " client");
|
||||||
buildPhase = ''
|
makeFlags = [ "-C source/src" "CXX=c++" "${targets}" ];
|
||||||
make -C source/src ${targets}
|
|
||||||
'';
|
|
||||||
|
|
||||||
desktop = makeDesktopItem {
|
desktop = makeDesktopItem {
|
||||||
name = "AssaultCube";
|
name = "AssaultCube";
|
||||||
|
@ -61,21 +44,29 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
cp -r config packages $out/$gamedatadir
|
cp -r config packages $out/$gamedatadir
|
||||||
|
|
||||||
# install custom script
|
|
||||||
substituteAll ${./launcher.sh} $bindir/assaultcube
|
|
||||||
chmod +x $bindir/assaultcube
|
|
||||||
|
|
||||||
if (test -e source/src/ac_client) then
|
if (test -e source/src/ac_client) then
|
||||||
cp source/src/ac_client $bindir
|
cp source/src/ac_client $bindir
|
||||||
mkdir -p $out/share/applications
|
mkdir -p $out/share/applications
|
||||||
cp ${desktop}/share/applications/* $out/share/applications
|
cp ${desktop}/share/applications/* $out/share/applications
|
||||||
install -Dpm644 packages/misc/icon.png $out/share/icons/assaultcube.png
|
install -Dpm644 packages/misc/icon.png $out/share/icons/assaultcube.png
|
||||||
install -Dpm644 packages/misc/icon.png $out/share/pixmaps/assaultcube.png
|
install -Dpm644 packages/misc/icon.png $out/share/pixmaps/assaultcube.png
|
||||||
|
|
||||||
|
makeWrapper $out/bin/ac_client $out/bin/${pname} \
|
||||||
|
--run "cd $out/$gamedatadir" --add-flags "--home=\$HOME/.assaultcube/v1.2next --init"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if (test -e source/src/ac_server) then
|
if (test -e source/src/ac_server) then
|
||||||
cp source/src/ac_server $bindir
|
cp source/src/ac_server $bindir
|
||||||
ln -s $bindir/${pname} $bindir/${pname}-server
|
makeWrapper $out/bin/ac_server $out/bin/${pname}-server \
|
||||||
|
--run "cd $out/$gamedatadir" --add-flags "-Cconfig/servercmdline.txt"
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "Fast and fun first-person-shooter based on the Cube fps";
|
||||||
|
homepage = https://assault.cubers.net;
|
||||||
|
maintainers = [ maintainers.genesis ];
|
||||||
|
platforms = platforms.linux; # should work on darwin with a little effort.
|
||||||
|
license = stdenv.lib.licenses.zlib;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,20 +0,0 @@
|
||||||
#!@shell@
|
|
||||||
# original scripts are very awful
|
|
||||||
|
|
||||||
CUBE_DIR=@out@@gamedatadir@
|
|
||||||
|
|
||||||
case $(basename "$0") in
|
|
||||||
assaultcube-server)
|
|
||||||
CUBE_OPTIONS="-Cconfig/servercmdline.txt"
|
|
||||||
BINARYPATH=@out@/bin/ac_server
|
|
||||||
;;
|
|
||||||
assaultcube)
|
|
||||||
CUBE_OPTIONS="--home=${HOME}/.assaultcube/v1.2next --init"
|
|
||||||
BINARYPATH=@out@/bin/ac_client
|
|
||||||
;;
|
|
||||||
*) echo "$0" is not supported.
|
|
||||||
exit 1
|
|
||||||
esac
|
|
||||||
|
|
||||||
cd $CUBE_DIR
|
|
||||||
exec "${BINARYPATH}" ${CUBE_OPTIONS} "$@"
|
|
Loading…
Reference in a new issue