3
0
Fork 0
forked from mirrors/nixpkgs

teamspeak-server: 3.0.10.3 -> 3.0.12.4, also

tsdnsserver binary now in output
This commit is contained in:
Alexei Robyn 2016-05-12 14:31:28 +10:00
parent 1aff127b56
commit b874447eef

View file

@ -1,11 +1,8 @@
{ stdenv, fetchurl, makeWrapper }:
let
version = "3.0.10.3";
version = "3.0.12.4";
arch = if stdenv.is64bit then "amd64" else "x86";
libDir = if stdenv.is64bit then "lib64" else "lib";
in
@ -14,25 +11,30 @@ stdenv.mkDerivation {
src = fetchurl {
urls = [
"http://dl.4players.de/ts/releases/${version}/teamspeak3-server_linux-${arch}-${version}.tar.gz"
"http://teamspeak.gameserver.gamed.de/ts3/releases/${version}/teamspeak3-server_linux-${arch}-${version}.tar.gz"
"http://dl.4players.de/ts/releases/${version}/teamspeak3-server_linux_${arch}-${version}.tar.bz2"
"http://teamspeak.gameserver.gamed.de/ts3/releases/${version}/teamspeak3-server_linux_${arch}-${version}.tar.bz2"
];
sha256 = if stdenv.is64bit
then "9606dd5c0c3677881b1aab833cb99f4f12ba08cc77ef4a97e9e282d9e10b0702"
else "8b8921e0df04bf74068a51ae06d744f25d759a8c267864ceaf7633eb3f81dbe5";
then "1n8vgbgnfbllfvsl82ai6smv6hl32a3nd071j2dp79agjz4fic3b"
else "19vkcgb0h71amixry8r72qqwaxwplzyz9nrxg5bdjjg8r2mkh4bc";
};
buildInputs = [ makeWrapper ];
buildPhase =
''
mv ts3server_linux_${arch} ts3server
echo "patching ts3server"
patchelf \
--interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath $(cat $NIX_CC/nix-support/orig-cc)/${libDir} \
--force-rpath \
ts3server
cp tsdns/tsdnsserver tsdnsserver
patchelf \
--interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath $(cat $NIX_CC/nix-support/orig-cc)/${libDir} \
--force-rpath \
tsdnsserver
'';
installPhase =
@ -44,17 +46,19 @@ stdenv.mkDerivation {
mkdir -p $out/lib/teamspeak
mv * $out/lib/teamspeak/
# Make a symlink to the binary from bin.
# Make symlinks to the binaries from bin.
mkdir -p $out/bin/
ln -s $out/lib/teamspeak/ts3server $out/bin/ts3server
ln -s $out/lib/teamspeak/tsdnsserver $out/bin/tsdnsserver
wrapProgram $out/lib/teamspeak/ts3server --prefix LD_LIBRARY_PATH : $out/lib/teamspeak
wrapProgram $out/lib/teamspeak/tsdnsserver --prefix LD_LIBRARY_PATH : $out/lib/tsdnsserver
'';
dontStrip = true;
dontPatchELF = true;
meta = {
meta = {
description = "TeamSpeak voice communication server";
homepage = http://teamspeak.com/;
license = stdenv.lib.licenses.unfreeRedistributable;