[perl-YAML] Inject VERSION into each module

Petr Pisar ppisar at fedoraproject.org
Thu Jul 3 14:16:13 UTC 2014


commit 713372de05cd1c7a8cafc1e74cad55823d4da626
Author: Petr Písař <ppisar at redhat.com>
Date:   Thu Jul 3 16:13:10 2014 +0200

    Inject VERSION into each module

 perl-YAML.spec |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/perl-YAML.spec b/perl-YAML.spec
index bfb782e..e4d0269 100644
--- a/perl-YAML.spec
+++ b/perl-YAML.spec
@@ -1,6 +1,6 @@
 Name:           perl-YAML
 Version:        0.95
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        YAML Ain't Markup Language (tm)
 License:        GPL+ or Artistic
 Group:          Development/Libraries
@@ -41,6 +41,10 @@ specification.
 
 %prep
 %setup -q -n YAML-%{version}
+# Inject VERSION into each module, bug #1115971,
+# https://github.com/ingydotnet/yaml-pm/issues/30
+find lib -name '*.pm' \! -exec grep -q '^our $VERSION ' {} \; -print0 | \
+    xargs -0 -- sed -i -e '/^package /a\our $VERSION = %{version};'
 
 %build
 perl Makefile.PL INSTALLDIRS=vendor
@@ -102,6 +106,9 @@ make test RELEASE_TESTING=0%{!?perl_bootstrap:1}
 %{_mandir}/man3/YAML::Types.3pm*
 
 %changelog
+* Thu Jul 03 2014 Petr Pisar <ppisar at redhat.com> - 0.95-2
+- Inject VERSION into each module (bug #1115971)
+
 * Mon Jun 23 2014 Paul Howarth <paul at city-fan.org> - 0.95-1
 - Update to 0.95
   - Fix dumping blessed globs


More information about the scm-commits mailing list