summaryrefslogtreecommitdiff
path: root/aports/socat
diff options
context:
space:
mode:
authorPÁLI Gábor János <pali.gabor@gmail.com>2022-04-10 18:17:21 +0200
committerPÁLI Gábor János <pali.gabor@gmail.com>2022-04-10 23:09:31 +0200
commitbcbf7c6c9fc7d8a96b1d5c4cc9247b85fe3da2ad (patch)
tree46d796182b2249408b0597485462ef1698dc4c13 /aports/socat
parent40d2daea11738408b7bf7b60f14a558ff8c47fb0 (diff)
downloadfreebsd-wifibox-alpine-bcbf7c6c9fc7d8a96b1d5c4cc9247b85fe3da2ad.zip
Move towards custom packages.
Change the build image process in a way that custom-built packages can be utilized. This means a simpler `Makefile` since every modification is implemented on the level of packages. Include the sources for every customized package.
Diffstat (limited to 'aports/socat')
-rw-r--r--aports/socat/APKBUILD64
-rw-r--r--aports/socat/netdb-internal.patch13
-rw-r--r--aports/socat/no-extras.patch50
-rw-r--r--aports/socat/use-linux-headers.patch11
4 files changed, 138 insertions, 0 deletions
diff --git a/aports/socat/APKBUILD b/aports/socat/APKBUILD
new file mode 100644
index 0000000..deb9d81
--- /dev/null
+++ b/aports/socat/APKBUILD
@@ -0,0 +1,64 @@
+# Maintainer: Gabor Pali <pali.gabor@gmail.com>
+
+pkgname=socat
+pkgver=1.7.4.2
+pkgrel=0
+pkgdesc="Multipurpose relay for binary protocols"
+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=
+source="http://www.dest-unreach.org/socat/download/socat-$pkgver.tar.gz
+ use-linux-headers.patch
+ netdb-internal.patch
+ no-extras.patch
+ "
+
+build() {
+ ./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-udp \
+ --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
+}
+
+package() {
+ make DESTDIR="$pkgdir" install
+}
+
+sha512sums="
+c331a6348e0febb35cd8adc2b116e3b8896cd7f64bcd93e507df4b8197ee1e6738ca256abf74c9b225e7a3769cf9643f0e237826125c6f390b5124ce0f10c972 socat-1.7.4.2.tar.gz
+2032b6528cb27b69d8fb6a6f64af32fcc1f6e4934bb0d7c8931b38ab7ad5e27f6f4344a6cf49751fa3178cd725f954e195373362f7d5929e587d7f0309346059 use-linux-headers.patch
+22a6e0c2317a9317997c98114daac258ebbcc3d8e58e49a6ebf24781b98967afed47c63807282582fa0909076fe349281f05e4462faacb90e7aabc853903d6e6 netdb-internal.patch
+de2ca2d318ada9ac7140ad6fbc42006ea0ef040d68cc579ed1452246fd16a7eceb4ce577336bc20e513cf6fe24da296447529ec36c22fa17a4c18be29e180b81 no-extras.patch
+"
diff --git a/aports/socat/netdb-internal.patch b/aports/socat/netdb-internal.patch
new file mode 100644
index 0000000..d1ebc8e
--- /dev/null
+++ b/aports/socat/netdb-internal.patch
@@ -0,0 +1,13 @@
+--- socat-1.7.2.4.orig/compat.h
++++ socat-1.7.2.4/compat.h
+@@ -656,6 +656,10 @@
+ # define NETDB_INTERNAL h_NETDB_INTERNAL
+ #endif
+
++#if !defined(NETDB_INTERNAL)
++# define NETDB_INTERNAL (-1)
++#endif
++
+ #ifndef INET_ADDRSTRLEN
+ # define INET_ADDRSTRLEN sizeof(struct sockaddr_in)
+ #endif
diff --git a/aports/socat/no-extras.patch b/aports/socat/no-extras.patch
new file mode 100644
index 0000000..94bd71a
--- /dev/null
+++ b/aports/socat/no-extras.patch
@@ -0,0 +1,50 @@
+--- socat-1.7.4.2/Makefile.in.orig 2022-04-01 22:07:25.284535646 +0000
++++ socat-1.7.4.2/Makefile.in 2022-04-01 22:09:04.484450962 +0000
+@@ -57,7 +57,7 @@
+ UTLOBJS = $(UTLSRCS:.c=.o)
+ CFILES = $(XIOSRCS) $(UTLSRCS) socat.c procan_main.c filan_main.c
+ OFILES = $(CFILES:.c=.o)
+-PROGS = socat procan filan
++PROGS = socat
+
+ HFILES = sycls.h sslcls.h error.h dalan.h procan.h filan.h hostan.h sysincludes.h xio.h xioopen.h sysutils.h utils.h nestlex.h vsnprintf_r.h snprinterr.h compat.h \
+ xioconfig.h mytypes.h xioopts.h xiodiag.h xiohelp.h xiosysincludes.h \
+@@ -87,7 +87,7 @@
+ Config/Makefile.MacOSX-10-5 Config/config.MacOSX-10-5.h \
+ Config/Makefile.DragonFly-2-8-2 Config/config.DragonFly-2-8-2.h
+
+-all: progs doc
++all: progs
+
+ scmclean: gitclean
+
+@@ -131,19 +131,12 @@
+ strip: progs
+ strip $(PROGS)
+
+-install: progs $(srcdir)/doc/socat.1
++install: progs
+ mkdir -p $(DESTDIR)$(BINDEST)
+ $(INSTALL) -m 755 socat $(DESTDIR)$(BINDEST)
+- $(INSTALL) -m 755 procan $(DESTDIR)$(BINDEST)
+- $(INSTALL) -m 755 filan $(DESTDIR)$(BINDEST)
+- mkdir -p $(DESTDIR)$(MANDEST)/man1
+- $(INSTALL) -m 644 $(srcdir)/doc/socat.1 $(DESTDIR)$(MANDEST)/man1/
+
+ uninstall:
+ rm -f $(DESTDIR)$(BINDEST)/socat
+- rm -f $(DESTDIR)$(BINDEST)/procan
+- rm -f $(DESTDIR)$(BINDEST)/filan
+- rm -f $(DESTDIR)$(MANDEST)/man1/socat.1
+
+ # make a GNU-zipped tar ball of the source files
+ dist: socat.tar.gz socat.tar.bz2
+@@ -165,7 +158,7 @@
+ rm -r $(TARDIR)
+
+ clean:
+- rm -f *.o libxio.a socat procan filan \
++ rm -f *.o libxio.a socat \
+ socat.tar socat.tar.Z socat.tar.gz socat.tar.bz2 \
+ socat.out compile.log test.log
+
diff --git a/aports/socat/use-linux-headers.patch b/aports/socat/use-linux-headers.patch
new file mode 100644
index 0000000..5ef90ac
--- /dev/null
+++ b/aports/socat/use-linux-headers.patch
@@ -0,0 +1,11 @@
+--- socat-1.7.2.4.orig/sysincludes.h
++++ socat-1.7.2.4/sysincludes.h
+@@ -134,7 +134,7 @@
+ #include <netpacket/packet.h>
+ #endif
+ #if HAVE_NETINET_IF_ETHER_H
+-#include <netinet/if_ether.h>
++#include <linux/if_ether.h>
+ #endif
+ #if HAVE_LINUX_IF_TUN_H
+ #include <linux/if_tun.h>