community/haproxy to 2.4.0-1

This commit is contained in:
Kevin Mihelich 2021-05-28 14:11:41 +00:00
parent 31e929f820
commit d1d63f8adb
3 changed files with 64 additions and 56 deletions

View file

@ -0,0 +1,39 @@
diff --git a/admin/iprange/Makefile b/admin/iprange/Makefile
index 13598d8..eb89fb9 100644
--- a/admin/iprange/Makefile
+++ b/admin/iprange/Makefile
@@ -7,7 +7,7 @@ OBJS = iprange ip6range
all: $(OBJS)
%: %.c
- $(CC) $(LDFLAGS) $(OPTIMIZE) -o $@ $^
+ $(CC) $(OPTIMIZE) $(CFLAGS) $(LDFLAGS) -o $@ $^
clean:
rm -f $(OBJS) *.o *.a *~
diff --git a/dev/poll/Makefile b/dev/poll/Makefile
index fdee514..9be926c 100644
--- a/dev/poll/Makefile
+++ b/dev/poll/Makefile
@@ -5,7 +5,7 @@ INCLUDE =
OBJS = poll
poll: poll.c
- $(CC) $(OPTIMIZE) $(DEFINE) $(INCLUDE) -o $@ $^
+ $(CC) $(OPTIMIZE) $(CFLAGS) $(LDFLAGS) $(DEFINE) $(INCLUDE) -o $@ $^
clean:
rm -f $(OBJS) *.[oas] *~
diff --git a/dev/tcploop/Makefile b/dev/tcploop/Makefile
index 42a6259..e8a6ff7 100644
--- a/dev/tcploop/Makefile
+++ b/dev/tcploop/Makefile
@@ -5,7 +5,7 @@ INCLUDE =
OBJS = tcploop
tcploop: tcploop.c
- $(CC) $(OPTIMIZE) $(DEFINE) $(INCLUDE) -o $@ $^
+ $(CC) $(OPTIMIZE) $(CFLAGS) $(LDFLAGS) $(DEFINE) $(INCLUDE) -o $@ $^
clean:
rm -f $(OBJS) *.[oas] *~

View file

@ -1,39 +0,0 @@
diff --git a/contrib/halog/Makefile b/contrib/halog/Makefile
index bf67c1f..e98a3fa 100644
--- a/contrib/halog/Makefile
+++ b/contrib/halog/Makefile
@@ -16,7 +16,7 @@ DEFINE =
OBJS = halog
halog: halog.c fgets2.c
- $(CC) $(OPTIMIZE) $(DEFINE) -o $@ $(INCLUDE) $(SRC)/ebtree.c $(SRC)/eb32tree.c $(SRC)/eb64tree.c $(SRC)/ebmbtree.c $(SRC)/ebsttree.c $(SRC)/ebistree.c $(SRC)/ebimtree.c $^
+ $(CC) $(OPTIMIZE) $(CFLAGS) $(LDFLAGS) $(DEFINE) -o $@ $(INCLUDE) $(SRC)/ebtree.c $(SRC)/eb32tree.c $(SRC)/eb64tree.c $(SRC)/ebmbtree.c $(SRC)/ebsttree.c $(SRC)/ebistree.c $(SRC)/ebimtree.c $^
clean:
rm -f $(OBJS) *.[oas]
diff --git a/contrib/ip6range/Makefile b/contrib/ip6range/Makefile
index 55849b6..1276b97 100644
--- a/contrib/ip6range/Makefile
+++ b/contrib/ip6range/Makefile
@@ -7,7 +7,7 @@ OBJS = ip6range
all: $(OBJS)
%: %.c
- $(CC) $(LDFLAGS) $(OPTIMIZE) -o $@ $^
+ $(CC) $(CFLAGS) $(LDFLAGS) $(OPTIMIZE) -o $@ $^
clean:
rm -f $(OBJS) *.o *.a *~
diff --git a/contrib/iprange/Makefile b/contrib/iprange/Makefile
index b3c72ed..e92baf3 100644
--- a/contrib/iprange/Makefile
+++ b/contrib/iprange/Makefile
@@ -7,7 +7,7 @@ OBJS = iprange
all: $(OBJS)
%: %.c
- $(CC) $(LDFLAGS) $(OPTIMIZE) -o $@ $^
+ $(CC) $(CFLAGS) $(LDFLAGS) $(OPTIMIZE) -o $@ $^
clean:
rm -f $(OBJS) *.o *.a *~

View file

