1 # Maintainer: Laurent Carlier <lordheavym@gmail.com>
2 # Contributor: Konsta Kokkinen <kray@tsundere.fi>
4 pkgname=('minetest' 'minetest-server' 'minetest-common')
8 url='https://www.minetest.net/'
10 makedepends=('sqlite' 'freetype2' 'leveldb' 'postgresql' 'spatialindex' 'openal' 'libvorbis' 'curl'
11 'hicolor-icon-theme' 'cmake' 'ninja' 'hiredis' 'luajit')
12 makedepends+=('libjpeg' 'libgl' 'libxi' 'git') # irrlichtmt
13 source=(${pkgname}-${pkgver}.tar.gz::https://github.com/minetest/minetest/archive/${pkgver}.tar.gz
14 ${pkgname}-data-${pkgver}.tar.gz::https://github.com/minetest/minetest_game/archive/${pkgver}.tar.gz
18 sha256sums=('0cd0fd48a97f76e337a2e1284599a054f8f92906a84a4ef2122ed321e1b75fa7'
19 '0787b24cf7b340a8a2be873ca3744cec60c2683011f1d658350a031d1bd5976d'
20 '2d80b4ff925770bdf3d857debb2ad11227cc9b022eb01a358b18f8d5f2641a5c'
21 'e4166d639b35efda2cd72269208184ab1e72c54541344cd202ff2005c90b9433'
22 'd9405cf7cd0a657ef06082570783383a1f527fbc0bd122ea506d4fbe26950d4a')
25 install -d build-{client,server}
27 git clone https://github.com/minetest/irrlicht.git ${pkgname}-${pkgver}/lib/irrlichtmt
28 cd ${pkgname}-${pkgver}/lib/irrlichtmt
29 git checkout tags/1.9.0mt10
34 cmake -G Ninja ../${pkgname}-${pkgver} \
35 -DCMAKE_INSTALL_PREFIX=/usr \
40 -DENABLE_POSTGRESQL=1 \
46 cmake -G Ninja ../${pkgname}-${pkgver} \
47 -DCMAKE_INSTALL_PREFIX=/usr \
51 -DENABLE_POSTGRESQL=1 \
58 pkgdesc='Multiplayer infinite-world block sandbox game'
59 depends=('minetest-common' 'curl' 'libvorbis' 'sqlite'
60 'openal' 'hicolor-icon-theme' 'desktop-file-utils' 'xdg-utils'
61 'freetype2' 'luajit' 'postgresql-libs' 'spatialindex' 'jsoncpp'
62 'libgl' 'libjpeg' 'libxi') # irrlichtmt
65 DESTDIR="${pkgdir}" ninja install
67 rm -rf "${pkgdir}"/usr/share/{minetest,doc}
68 rm "${pkgdir}"/usr/share/man/man6/minetestserver.6
71 package_minetest-server() {
72 pkgdesc='Server of infinite-world block sandbox game'
73 depends=('minetest-common' 'leveldb' 'curl' 'sqlite' 'hiredis' 'luajit'
74 'postgresql-libs' 'spatialindex' 'jsoncpp')
77 DESTDIR="${pkgdir}" ninja install
78 install -d "${pkgdir}"/etc/minetest
79 install -Dm644 ../minetest.service \
80 "${pkgdir}"/usr/lib/systemd/system/minetest@.service
82 rm -rf "${pkgdir}"/usr/share/{minetest,metainfo,appdata,applications,icons,doc}
83 mv "${pkgdir}"/usr/share/man/man6/minetest.6 "${pkgdir}"/usr/share/man/man6/minetestserver.6
85 install -Dm644 "${srcdir}"/tmpfiles.d "${pkgdir}"/usr/lib/tmpfiles.d/minetest-server.conf
86 install -Dm644 "${srcdir}"/sysusers.d "${pkgdir}"/usr/lib/sysusers.d/minetest-server.conf
89 package_minetest-common() {
90 pkgdesc='Common data files for minetest and minetest-server'
94 install -d "${pkgdir}"/usr/share/minetest
96 cp -r games builtin client fonts textures "${pkgdir}"/usr/share/minetest/
97 cp -r "${srcdir}"/build-client/locale "${pkgdir}"/usr/share/minetest/
98 cp -r "${srcdir}"/minetest_game-${pkgver} "${pkgdir}"/usr/share/minetest/games/minetest
99 rm "${pkgdir}"/usr/share/minetest/games/minetest/.gitignore
101 for file in doc/{fst_api,lua_api,menu_lua_api,protocol,world_format}.txt; do
102 install -Dm644 $file "${pkgdir}"/usr/share/minetest/doc/$(basename $file)
105 install -Dm644 LICENSE.txt "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE.txt