diff options
Diffstat (limited to 'usr/src/libpiny/Build.PL')
-rw-r--r-- | usr/src/libpiny/Build.PL | 32 |
1 files changed, 26 insertions, 6 deletions
diff --git a/usr/src/libpiny/Build.PL b/usr/src/libpiny/Build.PL index 09cf3fb..bfb5fd7 100644 --- a/usr/src/libpiny/Build.PL +++ b/usr/src/libpiny/Build.PL @@ -1,10 +1,30 @@ use Module::Build; -Module::Build->new - ( module_name => 'Piny' - , license => 'BSD-3' - , dist_version => '0.6' - , requires => + +open( DCH, "<", "debian/changelog" ) or die "changelog: $!"; + +my $version = "0"; +while ( defined ( my $line = <DCH> ) ) { + if ( $line =~ /\(([0-9.]+)\)/ ) { + $version = $1; + last; + }; +}; + +close( DCH ); + +my $build = Module::Build->new + ( 'module_name' => 'Piny' + , 'dist_version' => $version + , 'license' => 'BSD-3' + , 'setup_files' => { 'share/ikiwiki.setup' => 'share/ikiwiki.setup' } + , 'install_path' => + { 'share' => '/usr/share/libpiny' + } + , 'requires' => { 'Moose' => 0 , 'Email::Valid::Loose' => 0 } - )->create_build_script( ); + ); + +$build->add_build_element( "setup" ); +$build->create_build_script( ); |