upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / minetest / trunk / PKGBUILD
blob3536d7ae905c70f539d14cbf0d73c3781624df55
1 # Maintainer: Laurent Carlier <lordheavym@gmail.com>
2 # Contributor: Konsta Kokkinen <kray@tsundere.fi>
4 pkgname=('minetest' 'minetest-server' 'minetest-common')
5 pkgver=5.7.0
6 pkgrel=1
7 arch=('x86_64')
8 url='https://www.minetest.net/'
9 license=('LGPL')
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
15         minetest.service
16         sysusers.d
17         tmpfiles.d)
18 sha256sums=('0cd0fd48a97f76e337a2e1284599a054f8f92906a84a4ef2122ed321e1b75fa7'
19             '0787b24cf7b340a8a2be873ca3744cec60c2683011f1d658350a031d1bd5976d'
20             '2d80b4ff925770bdf3d857debb2ad11227cc9b022eb01a358b18f8d5f2641a5c'
21             'e4166d639b35efda2cd72269208184ab1e72c54541344cd202ff2005c90b9433'
22             'd9405cf7cd0a657ef06082570783383a1f527fbc0bd122ea506d4fbe26950d4a')
24 prepare() {
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
32 build() {
33   cd build-client
34   cmake -G Ninja ../${pkgname}-${pkgver} \
35     -DCMAKE_INSTALL_PREFIX=/usr \
36     -DBUILD_CLIENT=1 \
37     -DENABLE_GETTEXT=1 \
38     -DENABLE_FREETYPE=1 \
39     -DENABLE_LEVELDB=0 \
40     -DENABLE_POSTGRESQL=1 \
41     -DENABLE_SPATIAL=1 \
42     -DENABLE_REDIS=0
43   ninja
45   cd ../build-server
46   cmake -G Ninja ../${pkgname}-${pkgver} \
47     -DCMAKE_INSTALL_PREFIX=/usr \
48     -DBUILD_CLIENT=0 \
49     -DBUILD_SERVER=1 \
50     -DENABLE_LEVELDB=1 \
51     -DENABLE_POSTGRESQL=1 \
52     -DENABLE_SPATIAL=1 \
53     -DENABLE_REDIS=1
54   ninja
57 package_minetest() {
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
64   cd build-client
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')
76   cd build-server
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'
91   license=('custom')
93   cd $pkgbase-${pkgver}
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)
103   done
105   install -Dm644 LICENSE.txt "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE.txt