Subversion Repositories

?revision_form?Rev ?revision_input??revision_submit??revision_endform?

Rev 8 | Rev 34 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
8 magnus 1
#!/bin/sh
2
## 30_nonettle.dpatch by Magnus Holmgren <magnus@kibibyte.se>
3
##
4
## DP: Link dynamically with libnettle-dev instead of the bundled version
5
 
6
set -e
7
FILES=`find src -name nettle -prune -o -name Makefile.in -print`
8
 
9
dpatch_patch() {
10
    if [ ! -f debian/patched/30_nonettle_orig.tar.gz ]; then
11
        tar -czf debian/patched/30_nonettle_orig.tar.gz $FILES
33 magnus 12
        sed -ri -e '/^LDADD/,+1s%(\.\.?/)*nettle/libnettle\.a|-lnettle%-lnettle -lhogweed%' \
8 magnus 13
            -e 's%\s*(-[IL]\s*)?(\.\.?/)*\bnettle(/libnettle\.a)?\b%%g' $FILES
14
        mv src/nettle src/nettle-unused
15
    fi
16
}
17
 
18
dpatch_unpatch() {
19
    if [ -f debian/patched/30_nonettle_orig.tar.gz ]; then
20
        mv src/nettle-unused src/nettle
21
        tar -xzf debian/patched/30_nonettle_orig.tar.gz
22
    fi
23
}
24
 
25
DPATCH_LIB_NO_DEFAULT=1
26
 
27
. /usr/share/dpatch/dpatch.lib.sh