diff options
author | Rafael Fontenelle | 2019-04-10 10:24:39 -0300 |
---|---|---|
committer | Rafael Fontenelle | 2019-04-10 10:24:43 -0300 |
commit | f6a38465a4a4022281798d7e49b129057e40e1b0 (patch) | |
tree | 9f6125fb27250face2519211bb8954eb43275c9d | |
parent | 1fb9a81c4235708a81c5b984ec25b904a438999c (diff) | |
download | aur-f6a38465a4a4022281798d7e49b129057e40e1b0.tar.gz |
Add optional MySQL support
MySQL support is not enable by default in both this
PKGBUILD and DDNet build rules. In order to enable it,
Set "_enable_mysql" to 1 and the PKGBUILD will do the
rest.
No database server is added as dependency. You may want
to install 'mariadb' for running the db server.
-rw-r--r-- | PKGBUILD | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -15,6 +15,15 @@ optdepends=('ddnet-skins: more skins for your tee' source=("https://ddnet.tw/downloads/DDNet-$pkgver.tar.xz") sha256sums=('4c5937b6d32074194a8b23ea5bc81db78ebafd533cf9fe8003eadc611dfc534a') +# Set 1 to enable MySQL support and add dependencies +_enable_mysql=0 + +if [ $_enable_mysql -eq 1 ]; then + depends+=('mysql-connector-c++') + makedepends+=('boost') + _mysql_opt="-DMYSQL=ON" +fi + prepare() { [ -d build ] && rm -rf build; mkdir build [ -d prep ] && rm -rf prep; mkdir prep @@ -52,7 +61,8 @@ build() { -DCMAKE_INSTALL_PREFIX=/usr \ -DWEBSOCKETS=ON \ -DAUTOUPDATE=OFF \ - -GNinja + -GNinja \ + $_mysql_opt ninja } |