Subversion Repositories

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

Blame | Last modification | View Log | RSS feed

#!/bin/sh
## 02_wrong_lib_version_h.dpatch by Magnus Holmgren <magnus@kibibyte.se>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Move static spf_lib_version.h out of the way and patch configure to put 
## DP: the autogenerated one in the right place.

set -e

lib_version_h=src/include/spf_lib_version.h

dpatch_patch() {
    # Update configure script so that it writes to the right .h file
    test -e configure.old || \
        sed -ri.old -e 's%src/libspf2/spf_lib_version%src/include/spf_lib_version%' configure
    # Move the bad .h file out of the way
    test -e $lib_version_h.old || mv -f $lib_version_h $lib_version_h.old
}

dpatch_unpatch() {
    # Move the bad .h file back to its position
    if test -e $lib_version_h.old; then mv -f $lib_version_h.old $lib_version_h; fi
    # Move the original configure script back
    if test -e configure.old; then mv -f configure.old configure; fi
}


DPATCH_LIB_NO_DEFAULT=1

. /usr/share/dpatch/dpatch.lib.sh