Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
#!/bin/sh
## 30_nonettle.dpatch by Magnus Holmgren <magnus@kibibyte.se>
##
## DP: Link dynamically with libnettle-dev instead of the bundled version
set -e
FILES=`find src -name nettle -prune -o -name Makefile.in -print`
dpatch_patch() {
if [ ! -f debian/patched/30_nonettle_orig.tar.gz ]; then
tar -czf debian/patched/30_nonettle_orig.tar.gz $FILES
sed -ri -e '/^LDADD/s%(\.\.?/)*nettle/libnettle\.a%-lnettle%' \
-e 's%\s*(-[IL]\s*)?(\.\.?/)*\bnettle(/libnettle\.a)?\b%%g' $FILES
mv src/nettle src/nettle-unused
fi
}
dpatch_unpatch() {
if [ -f debian/patched/30_nonettle_orig.tar.gz ]; then
mv src/nettle-unused src/nettle
tar -xzf debian/patched/30_nonettle_orig.tar.gz
fi
}
DPATCH_LIB_NO_DEFAULT=1
. /usr/share/dpatch/dpatch.lib.sh