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