Commit 2b5c38e2 authored by Guillaume Quintard's avatar Guillaume Quintard

add alpine packaging

parent ec7ad9e6
# this is a slimmed-down version of https://git.alpinelinux.org/aports/tree/main/varnish/APKBUILD
#
# before this can be used:
# - run "abuild checksum" to regenerate the sha512sums variable
# - replace @VERSION@ with the actual version to use
#
# relevant reading: https://wiki.alpinelinux.org/wiki/Creating_an_Alpine_package
#
# Contributor: Pedro Filipe <xpecex@outlook.com>
# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
# Contributor: V.Krishn <vkrishn4@gmail.com>
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
pkgname=varnish
pkgver=@VERSION@
pkgrel=1
pkgdesc="High-performance HTTP accelerator"
url="http://www.varnish-cache.org/"
arch="all"
license="BSD"
options="!check" # tests pass, but ran before packaging
depends="gcc libc-dev libgcc"
depends_dev=
makedepends="$depends_dev pcre-dev ncurses-dev libedit-dev py-docutils
linux-headers libunwind-dev python py3-sphinx"
install="$pkgname.pre-install"
subpackages="$pkgname-dbg $pkgname-dev $pkgname-doc $pkgname-libs"
pkgusers="varnish"
pkggroups="varnish"
source="$pkgname-$pkgver.tar.gz"
builddir="$srcdir/$pkgname-$pkgver"
build() {
cd "$builddir"
./configure \
--build="$CBUILD" \
--host="$CHOST" \
--prefix=/usr \
--sysconfdir=/etc \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
--localstatedir=/var/lib \
--without-jemalloc \
--with-unwind
make
}
check() {
cd "$builddir"
make -j12 check VERBOSE=1
}
package() {
cd "$builddir"
make DESTDIR="$pkgdir" install
install -d -o varnish -g varnish -m750 \
"$pkgdir"/var/cache/varnish \
"$pkgdir"/var/log/varnish \
"$pkgdir"/var/lib/varnish
install -d -o root -g varnish -m750 "$pkgdir"/etc/varnish
}
sha512sums="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX varnish-$pkgver.tar.gz"
#!/bin/sh
addgroup -S varnish 2>/dev/null
adduser -S -D -H -h /var/lib/varnish -s /sbin/nologin -G varnish -g varnish varnish 2>/dev/null
exit 0
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment