Subversion Repositories

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

Rev 2 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 magnus 1
#!/bin/sh
2
## 02_wrong_lib_version_h.dpatch by Magnus Holmgren <magnus@kibibyte.se>
3
##
4
## All lines beginning with `## DP:' are a description of the patch.
5
## DP: Move static spf_lib_version.h out of the way and patch configure to put
6
## DP: the autogenerated one in the right place.
7
 
8
set -e
9
 
10
lib_version_h=src/include/spf_lib_version.h
11
 
12
dpatch_patch() {
13
    # Update configure script so that it writes to the right .h file
14
    test -e configure.old || \
15
        sed -ri.old -e 's%src/libspf2/spf_lib_version%src/include/spf_lib_version%' configure
16
    # Move the bad .h file out of the way
17
    test -e $lib_version_h.old || mv -f $lib_version_h $lib_version_h.old
18
}
19
 
20
dpatch_unpatch() {
21
    # Move the bad .h file back to its position
22
    if test -e $lib_version_h.old; then mv -f $lib_version_h.old $lib_version_h; fi
23
    # Move the original configure script back
24
    if test -e configure.old; then mv -f configure.old configure; fi
25
}
26
 
27
 
28
DPATCH_LIB_NO_DEFAULT=1
29
 
30
. /usr/share/dpatch/dpatch.lib.sh