diff options
author | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2005-10-03 11:25:55 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2005-10-03 11:25:55 +0000 |
commit | 377a9c91ef276d7ff34b32426d4ea17717a6f2f5 (patch) | |
tree | 5e36f103dc8121fc1ef428b7c268f87f356a20eb | |
parent | 805094ae296354d4077a72083785f5de51a294cb (diff) | |
download | rpmtools-377a9c91ef276d7ff34b32426d4ea17717a6f2f5.tar rpmtools-377a9c91ef276d7ff34b32426d4ea17717a6f2f5.tar.gz rpmtools-377a9c91ef276d7ff34b32426d4ea17717a6f2f5.tar.bz2 rpmtools-377a9c91ef276d7ff34b32426d4ea17717a6f2f5.tar.xz rpmtools-377a9c91ef276d7ff34b32426d4ea17717a6f2f5.zip |
Don't depend on MDK::Common
-rw-r--r-- | Makefile.PL | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/Makefile.PL b/Makefile.PL index e556c5a..d59a811 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -1,10 +1,19 @@ # $Id$ +use strict; use ExtUtils::MakeMaker; -use MDK::Common qw(cat_); -(my $rpmtools_version) = cat_('rpmtools.spec') =~ /define\s+version\s+(\d+\.\d+\.\d+)/ +my $spec; +{ + local $/ = undef; + open my $specfh, 'rpmtools.spec' or die "Can't open rpmtools.spec: $!\n"; + $spec = <$specfh>; + close $specfh; +} + +(my $rpmtools_version) = $spec =~ /define\s+version\s+(\d+\.\d+\.\d+)/ or die "no version found\n"; +warn "building rpmtools version v$rpmtools_version\n"; my $tag_version = "v$rpmtools_version"; $tag_version =~ s/\./_/g; |