ayaports/apk/v3.13/main/haproxy-wi/APKBUILD

51 lines
1.6 KiB
Text
Raw Normal View History

2021-06-04 15:24:22 +00:00
# Maintainer: Antoine Martin <dev@ayakael.net>
pkgname=haproxy-wi
pkgver=4.5.9
pkgrel=2
pkgdesc="Web interface for managing HAProxy, Nginx and Keepalived servers"
arch='noarch'
url="https://github.com/Aidaho12/haproxy-wi"
license='Apache-2.0'
makedepends='git'
depends="net-tools lshw dos2unix nginx
py3-pip freetype-dev netcat-openbsd python3
py3-ldap3 python3-dev libpq libxml2-dev libxslt-dev libldap
libsasl libffi-dev pkgconfig nmap"
source="$pkgname-$pkgver.tar.gz"
_giturl="https://github.com/Aidaho12/haproxy-wi"
_gittag="7c575fe0f8676c47f913bfe47166088ad3740a2b"
builddir="$srcdir/$pkgname"
options="!check"
snapshot() {
mkdir -p "$srcdir"
cd "${srcdir}"
if ! [ -d $pkgname.git ]; then
git clone $_giturl $pkgname.git || return 1
cd $pkgname.git
else
cd $pkgname.git
git fetch || return 1
fi
echo "Checking out"
git checkout $_gittag
echo "Repo archive"
git archive --prefix="$pkgname/" -o $pkgname.tar --format "tar" $_gittag
gzip $pkgname.tar -c > "$SRCDEST"/$pkgname-$pkgver.tar.gz
ln -s "$SRCDEST"/$pkgname-$pkgver.tar.gz "$startdir"/$pkgname-$pkgver.tar.gz
}
package() {
_instdir="$pkgdir"/usr/share/webapps/haproxy-wi
mkdir -p "${_instdir}"
cd "${_instdir}"
cp -ra "$builddir"/* .
chmod +x app/*.py
install -Dm755 -d "${_instdir}"/app/certs "${_instdir}"/keys "${_instdir}"/log "${pkgdir}"/etc/logrotate.d
cp "${_instdir}"/config_other/logrotate/* "${pkgdir}"/etc/logrotate.d/.
}
sha512sums="7d8462de5cebe3c9f60378261a2508a5f3cbf99fc55e8ebd38adb4690659a57387614e45f2f29f9c7f486314b0bceea80591d334cf6cef24b8ea56e941a05905 haproxy-wi-4.5.9.tar.gz"