diff options
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..5c1d3ea405e6 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,53 @@ +# Maintainer: Richard Neumann aka. schard <mail at richard dash neumann period de> + +_pkgbase='macreg' +pkgname="${_pkgbase}-git" +pkgver=latest +pkgrel=1 +pkgdesc='Python 3 library and scripts for the RCON and Query protocol' +arch=('any') +url="https://github.com/coNQP/${_pkgbase}" +license=('GPLv3') +depends=( + 'python' + 'python-peewee' + 'python-peeweeplus' + 'python-flask' + 'python-httpam' + 'uwsgi-plugin-python' + 'python-pymysql') +makedepends=('git' 'python') +provides=("python-${_pkgbase}") +conflicts=("python-${_pkgbase}") +source=("${_pkgbase}::git+${url}.git") +md5sums=('SKIP') +pkgdir='pkg' +srcdir='src' + + +pkgver() { + cd "${_pkgbase}" + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + + +package() { + cd "${srcdir}/${_pkgbase}" + + # Install python back end. + pushd "backend" || exit 1 + python setup.py install --root "${pkgdir}" --optimize=1 + local SYSUSERS="${pkgdir}/usr/lib/sysusers.d" + install -m 755 -d "${SYSUSERS}" + install -m 644 -t "${SYSUSERS}" macreg.conf + local UWSGI="${pkgdir}/etc/uwsgi" + install -m 755 -d "${UWSGI}" + install -m 644 -t "${UWSGI}" macreg.ini + popd || exit 1 + + # Install HML front end. + local FRONTEND="${pkgdir}/usr/share/webapps/macreg" + install -m 755 -d "${FRONTEND}" + pushd "frontend" || exit 1 + install -m 644 -t "${FRONTEND}" ./* +} |