From 659c18d1a3a1ecad02c9987ecdc9a69a0fcf21df Mon Sep 17 00:00:00 2001 From: "Jannis M. Hoffmann" Date: Mon, 14 Aug 2023 13:15:18 +0200 Subject: initial commit --- build-fehQlibs | 93 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100755 build-fehQlibs (limited to 'build-fehQlibs') diff --git a/build-fehQlibs b/build-fehQlibs new file mode 100755 index 0000000..bd925dd --- /dev/null +++ b/build-fehQlibs @@ -0,0 +1,93 @@ +#!/bin/sh + +set -eu + +version=22a +upname=fehqlibs_$version.orig.tar.gz +srcname=fehqlibs-$version + +wget https://www.fehcom.de/ipnet/fehQlibs/fehQlibs-$version.tgz +ln -sf fehQlibs-$version.tgz $upname +tar -xf $upname +mv fehQlibs-$version $srcname +cd $srcname +debmake -b libqlibs --email jannis@fehcom.de --fullname 'Jannis M. Hoffmann' + +patch debian/control <<'END' +2c2 +< Section: unknown +--- +> Section: libs +5c5 +< Build-Depends: debhelper-compat (= 13) +--- +> Build-Depends: debhelper-compat (= 13), dh-exec +7c7 +< Homepage: +--- +> Homepage: https://www.fehcom.de/ipnet/qlibs.html +END + +cat <<'END' >debian/rules +#!/usr/bin/make -f +export DH_VERBOSE = 1 + +%: + dh $@ --buildsystem=none + +override_dh_auto_clean: + $(MAKE) clean + sed -i '31,$$d' conf-build + +override_dh_auto_configure: + echo CFLAGS=\"-Iinclude $(CFLAGS)\" >>conf-build + $(MAKE) check + +override_dh_auto_build: + LDFLAGS= $(MAKE) default +END + +cat <<'END' >debian/install +#!/usr/bin/dh-exec +qlibs.a => usr/lib/${DEB_HOST_MULTIARCH}/libqlibs.a +dnsstub/dnsresolv.a => usr/lib/${DEB_HOST_MULTIARCH}/libdnsresolv.a +debian/contrib/qlibs.pc usr/share/pkgconfig/ +END +chmod +x debian/install +ls --zero include/*.h | xargs --null -I{} echo '{} usr/include/qlibs/' >>debian/install + +cat <<'END' >debian/manpages +#!/usr/bin/dh-exec +man/error.3 => man/error-qlibs.3 +END +chmod +x debian/manpages +ls man/*.3 | grep -F 'man/error.3' -v >>debian/manpages + +mkdir debian/contrib +cat <<'END' >debian/contrib/qlibs.pc +prefix=/usr +includedir=${prefix}/include + +Name: qlibs +Description: qlibs is the foundation of `feh' software +URL: https://www.fehcom.de/ipnet/qlibs.html +Version: 22a +Cflags: -I${includedir}/qlibs +Libs: -lqlibs -ldnsresolv +END + +cat <debian/patches/000-ip-unsigned.patch +Author: Jannis M. Hoffmann + +--- fehqlibs_$version.orig/include/ip.h ++++ fehqlibs-$version/include/ip.h +@@ -60,3 +60,3 @@ + const static char V4localnet[4] = {0,0,0,0}; +-const static char V4broadcast[4] = {255,255,255,255}; ++const static unsigned char V4broadcast[4] = {255,255,255,255}; + +END + +echo 000-ip-unsigned.patch >>debian/patches/series + +rm debian/source/control debian/tests/control -- cgit v1.2.3