#!/bin/sh -e # Apply Debian patches in order. while read -r patch; do patch -p1 < "debian/patches/$patch" done < debian/patches/series # Apply b64 patch from Alpine. patch -p1 < ./b64.patch sed -i Makefile -e "/SRCS=/s;\(.*\);& base64.c;" make # Install. install -Dm755 nc "$1"/usr/bin/nc install -Dm644 nc.1 "$1"/usr/share/man/man1/nc.openbsd.1