Generate -src package and provide nginx-mainline

This commit is contained in:
DasSkelett 2021-09-05 21:21:33 +02:00
parent b75d37ab61
commit d840ff7548
No known key found for this signature in database
GPG Key ID: 2764A8BD3D0183D7
2 changed files with 37 additions and 8 deletions

View File

@ -1,7 +1,7 @@
pkgbase = nginx-quic
pkgdesc = Lightweight HTTP server and IMAP/POP3 proxy server, HTTP/3 QUIC branch
pkgver = 1.21.2
pkgrel = 1
pkgrel = 2
url = https://nginx.org
install = nginx.install
arch = i686
@ -17,6 +17,7 @@ pkgbase = nginx-quic
depends = pcre
depends = zlib
provides = nginx
provides = nginx-mainline
conflicts = nginx
backup = etc/nginx/fastcgi.conf
backup = etc/nginx/fastcgi_params
@ -37,3 +38,10 @@ pkgbase = nginx-quic
sha256sums = b9af19a75bbeb1434bba66dd1a11295057b387a2cbff4ddf46253133909c311e
pkgname = nginx-quic
pkgname = nginx-quic-src
pkgdesc = Source code of nginx-quic 1.21.2, useful for building modules
depends =
provides = nginx-src
provides = nginx-mainline-src
conflicts = nginx-src

View File

@ -4,9 +4,11 @@
# Contributor: Sébastien Luttringer
# Contributor: Drew DeVault
pkgname=nginx-quic
_pkgbase=nginx
pkgbase=nginx-quic
pkgname=(nginx-quic nginx-quic-src)
pkgver=1.21.2
pkgrel=1
pkgrel=2
pkgdesc='Lightweight HTTP server and IMAP/POP3 proxy server, HTTP/3 QUIC branch'
arch=('i686' 'x86_64')
url='https://nginx.org'
@ -23,7 +25,7 @@ backup=('etc/nginx/fastcgi.conf'
'etc/nginx/win-utf'
'etc/logrotate.d/nginx')
install=nginx.install
provides=('nginx')
provides=('nginx' 'nginx-mainline')
conflicts=('nginx')
source=("hg+https://hg.nginx.org/nginx-quic#revision=fac88e160653"
"git+https://boringssl.googlesource.com/boringssl#commit=dddb60eb9700110835ff6e2b429de40a17006429"
@ -35,6 +37,8 @@ sha256sums=('SKIP'
'b9af19a75bbeb1434bba66dd1a11295057b387a2cbff4ddf46253133909c311e')
_common_flags=(
--with-compat
--with-debug
--with-file-aio
--with-http_addition_module
--with-http_auth_request_module
@ -56,14 +60,14 @@ _common_flags=(
--with-mail_ssl_module
--with-pcre-jit
--with-stream
--with-stream_geoip_module
--with-stream_realip_module
--with-stream_ssl_module
--with-stream_ssl_preread_module
--with-threads
)
_mainline_flags=(
--with-stream_ssl_preread_module
--with-stream_geoip_module
--with-stream_realip_module
)
_quic_flags=(
@ -72,6 +76,11 @@ _quic_flags=(
--with-stream_quic_module
)
prepare() {
# Backup pristine version of nginx source for -src package
cp -r ${srcdir}/${pkgname} ${srcdir}/${pkgname}-src
}
build() {
# Clear -D_FORTIFY_SOURCE from build flags, it causes Boringssl tests to fail to compile
export CPPFLAGS=${CPPFLAGS/-D_FORTIFY_SOURCE=[1-9]/-D_FORTIFY_SOURCE=0}
@ -114,7 +123,7 @@ build() {
make
}
package() {
package_nginx-quic() {
cd $pkgname
make DESTDIR="$pkgdir" install
@ -152,4 +161,16 @@ package() {
done
}
package_nginx-quic-src() {
pkgdesc="Source code of nginx-quic $pkgver, useful for building modules"
provides=('nginx-src' 'nginx-mainline-src')
conflicts=($_pkgbase-src)
depends=()
install -d "$pkgdir/usr/src"
cp -r ${srcdir}/${pkgname} "$pkgdir/usr/src/nginx"
# Link the 'configure' script to its location in release tarballs,
# as this is where modules expect it
ln -s /usr/src/nginx/auto/configure "$pkgdir/usr/src/nginx"
}
# vim:set ts=2 sw=2 et: