diff options
author | June | 2021-07-01 08:22:32 +0000 |
---|---|---|
committer | June | 2021-07-01 08:22:32 +0000 |
commit | da0787062bff16661758c462d338645290415000 (patch) | |
tree | 655fb2aac0e1260f32e4f84ea4ef6496203609b8 | |
parent | 7748d83c102d7a46c00ec6aa7ab7bd7814581fe9 (diff) | |
download | aur-da0787062bff16661758c462d338645290415000.tar.gz |
Fixed broken PKGBUILD and add user controlled arguments
Signed-off-by: June <zanthed@riseup.net>
-rw-r--r-- | .SRCINFO | 37 | ||||
-rw-r--r-- | PKGBUILD | 53 |
2 files changed, 64 insertions, 26 deletions
@@ -1,17 +1,22 @@ pkgbase = azerothcore - pkgdesc = AzerothCore - MMORPG Server. Based on MaNGOS -> TrinityCore -> SunwellCore - pkgver = 3.0 - pkgrel = 4 - url = http://www.azerothcore.org - arch = i686 - arch = x86_64 - depends = cmake - depends = clang - depends = readline - depends = lib32-readline - depends = mariadb - depends = git - license = AGPL3 - source = git+https://github.com/azerothcore/azerothcore-wotlk.git - sha512sums = SKIP -pkgname = azerothcore
\ No newline at end of file + pkgdesc = AzerothCore - MMORPG Server. Based on MaNGOS -> TrinityCore -> SunwellCore + pkgver = 3.0 + pkgrel = 5 + url = http://www.azerothcore.org + arch = x86_64 + license = AGPL3 + depends = cmake + depends = clang + depends = readline + depends = mariadb-libs + depends = mariadb + depends = git + depends = ace + depends = boost + depends = boost-libs + depends = gcc + depends = openssl + source = git+https://github.com/azerothcore/azerothcore-wotlk.git + sha512sums = SKIP + +pkgname = azerothcore @@ -1,26 +1,59 @@ -# Maintainer: Viste <viste02@gmail.com> +# Maintainer: June <zanthed@riseup.net> + +## Put in any extra CMake arguments here. +## See https://www.azerothcore.org/wiki/cmake-options +_extraargs='' + +## If you want to add in your own arguments entirely and replace the default below, fill this in. +_cmakeargs='' + +## Compile tools (you will need this) +_DTOOLS=1 + +## Compile scripts (you will also need this) +_DSCRIPTS=static _pkgname='azerothcore-wotlk' pkgname='azerothcore' pkgver=3.0 -pkgrel=4 -arch=('i686' 'x86_64') +pkgrel=5 +arch=('x86_64') pkgdesc="AzerothCore - MMORPG Server. Based on MaNGOS -> TrinityCore -> SunwellCore" url="http://www.azerothcore.org" license=('AGPL3') -depends=('cmake' 'clang' 'readline' 'lib32-readline' 'mariadb' 'git') +depends=('cmake' 'clang' 'readline' 'mariadb-libs' 'mariadb' 'git' 'ace' 'boost' 'boost-libs' 'gcc' 'openssl') source=("git+https://github.com/azerothcore/${_pkgname}.git") sha512sums=('SKIP') +prepare() { + _clang=$(which clang) + _gcc=$(which gcc) + _clangcxx=$(which clang++) + _onlinecpus=$(nproc --all) +} + build() { - cd "${_pkgname}" - mkdir build && cd build - cmake ../ -DCMAKE_INSTALL_PREFIX=$HOME/azeroth-server/ -DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++ -DTOOLS=0 -DSCRIPTS=1 - make -j6 + cd "${srcdir}/${_pkgname}" + _acore="$(pwd)" + mkdir ${_acore}/build && cd ${_acore}/build + + if [ -z "${_cmakeargs}" ] + then + if [ -z "${_extraargs}" ] + then + cmake ${_acore} -DCMAKE_INSTALL_PREFIX=${_acore} -DCMAKE_C_COMPILER=${_clang} -DCMAKE_CXX_COMPILER=${_clangcxx} -DTOOLS=${_DTOOLS} -DSCRIPTS=${_DSCRIPTS} + else + cmake ${_acore} -DCMAKE_INSTALL_PREFIX=${_acore} -DCMAKE_C_COMPILER=${_clang} -DCMAKE_CXX_COMPILER=${_clangcxx} -DTOOLS=${_DTOOLS} -DSCRIPTS=${_DSCRIPTS} ${_extraargs} + fi + else + cmake ${_acore} ${_cmakeargs} + fi + + make -j$(nproc --all) } package() { - cd $srcdir/${_pkgname}/build - make install + cd ${srcdir}/${_pkgname}/build + make install } |