# Copyright 2015 Marc-Antoine Perennou # Copyright 2021 Maxime Sorin # Distributed under the terms of the GNU General Public License v2 require github [ release=${PNV} suffix=tar.gz ] require autotools [ supported_autoconf=[ 2.7 ] supported_automake=[ 1.18 ] ] require systemd-service SUMMARY="Varnish Cache, the high-performance HTTP accelerator" HOMEPAGE+=" https://www.varnish.org" BUGS_TO="keruspe@exherbo.org" LICENCES="BSD-2" SLOT="0" PLATFORMS="~amd64" MYOPTIONS=" doc " # Way too much networking RESTRICT="test" DEPENDENCIES=" build: dev-lang/python:*[>=3] dev-python/Sphinx dev-python/docutils virtual/pkg-config build+run: user/varnish group/varnish dev-libs/libedit dev-libs/pcre2 sys-libs/ncurses sys-libs/readline:= suggestion: net/varnish-modules [[ description = [ A collection of modules (vmods) extending Varnish VCL ] ]] " DEFAULT_SRC_CONFIGURE_PARAMS=( --enable-pcre2-jit --disable-coverage --disable-oss-fuzz --with-ncurses --without-contrib --without-jemalloc --without-unwind ) # varnish{,-legacy}.m4 AT_M4DIR=( . ) src_prepare() { edo sed \ -e 's/-Werror//' \ -i configure.ac autotools_src_prepare } src_install() { default insinto /etc/varnish newins etc/example.vcl default.vcl doins "${FILES}"/varnish.params install_systemd_files if option doc ; then edo pushd doc dodoc -r html edo popd fi diropts -m 0755 -o varnish -g varnish keepdir /var/lib/${PN} keepdir /var/log/${PN} } pkg_postinst() { if [[ ! -f /etc/${PN}/secret ]]; then dd if=/dev/random of=/etc/${PN}/secret count=1 bs=4096 einfo "A secret file has just been generated in /etc/varnish/secret" fi }