wok-current view haproxy/receipt @ rev 25728
Merge wok for both arch and few updates
author | Stanislas Leduc <shann@slitaz.org> |
---|---|
date | Thu Dec 05 08:39:45 2024 +0000 (8 weeks ago) |
parents | 83b97236db32 |
children |
line source
1 # SliTaz package receipt.
3 PACKAGE="haproxy"
4 VERSION="2.0.31"
5 CATEGORY="network"
6 SHORT_DESC="Reliable, High Performance TCP/HTTP Load Balancer."
7 MAINTAINER="shann@slitaz.org"
8 WEB_SITE="https://www.haproxy.org"
9 TARBALL="$PACKAGE-$VERSION.tar.gz"
10 WGET_URL="$WEB_SITE/download/${VERSION%.*}/src/$TARBALL"
11 HOST_ARCH="x86_64"
13 DEPENDS="gcc-lib-base pcre openssl lua5.4"
14 BUILD_DEPENDS="pcre-dev openssl-dev lua5.4-dev"
16 CONFIG_FILES="/etc/haproxy/haproxy.cfg"
18 # Rules to configure and make the package.
19 compile_rules()
20 {
21 cd $src
22 make CPU=generic TARGET=linux-glibc USE_PCRE=1 \
23 USE_GETADDRINFO=1 USE_LUA=1 USE_OPENSSL=1 PREFIX=/usr
24 make PREFIX=/usr DESTDIR=$DESTDIR install
25 }
27 # Rules to gen a SliTaz package suitable for Tazpkg.
28 genpkg_rules()
29 {
30 mkdir -p \
31 $fs/etc/init.d \
32 $fs/usr/share/haproxy \
33 $fs/etc/haproxy/modules \
34 $fs/usr/share/haproxy/.well-known/acme-challenge
36 cp -a $_pkg/usr/sbin $fs/usr
37 cp -a $stuff/haproxy.cfg $fs/etc/haproxy
38 cp -a $stuff/acme-webroot.lua $fs/etc/haproxy/modules
40 cp $stuff/daemon $fs/etc/init.d/haproxy
41 }
43 # Pre and post install command for Tazpkg.
44 post_install()
45 {
46 local user
47 local group
49 user=haproxy
50 group=haproxy
52 if ! grep -q ${user} "$1/etc/passwd"; then
53 echo
54 echo -n "Adding user HAProxy..."
55 chroot "$1/" /usr/sbin/addgroup -g 101 -S ${group}
56 chroot "$1/" /usr/sbin/adduser -s /bin/false -h /dev/null \
57 -g "HAProxy Daemon user" -u 101 -H -D -S -G ${group} ${user}
58 status
59 fi
60 chroot "$1/" /bin/chown -R ${user}.${group} /usr/share/haproxy
62 if ! grep -q ^HAPROXY_OPTIONS $root/etc/daemons.conf; then
63 echo '# HAProxy daemon options.' >> $root/etc/daemons.conf
64 echo 'HAPROXY_OPTIONS="-q -f /etc/haproxy/haproxy.cfg"' >> $root/etc/daemons.conf
65 echo '' >> $root/etc/daemons.conf
66 fi
67 }