summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPÁLI Gábor János <pali.gabor@gmail.com>2022-12-30 14:50:27 +0100
committerPÁLI Gábor János <pali.gabor@gmail.com>2022-12-30 14:50:27 +0100
commitb8bcf86560cfe636983265550dd55e8d13e65696 (patch)
tree444587ab58adb64d047e29352c9a2ed79c06594f
parentf26361cf04e91c304edb89d1ced06025fc370b5b (diff)
downloadfreebsd-wifibox-alpine-b8bcf86560cfe636983265550dd55e8d13e65696.zip
socat: Update to 1.7.4.4, offer UDP support on demand.
By default, `socat` should stay stripped down, that is, without support for UDP. Create an alternate version where it can be explicitly requested to host this feature, such as for the forwarding service.
-rw-r--r--aports/forwarding/APKBUILD4
-rw-r--r--aports/socat/APKBUILD114
-rw-r--r--aports/uds_passthru/APKBUILD2
3 files changed, 76 insertions, 44 deletions
diff --git a/aports/forwarding/APKBUILD b/aports/forwarding/APKBUILD
index f735cf4..5115aa9 100644
--- a/aports/forwarding/APKBUILD
+++ b/aports/forwarding/APKBUILD
@@ -2,12 +2,12 @@
pkgname=forwarding
pkgver=0.1.0
-pkgrel=0
+pkgrel=1
pkgdesc="Forwarding management service for Wifibox"
url="https://github.com/pgj/freebsd-wifibox-alpine"
arch="all"
license="BSD2"
-depends="socat"
+depends="socat-with-udp"
install=""
subpackages=
options="!check"
diff --git a/aports/socat/APKBUILD b/aports/socat/APKBUILD
index 1966d19..53e0c4f 100644
--- a/aports/socat/APKBUILD
+++ b/aports/socat/APKBUILD
@@ -1,65 +1,97 @@
# Maintainer: Gabor Pali <pali.gabor@gmail.com>
pkgname=socat
-pkgver=1.7.4.3
-pkgrel=1 # base: 0
-pkgdesc="Multipurpose relay for binary protocols"
+pkgver=1.7.4.4
+pkgrel=0 # base: 0
+pkgdesc="Multipurpose relay for binary protocols (stripped)"
options="!check"
url="http://www.dest-unreach.org/socat/"
arch="all"
license="GPL-2.0-only WITH OpenSSL-Exception"
-makedepends="openssl1.1-compat-dev readline-dev linux-headers"
-subpackages=
+makedepends="linux-headers"
+subpackages="$pkgname-with-udp:_udp"
source="http://www.dest-unreach.org/socat/download/socat-$pkgver.tar.gz
use-linux-headers.patch
netdb-internal.patch
no-extras.patch
"
+_srcdir="$srcdir"/"$pkgname"-"$pkgver"
+_stripped_build_dir="$srcdir"/build-stripped
+_with_udp_build_dir="$srcdir"/build-with-udp
+
+prepare() {
+ default_prepare
+
+ mkdir -p \
+ "$_stripped_build_dir" \
+ "$_with_udp_build_dir"
+}
+
+_options="--srcdir=$_srcdir
+ --build=$CBUILD
+ --host=$CHOST
+ --disable-stdio
+ --disable-fdnum
+ --disable-file
+ --disable-creat
+ --disable-gopen
+ --disable-pipe
+ --disable-termios
+ --disable-ip6
+ --disable-rawip
+ --disable-genericsocket
+ --disable-interface
+ --disable-sctp
+ --disable-vsock
+ --disable-socks4
+ --disable-socks4a
+ --disable-proxy
+ --disable-exec
+ --disable-system
+ --disable-pty
+ --disable-fs
+ --disable-readline
+ --disable-openssl
+ --disable-tun
+ --disable-sycls
+ --disable-filan
+ --disable-retry
+ --disable-libwrap
+ --prefix=/usr"
+
build() {
- # Just like Solaris, musl doesn't have getprotobynumber_r.
- # Setting the configure variable to 2 ensures it isn't used.
- sc_cv_getprotobynumber_r=2 \
- ./configure \
- --build=$CBUILD \
- --host=$CHOST \
- --disable-stdio \
- --disable-fdnum \
- --disable-file \
- --disable-creat \
- --disable-gopen \
- --disable-pipe \
- --disable-termios \
- --disable-ip6 \
- --disable-rawip \
- --disable-genericsocket \
- --disable-interface \
- --disable-sctp \
- --disable-vsock \
- --disable-socks4 \
- --disable-socks4a \
- --disable-proxy \
- --disable-exec \
- --disable-system \
- --disable-pty \
- --disable-fs \
- --disable-readline \
- --disable-openssl \
- --disable-tun \
- --disable-sycls \
- --disable-filan \
- --disable-retry \
- --disable-libwrap \
- --prefix=/usr
- make
+ msg "Building stripped (strict)"
+
+ cd "$_stripped_build_dir"
+ "$_srcdir"/configure \
+ $_options \
+ --disable-udp
+ make -j8
+
+ msg "Building with UDP"
+
+ cd "$_with_udp_build_dir"
+ "$_srcdir"/configure \
+ $_options
+ make -j8
}
package() {
+ cd "$_stripped_build_dir"
make DESTDIR="$pkgdir" install
}
+_udp() {
+ pkgdesc="Multipurpose relay for binary protocols (with UDP enabled)"
+ provides="socat"
+ mkdir -p "$subpkgdir"
+ cd "$_with_udp_build_dir"
+ make DESTDIR="$subpkgdir" install
+}
+
sha512sums="
-81cb34c245052b6a0ae38a711591358460b6070957af4a9eeb11a3cadb4aff184eeaedabbc7ecdc7fdf21a6126c06f90f19b24a87ce74b30bfd60a3879181046 socat-1.7.4.3.tar.gz
+709fd393642d4249152d75add4d489ea76e6118c9e6740e796f029e8c5ddd4f5c9218d587977fc57ada640f635a996cbbe4055275236a169881bb2be1d3e5df9 socat-1.7.4.4.tar.gz
2032b6528cb27b69d8fb6a6f64af32fcc1f6e4934bb0d7c8931b38ab7ad5e27f6f4344a6cf49751fa3178cd725f954e195373362f7d5929e587d7f0309346059 use-linux-headers.patch
22a6e0c2317a9317997c98114daac258ebbcc3d8e58e49a6ebf24781b98967afed47c63807282582fa0909076fe349281f05e4462faacb90e7aabc853903d6e6 netdb-internal.patch
de2ca2d318ada9ac7140ad6fbc42006ea0ef040d68cc579ed1452246fd16a7eceb4ce577336bc20e513cf6fe24da296447529ec36c22fa17a4c18be29e180b81 no-extras.patch
diff --git a/aports/uds_passthru/APKBUILD b/aports/uds_passthru/APKBUILD
index 1fd7d07..5bc327c 100644
--- a/aports/uds_passthru/APKBUILD
+++ b/aports/uds_passthru/APKBUILD
@@ -2,7 +2,7 @@
pkgname=uds_passthru
pkgver=0.1.1
-pkgrel=0
+pkgrel=1
pkgdesc="Unix Domain Socket pass-through for Wifibox"
url="https://github.com/pgj/freebsd-wifibox-alpine"
arch="all"