syncing packaging files from 3.0
[garming/samba-autobuild/.git] / packaging / Debian / debian / scripts / patch-source
1 #!/bin/sh -e
2 #
3 #
4
5 for patch in debian/patches/*.patch; do
6         echo '->'`basename $patch`:
7         patch -p1 --ignore-whitespace < $patch
8 done
9
10 # This code is currently not used because it creates a long version
11 # number string. For now we're sticking to <upstream version>-Debian,
12 # as in 3.0.0rc2-Debian. peloy@debian.org.-
13
14 # ---- Begin unused code ----
15 # Get Debian version number from 1st line of the Debian changelog
16 #DEBIAN_VERSION=`sed -n -e '1s/^.*(\(.*\)).*$/\1/p' debian/changelog`
17
18 # Insert Debian version number in source/VERSION, which will then be
19 # used to create source/include/version.h.
20 #TMPFILE=source/VERSION.debian
21 #sed -e "s/^\(SAMBA_VERSION_VENDOR_SUFFIX=\).*$/\1\"Debian-${DEBIAN_VERSION}\"/"  source/VERSION > ${TMPFILE}
22 #mv -f ${TMPFILE} source/VERSION
23 # ---- End unused code ----
24
25 # Regenerate configure only if it is older than configure.in
26 [ source/configure -ot source/configure.in ] && (cd source && sh ./autogen.sh)
27
28 exit 0