diff options
author | Jannis M. Hoffmann <jannis@fehcom.de> | 2023-08-14 13:15:18 +0200 |
---|---|---|
committer | Jannis M. Hoffmann <jannis@fehcom.de> | 2023-08-14 13:15:18 +0200 |
commit | 659c18d1a3a1ecad02c9987ecdc9a69a0fcf21df (patch) | |
tree | eca6b0251569ba049656da75db5e811a823af877 /build-ucspi-tcp6 |
initial commit
Diffstat (limited to 'build-ucspi-tcp6')
-rwxr-xr-x | build-ucspi-tcp6 | 123 |
1 files changed, 123 insertions, 0 deletions
diff --git a/build-ucspi-tcp6 b/build-ucspi-tcp6 new file mode 100755 index 0000000..117a6b3 --- /dev/null +++ b/build-ucspi-tcp6 @@ -0,0 +1,123 @@ +#!/bin/sh + +set -eu + +name=ucspi-tcp6 +version=1.12.4 +upname=${name}_$version.orig.tar.gz +srcname=$name-$version +rel_project_root=$name/$name-$version +abs_project_root=$name-$version/$rel_project_root + +wget https://www.fehcom.de/ipnet/$name/$name-$version.tgz +ln -sf $name-$version.tgz $upname +tar -xf $upname +mv net $srcname +cd $srcname +debmake --email jannis@fehcom.de --fullname 'Jannis M. Hoffmann' + +patch debian/control <<'END' +2c2 +< Section: unknown +--- +> Section: net +5c5 +< Build-Depends: debhelper-compat (= 13) +--- +> Build-Depends: debhelper-compat (= 13), dh-exec, libqlibs +7c7 +< Homepage: <insert the upstream URL, if relevant> +--- +> Homepage: https://www.fehcom.de/ipnet/ucspi-tcp6.html +END + +cat <<END >debian/rules +#!/usr/bin/make -f +# You must remove unused comment lines for the released package. +export DH_VERBOSE = 1 +#export DEB_BUILD_MAINT_OPTIONS = hardening=+all +#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic +#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed + +%: + dh \$@ --buildsystem=none + +override_dh_auto_clean: + rm -f $rel_project_root/conf-cc + rm -f $rel_project_root/conf-ld + \$(MAKE) -C $rel_project_root/src clean + +override_dh_auto_configure: + echo "\$(CC) -Iinclude \`pkg-config -cflags qlibs\` \$(CFLAGS)" >$rel_project_root/conf-cc + echo \$(CC) >$rel_project_root/conf-ld + +override_dh_auto_build: + \$(MAKE) -C $rel_project_root/src default +END + +cat <<END >debian/manpages +$rel_project_root/man/*.1 +$rel_project_root/man/*.5 +END + +cat <<END >debian/install +$rel_project_root/src/addcr usr/bin +$rel_project_root/src/argv0 usr/bin +$rel_project_root/src/date@ usr/bin +$rel_project_root/src/delcr usr/bin +$rel_project_root/src/finger@ usr/bin +$rel_project_root/src/fixcrio usr/bin +$rel_project_root/src/http@ usr/bin +$rel_project_root/src/mconnect usr/bin +$rel_project_root/src/rblsmtpd usr/bin +$rel_project_root/src/recordio usr/bin +$rel_project_root/src/tcpcat usr/bin +$rel_project_root/src/tcpclient usr/bin +$rel_project_root/src/tcprules usr/bin +$rel_project_root/src/tcprulescheck usr/bin +$rel_project_root/src/tcpserver usr/bin +$rel_project_root/src/who@ usr/bin +END + +cat <<END >debian/clean +$rel_project_root/src/ip4_bit.o +$rel_project_root/src/ip6_bit.o +$rel_project_root/src/remoteinfo.o +$rel_project_root/src/rules.o +$rel_project_root/src/argv0 +$rel_project_root/src/argv0.o +$rel_project_root/src/commands.o +$rel_project_root/src/rblsmtpd +$rel_project_root/src/rblsmtpd.o +$rel_project_root/src/date@ +$rel_project_root/src/finger@ +$rel_project_root/src/http@ +END + +cat <<END >debian/patches/000-conf.patch +Author: Jannis M. Hoffmann +Description: Adjust build configuration so that the \`configure' step creates conf-XX files. + +--- /dev/null ++++ $abs_project_root/src/home +@@ -0,0 +0,1 @@ ++ + +--- $abs_project_root/conf-cc ++++ /dev/null +@@ -0,3 +0,0 @@ +-cc -O2 -g -Wall -I\`head -1 ../conf-qlibs\`/include +- +-This will be used to compile .c files. + +--- $abs_project_root/conf-ld ++++ /dev/null +@@ -0,3 +0,0 @@ +-cc -s -L\`head -1 ../conf-qlibs\` +- +-This will be used to link .o files into an executable. +END + +printf 000-conf.patch >>debian/patches/series + +rm debian/source/control debian/tests/control |