Adds Varnish back to packages. - Don't use jemalloc on -musl builds. This appears to be leading to the segfault described in the earlier broken= message for those. Noticed the segfault doesn't happen in Alpine's build, and the only major difference there is that they disable jemalloc (because they don't support it, but given that it's the only difference, it was worth disabling to get builds working). jemalloc remains enabled for glibc. - Disable pcrejit by default. There is a build option to turn it on, but this is disabled by default for cross builds. We could add a check for target machine == host machine and enable it on those by default if desired, but the build option may be easier. Could also hack around the config cache, but I'm less confident in JIT availability on ARM and such than I am basic socket definitions. - The package originally included a varnish-vcl-reload file in the files directory. This has been removed because it is, as far as I can tell, unused. - Rewrite run file. Old one doesn't work at all, no reason to preserve it. - Add _varnish and _vcache system users for default jail argument in run file. These share a system group.
66 lines
1.8 KiB
Bash
66 lines
1.8 KiB
Bash
# Template file for 'varnish'
|
|
pkgname=varnish
|
|
version=6.3.0
|
|
revision=1
|
|
build_style=gnu-configure
|
|
configure_args="--cache-file=config.void --disable-static $(vopt_enable pcrejit pcre-jit)"
|
|
hostmakedepends="pkg-config python3 python3-docutils python3-Sphinx"
|
|
makedepends="pcre-devel readline-devel"
|
|
short_desc="Fast caching HTTP reverse proxy"
|
|
maintainer="Noel Cower <ncower@gmail.com>"
|
|
license="BSD-2-Clause"
|
|
homepage="https://varnish-cache.org/"
|
|
distfiles="https://varnish-cache.org/_downloads/${pkgname}-${version}.tgz"
|
|
checksum=95ccdec5f1dcba8b41d24e685b3f2379fbc6b9701d106cc78011d4d09a73947f
|
|
lib32disabled=yes
|
|
|
|
build_options="pcrejit"
|
|
|
|
conf_files="/etc/varnish/default.vcl"
|
|
make_dirs="/var/lib/varnish 0750 _varnish _varnish
|
|
/var/log/varnish 0750 _varnish _varnish"
|
|
|
|
system_accounts="_varnish _vcache"
|
|
_varnish_homedir="/var/lib/varnish"
|
|
_vcache_pgroup="_varnish"
|
|
|
|
if [ yes = "$(vopt_if pcrejit yes)" ]; then
|
|
# Don't permit cross builds if pcrejit is set.
|
|
nocross="Cannot run test program when cross compiling (PCRE_JIT)"
|
|
elif [ "${XBPS_MACHINE%-musl}" != "${XBPS_TARGET_MACHINE%-musl}" ]; then
|
|
# Mark builds with different architectures as nocross.
|
|
nocross="Host and target architectures must be the same to run the program during build"
|
|
fi
|
|
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
*-musl)
|
|
configure_args+=" --without-jemalloc"
|
|
makedepends+=" libexecinfo-devel"
|
|
;;
|
|
*)
|
|
makedepends+=" jemalloc-devel"
|
|
;;
|
|
esac
|
|
|
|
post_install() {
|
|
vinstall etc/example.vcl 644 etc/varnish default.vcl
|
|
vsv varnishd
|
|
vlicense LICENSE
|
|
}
|
|
|
|
libvarnishapi_package() {
|
|
short_desc+=" - API runtime library"
|
|
pkg_install() {
|
|
vmove "usr/lib/*.so.*"
|
|
}
|
|
}
|
|
libvarnishapi-devel_package() {
|
|
depends="libvarnishapi>=${version}_${revision}"
|
|
short_desc+=" - API development files"
|
|
pkg_install() {
|
|
vmove usr/include
|
|
vmove usr/lib/pkgconfig
|
|
vmove "usr/lib/*.so"
|
|
vmove usr/share/man/man3
|
|
}
|
|
}
|