# Maintainer: KawaiDesu # Contributor: @whoami # Contributor: Roman Voropaev # Contributor: Julian Brost # Contributor: Lorenzo Gabriele # Contributor: Markus Hansmair pkgbase='nginx-unit' pkgname=('nginx-unitd' 'nginx-libunit' 'nginx-unit-python' 'nginx-unit-php-legacy' 'nginx-unit-php' 'nginx-unit-perl' 'nginx-unit-ruby' 'nginx-unit-nodejs' 'nginx-unit-go') _shortname='unit' pkgver=1.31.0 pkgrel=1 pkgdesc="Lightweight, dynamic, open-source server for diverse web applications." arch=('i686' 'x86_64') url="https://unit.nginx.org/" license=('Apache') source=("https://unit.nginx.org/download/unit-$pkgver.tar.gz" 'unit.service' 'configure.patch') sha256sums=('268b1800bc4e030667e67967d052817437dff03f780ac0a985909aa225de61ed' '8c9b2f732d6e50aa747aa7703303e5fff69f5abc6f5fc1741b774b422e029606' '42ef974833acd61091b127a7b4b6cf5dc377948b78ef01eeb942d848e94c6b62') makedepends=('php-embed' 'php-legacy-embed' 'python' 'go' 'ruby' 'perl' 'npm') build() { cd "${srcdir}/${_shortname}-${pkgver}" # Fix linking wrong library (php instead of php-legacy) patch --verbose -N auto/modules/php ../../configure.patch ./configure --prefix=/usr \ --sbindir=/usr/bin \ --modules="/usr/lib/$pkgbase" \ --state="/var/lib/$pkgbase" \ --pid="/run/$pkgbase.pid" \ --log="/var/log/$pkgbase.log" \ --control="/run/$pkgbase.control.sock" \ --tmp="/tmp" \ --openssl ./configure python --config=python3-config ./configure php --config=php-config-legacy --module=php-legacy --lib-name=php-legacy ./configure php ./configure perl ./configure ruby ./configure nodejs ./configure go --go-path=/usr/lib/go make all } package_nginx-unitd() { depends=('glibc' 'openssl') cd "${srcdir}/${_shortname}-${pkgver}" make DESTDIR="${pkgdir}" unitd-install install -m 644 -D "${srcdir}/unit.service" "${pkgdir}/usr/lib/systemd/system/unit.service" } package_nginx-libunit() { cd "${srcdir}/${_shortname}-${pkgver}" make DESTDIR="${pkgdir}" libunit-install } package_nginx-unit-python() { depends=('nginx-unitd' 'python') cd "${srcdir}/${_shortname}-${pkgver}" make DESTDIR="${pkgdir}" python3-install } package_nginx-unit-php-legacy() { depends=('nginx-unitd' 'php-legacy-embed') cd "${srcdir}/${_shortname}-${pkgver}" make DESTDIR="${pkgdir}" php-legacy-install } package_nginx-unit-php() { depends=('nginx-unitd' 'php-embed') cd "${srcdir}/${_shortname}-${pkgver}" make DESTDIR="${pkgdir}" php-install } package_nginx-unit-go() { arch=('any') depends=('nginx-unitd' 'go') cd "${srcdir}/${_shortname}-${pkgver}" export CGO_CFLAGS_ALLOW='-Wp,-D_FORTIFY_SOURCE=2,-D_GLIBCXX_ASSERTIONS|-fcf-protection' make DESTDIR="${pkgdir}" go-install } package_nginx-unit-perl() { arch=('any') depends=('nginx-unitd' 'perl') cd "${srcdir}/${_shortname}-${pkgver}" make DESTDIR="${pkgdir}" perl-install } package_nginx-unit-ruby() { arch=('any') depends=('nginx-unitd' 'ruby') cd "${srcdir}/${_shortname}-${pkgver}" make DESTDIR="$pkgdir" ruby-install } package_nginx-unit-nodejs() { arch=('any') depends=('nginx-unitd' 'nodejs') cd "${srcdir}/${_shortname}-${pkgver}" make DESTDIR="${pkgdir}/usr/lib/" node-local-install }