Makefile.PL: avoid in-place editing with sed
authorPhilipp A. Hartmann <philipp.hartmann@offis.de>
Mon, 27 Aug 2012 13:15:34 +0000 (15:15 +0200)
committerPhilipp A. Hartmann <philipp.hartmann@offis.de>
Mon, 27 Aug 2012 13:22:51 +0000 (15:22 +0200)
commit2dd28bf5f7a18e45af8285696bdbc31f6207f83c
tree948ef74f6b156cfc571a2fc6cd3c6774920e7256
parent17d16e7457fdd768cfcb303662b237d26487640e
Makefile.PL: avoid in-place editing with sed

This patch avoids the usage of the in-place editing option '-i' of sed for
version number extraction from debian/changelog to update pristine-tar.spec.

The -i option is not supported by all versions of sed (e.g. not by SunOS 5.9
nor by NetBSD 6.0).  Additionally, the exact syntax may vary.  E.g., the sed
of Mac OS X requires -i to be followed by a suffix, which is added to the
original filename to create a backup file.  The portable solution is to avoid
the in-place editing altogether and to instead write first to a temporary
file, which is then moved back to the original filename.

In addition to the use of a temporary file, the rule has been changed to
use the PERLRUN variable to invoke the correct perl interpreter and a
dependency on debian/changelog (the phonyness of the rule could be
dropped as well).

Signed-off-by: Philipp A. Hartmann <philipp.hartmann@offis.de>
Makefile.PL