diff options
author | Daniel Friesel <derf@derf.homelinux.org> | 2010-08-05 20:48:14 +0200 |
---|---|---|
committer | Daniel Friesel <derf@derf.homelinux.org> | 2010-08-05 20:48:14 +0200 |
commit | a01588a03471a652043145eefeec5ef4bf77d05c (patch) | |
tree | c2989ee073c96d0cf8a805546f3f988ab474ef05 | |
parent | 5e4555011fd9e465be9efefc685f12f0dbf28902 (diff) |
Makefile -> Build.PL
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | Build.PL | 25 | ||||
-rw-r--r-- | Makefile | 27 | ||||
-rwxr-xr-x | bin/icli | 4 |
4 files changed, 30 insertions, 30 deletions
@@ -1 +1,3 @@ -/build/ +/_build +/Build +/blib diff --git a/Build.PL b/Build.PL new file mode 100644 index 0000000..0b2c587 --- /dev/null +++ b/Build.PL @@ -0,0 +1,25 @@ +#!/usr/bin/env perl + +use strict; +use warnings; +use Module::Build; + +my $build = Module::Build->new( + build_requires => { + 'Test::More' => 0, + 'Test::Compile' => 0, + 'Test::Pod' => 0, + 'Test::Command' => 0, + }, + dist_name => 'icli', + dist_version_from => 'bin/icli', + license => 'unrestricted', + requires => { + 'perl' => '5.10.0', + 'Date::Format' => 0, + 'Getopt::Long' => 0, + 'Term::ANSIColor' => 0, + }, + script_files => 'bin/', +); +$build->create_build_script(); diff --git a/Makefile b/Makefile deleted file mode 100644 index 550126d..0000000 --- a/Makefile +++ /dev/null @@ -1,27 +0,0 @@ -PREFIX ?= /usr/local - -main_dir = ${DESTDIR}${PREFIX} - -build/icli.1: bin/icli - mkdir -p build - pod2man $< > $@ - -install: build/icli.1 - mkdir -p ${main_dir}/bin ${main_dir}/share/man/man1 - cp bin/icli ${main_dir}/bin/icli - cp build/icli.1 ${main_dir}/share/man/man1/icli.1 - chmod 755 ${main_dir}/bin/icli - chmod 644 ${main_dir}/share/man/man1/icli.1 - - -test: - @prove - -uninstall: - rm -f ${main_dir}/bin/icli - rm -f ${main_dir}/share/man/man1/icli.1 - -clean: - rm -rf build - -.PHONY: clean install test uninstall @@ -8,7 +8,7 @@ use Date::Format; use Getopt::Long qw/:config bundling/; use Term::ANSIColor; -my $version = '0.1+git'; +my $VERSION = '0.1+git'; my ($cache, $config, $data, $extra); my $config_file = '/var/cache/icinga/objects.cache'; @@ -235,7 +235,7 @@ GetOptions( 'h|host=s' => sub { push(@for_hosts, split(/,/, $_[1])) }, 'l|list=s' => sub { $list_type = substr($_[1], 0, 1) }, 's|short' => \$short, - 'V|version' => sub { say "icli version $version"; exit 0 }, + 'V|version' => sub { say "icli version $VERSION"; exit 0 }, ); read_objects($status_file, \$data); |