2010-12-15 02:19:59 +00:00
|
|
|
{ stdenv, fetchurl, unzip, gmp, zlib, bzip2, boost, mysql }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
|
|
|
|
name = "ghost-one-${version}";
|
|
|
|
version = "1.7.265";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://www.maxdevlon.com/ghost/ghostone${version}.zip";
|
|
|
|
sha256 = "1sm2ca3lcdr4vjg7v94d8zhqz8cdp44rg8yinzzwkgsr0hj74fv2";
|
|
|
|
};
|
|
|
|
|
2015-04-02 00:39:50 +01:00
|
|
|
buildInputs = [ unzip gmp zlib bzip2 boost mysql.lib ];
|
2010-12-15 02:19:59 +00:00
|
|
|
|
|
|
|
patchPhase = ''
|
2015-04-02 00:39:50 +01:00
|
|
|
substituteInPlace ghost/Makefile --replace "/usr/local/lib/mysql" "${mysql.lib}/lib/mysql"
|
2010-12-15 02:19:59 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
cd bncsutil/src/bncsutil
|
|
|
|
make
|
|
|
|
cd ../../../StormLib/stormlib/
|
|
|
|
make
|
2012-01-18 20:16:00 +00:00
|
|
|
mkdir -p $out/lib
|
2010-12-15 02:19:59 +00:00
|
|
|
cd ../..
|
|
|
|
# cp bncsutil/src/bncsutil/libbncutil.so $out/lib
|
|
|
|
# cp StormLib/stormlib/libStorm.so $out/lib
|
|
|
|
cd ghost
|
|
|
|
make
|
|
|
|
cd ..
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
2012-01-18 20:16:00 +00:00
|
|
|
mkdir -p $out/lib
|
2010-12-15 02:19:59 +00:00
|
|
|
cp bncsutil/src/bncsutil/libbncsutil.so $out/lib
|
|
|
|
cp StormLib/stormlib/libStorm.so $out/lib
|
|
|
|
|
2012-01-18 20:16:00 +00:00
|
|
|
mkdir -p $out/bin
|
2010-12-15 02:19:59 +00:00
|
|
|
cp ghost/ghost++ $out/bin
|
|
|
|
|
2012-01-18 20:16:00 +00:00
|
|
|
mkdir -p $out/share/ghost-one/languages
|
2010-12-15 02:19:59 +00:00
|
|
|
cp -r mapcfgs $out/share/ghost-one
|
|
|
|
cp Languages/*.cfg $out/share/ghost-one/languages
|
|
|
|
cp language.cfg $out/share/ghost-one/languages/English.cfg
|
|
|
|
cp ip-to-country.csv $out/share/ghost-one/
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = http://www.codelain.com/forum/;
|
|
|
|
description = "A Warcraft III: Reign of Chaos and Warcraft III: The Frozen Throne game hosting bot";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = [ maintainers.phreedom ];
|
|
|
|
};
|
2015-04-02 00:39:50 +01:00
|
|
|
}
|