# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>

pkgname=phppgadmin
pkgver=7.13.0
pkgrel=3
pkgdesc="A web-based administration tool for PostgreSQL"
arch='noarch'
url="https://github.com/phppgadmin/phppgadmin/"
license='GPL'
_php=php82
_php_mods='-common -iconv -json -gd -curl -xml -mysqli -imap -cgi -pdo -pdo_mysql -soap -posix -gettext -ldap -ctype -dom -session -pdo_pgsql -pgsql -mbstring'
_pecl_mods="-xmlrpc -mcrypt"
depends="$_php ${_php_mods//-/$_php-} ${_pecl_mods//-/$_php-pecl-} fcgi"
source="https://github.com/phppgadmin/phppgadmin/releases/download/REL_${pkgver//./-}/phpPgAdmin-$pkgver.tar.bz2"

package() {
	_instdir="$pkgdir"/usr/share/webapps/phppgadmin
	mkdir -p $_instdir "$pkgdir"/etc/webapps/phppgadmin
	cd $_instdir
	cp -ra "$srcdir"/phpPgAdmin-$pkgver/* .
	cp ./conf/config.inc.php-dist "$pkgdir"/etc/webapps/phppgadmin/config.inc.php
	rm -f $_instdir/conf/config.inc.php
	ln -s /etc/webapps/phppgadmin/config.inc.php $_instdir/conf/config.inc.php
}
sha512sums="1a3d51d0f3b5a3857664c37e5df21070b81dfc0db8844d0af784ff09f644e6a61a9607f4a87f865c5c40bb55445db187b73b9ccceff4a0293c26a6bfeb5953ac  phpPgAdmin-7.13.0.tar.bz2"