@ -5,7 +5,7 @@
# - explicitly link v5/v6 with libatomic # - explicitly link v5/v6 with libatomic
pkgname=haproxy pkgname=haproxy
pkgver=2.3.10 pkgver=2.4.0
pkgrel=1 pkgrel=1
pkgdesc='Reliable, high performance TCP/HTTP load balancer' pkgdesc='Reliable, high performance TCP/HTTP load balancer'
@ -23,38 +23,46 @@ install=haproxy.install
source=(https://www.haproxy.org/download/${pkgver%.*}/src/haproxy-$pkgver.tar.gz source=(https://www.haproxy.org/download/${pkgver%.*}/src/haproxy-$pkgver.tar.gz
haproxy.cfg haproxy.cfg
haproxy.sysusers haproxy.sysusers
0001-Use-CFLAGS-and-LDFLAGS-when-building-contrib.patch) 0001-Use-CFLAGS-and-LDFLAGS-when-building-admin.patch)
sha256sums=('9946e0cfc83f29072b3431e37246221cf9d4a9d28a158c075714d345266f4f35' sha256sums=('0a6962adaf5a1291db87e3eb4ddf906a72fed535dbd2255b164b7d8394a53640'
'e88edeb2fe23508565e46ff485c93cfb7c2e9c64f231538452ec7ecd7ec37a42' 'e88edeb2fe23508565e46ff485c93cfb7c2e9c64f231538452ec7ecd7ec37a42'
'b02b4088205039f0979aef0ef3e22957f493dd54eabefaee7011f2d795303b3e' 'b02b4088205039f0979aef0ef3e22957f493dd54eabefaee7011f2d795303b3e'
'81c03ef5d69f4f2ef2c7caa6722c82cda4a53b65f788a46e668ec2faa3abd8f5') '8cdbb8be7a712f7b2c7f4823a96d2d2926d96b57632e9669069354d7f2df9fd2')
prepare() { prepare() {
cd haproxy-$pkgver cd haproxy-$pkgver
patch -p1 <"$srcdir"/0001-Use-CFLAGS-and-LDFLAGS-when-building-contrib.patch patch -p1 <"$srcdir"/0001-Use-CFLAGS-and-LDFLAGS-when-building-admin.patch
} }
build() { build() {
cd haproxy-$pkgver cd haproxy-$pkgver
[[ $CARCH == "arm" || $CARCH == "armv6h" ]] && ADDLIB="-latomic" [[ $CARCH == "arm" || $CARCH == "armv6h" ]] && ADDLIB="-latomic"
make CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" \ make \
ADDLIB=$ADDLIB \ ADDLIB=$ADDLIB \
CFLAGS="$CFLAGS" \
LDFLAGS="$LDFLAGS" \
CPU=generic \ CPU=generic \
TARGET=linux-glibc \ TARGET=linux-glibc \
USE_GETADDRINFO=1 \ USE_GETADDRINFO=1 \
USE_LUA=1 \
USE_OPENSSL=1 \ USE_OPENSSL=1 \
USE_PCRE=1 USE_PCRE_JIT=1 \ USE_PCRE=1 USE_PCRE_JIT=1 \
USE_ZLIB=1 \ USE_PROMEX=1 \
USE_LUA=1 \
USE_SYSTEMD=1 \ USE_SYSTEMD=1 \
EXTRA_OBJS="contrib/prometheus-exporter/service-prometheus.o" USE_ZLIB=1
for contrib in halog iprange ip6range systemd; do make \
make -C contrib/$contrib SBINDIR=/usr/bin OPTIMIZE= CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" SBINDIR=/usr/bin \
done OPTIMIZE= \
CFLAGS="$CFLAGS" \
LDFLAGS="$LDFLAGS" \
admin/{halog/halog,iprange/ip{,6}range}
make \
SBINDIR=/usr/bin \
-C admin/systemd/
} }
package() { package() {
@ -65,13 +73,13 @@ package() {
DOCDIR="$pkgdir"/usr/share/$pkgname \ DOCDIR="$pkgdir"/usr/share/$pkgname \
install install
for contrib in halog iprange ip6range; do for admin in admin/{halog/halog,iprange/ip{,6}range}; do
install -Dm755 contrib/$contrib/$contrib "$pkgdir"/usr/bin/$contrib install -D -m0755 $admin "$pkgdir"/usr/bin/$(basename $admin)
done done
install -Dm644 ../haproxy.sysusers "$pkgdir"/usr/lib/sysusers.d/haproxy.conf install -D -m0644 ../haproxy.sysusers "$pkgdir"/usr/lib/sysusers.d/haproxy.conf
install -Dm644 ../haproxy.cfg "$pkgdir"/etc/haproxy/haproxy.cfg install -D -m0644 ../haproxy.cfg "$pkgdir"/etc/haproxy/haproxy.cfg
install -Dm644 contrib/systemd/haproxy.service \ install -D -m0644 admin/systemd/haproxy.service \
"$pkgdir"/usr/lib/systemd/system/haproxy.service "$pkgdir"/usr/lib/systemd/system/haproxy.service
cp -r examples "$pkgdir"/usr/share/haproxy/examples cp -r examples "$pkgdir"/usr/share/haproxy/examples
} }