diff options
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | Build.PL | 22 | ||||
-rw-r--r-- | Makefile | 35 | ||||
-rw-r--r-- | README | 25 | ||||
-rwxr-xr-x | bin/comirror | 2 | ||||
-rwxr-xr-x | t/00-compile.t (renamed from test/00-compile.t) | 0 | ||||
-rwxr-xr-x | t/10-pod-coverage.t (renamed from test/10-pod-coverage.t) | 0 | ||||
-rwxr-xr-x | t/50-comirror.t (renamed from test/50-comirror.t) | 2 | ||||
-rwxr-xr-x | t/60-comirror-setup.t (renamed from test/60-comirror-setup.t) | 2 | ||||
-rw-r--r-- | t/next-loop/1.jpg (renamed from test/next-loop/1.jpg) | 0 | ||||
-rw-r--r-- | t/next-loop/1.xhtml (renamed from test/next-loop/1.xhtml) | 0 | ||||
-rw-r--r-- | t/next-loop/2.jpg (renamed from test/next-loop/2.jpg) | 0 | ||||
-rw-r--r-- | t/next-loop/2.xhtml (renamed from test/next-loop/2.xhtml) | 0 | ||||
-rw-r--r-- | t/next-loop/3.jpg (renamed from test/next-loop/3.jpg) | 0 | ||||
-rw-r--r-- | t/next-loop/3.xhtml (renamed from test/next-loop/3.xhtml) | 0 | ||||
-rw-r--r-- | t/next-loop/4.jpg (renamed from test/next-loop/4.jpg) | 0 | ||||
-rw-r--r-- | t/next-loop/4.xhtml (renamed from test/next-loop/4.xhtml) | 0 | ||||
-rw-r--r-- | t/next-loop/5.jpg (renamed from test/next-loop/5.jpg) | 0 | ||||
-rw-r--r-- | t/next-loop/5.xhtml (renamed from test/next-loop/5.xhtml) | 0 | ||||
-rw-r--r-- | t/next-none/1.jpg (renamed from test/next-none/1.jpg) | 0 | ||||
-rw-r--r-- | t/next-none/1.xhtml (renamed from test/next-none/1.xhtml) | 0 | ||||
-rw-r--r-- | t/next-none/2.jpg (renamed from test/next-none/2.jpg) | 0 | ||||
-rw-r--r-- | t/next-none/2.xhtml (renamed from test/next-none/2.xhtml) | 0 | ||||
-rw-r--r-- | t/next-none/3.jpg (renamed from test/next-none/3.jpg) | 0 | ||||
-rw-r--r-- | t/next-none/3.xhtml (renamed from test/next-none/3.xhtml) | 0 | ||||
-rw-r--r-- | t/next-none/4.jpg (renamed from test/next-none/4.jpg) | 0 | ||||
-rw-r--r-- | t/next-none/4.xhtml (renamed from test/next-none/4.xhtml) | 0 | ||||
-rw-r--r-- | t/next-none/5.jpg (renamed from test/next-none/5.jpg) | 0 | ||||
-rw-r--r-- | t/next-none/5.xhtml (renamed from test/next-none/5.xhtml) | 0 | ||||
-rw-r--r-- | t/next-unicroak/1.jpg (renamed from test/next-unicroak/1.jpg) | 0 | ||||
-rw-r--r-- | t/next-unicroak/1.xhtml (renamed from test/next-unicroak/1.xhtml) | 0 | ||||
-rw-r--r-- | t/next-unicroak/2.jpg (renamed from test/next-unicroak/2.jpg) | 0 | ||||
-rw-r--r-- | t/next-unicroak/2.xhtml (renamed from test/next-unicroak/2.xhtml) | 0 | ||||
-rw-r--r-- | t/next-unicroak/3.jpg (renamed from test/next-unicroak/3.jpg) | 0 | ||||
-rw-r--r-- | t/next-unicroak/3.xhtml (renamed from test/next-unicroak/3.xhtml) | 0 | ||||
-rw-r--r-- | t/next-unicroak/4.jpg (renamed from test/next-unicroak/4.jpg) | 0 | ||||
-rw-r--r-- | t/next-unicroak/4.xhtml (renamed from test/next-unicroak/4.xhtml) | 0 | ||||
-rw-r--r-- | t/next-unicroak/5.jpg (renamed from test/next-unicroak/5.jpg) | 0 | ||||
-rw-r--r-- | t/next-unicroak/5.xhtml (renamed from test/next-unicroak/5.xhtml) | 0 |
39 files changed, 47 insertions, 45 deletions
@@ -1 +1,3 @@ -/build/ +/blib/ +/_build/ +/Build diff --git a/Build.PL b/Build.PL new file mode 100644 index 0000000..4d7399f --- /dev/null +++ b/Build.PL @@ -0,0 +1,22 @@ +#!/usr/bin/env perl + +use strict; +use warnings; +use Module::Build; + +my $build = Module::Build->new( + build_requires => { + 'Test::Cmd' => 0, + 'Test::Compile' => 0, + 'Test::More' => 0, + 'Test::Pod' => 0, + }, + dist_name => 'comirror', + dist_version_from => 'bin/comirror', + license => 'unrestricted', + requires => { + 'perl' => '5.10.0', + 'WWW::Mechanize' => 0, + }, +); +$build->create_build_script(); diff --git a/Makefile b/Makefile deleted file mode 100644 index 1879fd1..0000000 --- a/Makefile +++ /dev/null @@ -1,35 +0,0 @@ -PREFIX ?= /usr/local - -main_dir = ${DESTDIR}${PREFIX} -bin_dir = ${main_dir}/bin -man_dir = ${main_dir}/share/man - -all: build/comirror.1 build/comirror-setup.1 - -build/%.1: bin/% - @echo POD $< - @mkdir -p build - @pod2man $< > $@ - -install: all - @echo Installing executables to ${bin_dir} - @echo Installing manuals to ${man_dir} - @mkdir -p ${bin_dir} ${man_dir}/man1 - @cp bin/comirror ${bin_dir}/comirror - @cp bin/comirror-setup ${bin_dir}/comirror-setup - @cp build/comirror.1 ${man_dir}/man1/comirror.1 - @cp build/comirror-setup.1 ${man_dir}/man1/comirror-setup.1 - @chmod 755 ${bin_dir}/comirror ${bin_dir}/comirror-setup - @chmod 644 ${man_dir}/man1/comirror.1 ${man_dir}/man1/comirror-setup.1 - -test: - @prove test - -uninstall: - rm -f ${bin_dir}/comirror ${bin_dir}/comirror-setup - rm -f ${man_dir}/man1/comirror.1 ${man_dir}/man1/comirror-setup.1 - -clean: - rm -rf build - -.PHONY: all clean install test uninstall @@ -1,16 +1,27 @@ -comirror is an automated mirrorer for webcomics and image gallerys. +comirror - automated mirrorer for webcomics and image gallerys +-------------------------------------------------------------- + +Dependencies +------------ -Requires: * perl >= 5.10 * WWW::Mechanize -For testing: +Installation +------------ + +$ perl Build.PL +$ perl Build +$ sudo perl Build install + +Testing +------- + +Requires: * Test::Cmd * Test::Compile * Test::More * Test::Pod -Installation: -> make -> make test # optional -> sudo make install +Run: +$ perl Build test diff --git a/bin/comirror b/bin/comirror index 726e169..453a46b 100755 --- a/bin/comirror +++ b/bin/comirror @@ -9,6 +9,8 @@ my $mech = WWW::Mechanize->new( stack_depth => 2, ); +our $VERSION = '0.1'; + my %conf = file_to_hash('comirror.conf'); my %state = file_to_hash('comirror.state'); my $uri = shift || $state{'uri'}; diff --git a/test/00-compile.t b/t/00-compile.t index d7b89cb..d7b89cb 100755 --- a/test/00-compile.t +++ b/t/00-compile.t diff --git a/test/10-pod-coverage.t b/t/10-pod-coverage.t index df81177..df81177 100755 --- a/test/10-pod-coverage.t +++ b/t/10-pod-coverage.t diff --git a/test/50-comirror.t b/t/50-comirror.t index 8ccb334..6adc23c 100755 --- a/test/50-comirror.t +++ b/t/50-comirror.t @@ -24,7 +24,7 @@ for my $next_type (qw/ loop none /) { my $test = Test::Cmd->new( prog => 'bin/comirror', workdir => q{} ); my $cwd = $test->workdir(); - my $next_base = 'file://' . getcwd() . "/test/next-${next_type}"; + my $next_base = 'file://' . getcwd() . "/t/next-${next_type}"; my ($str, $exit); ok($test, "Create Test::Cmd object ($next_type)"); diff --git a/test/60-comirror-setup.t b/t/60-comirror-setup.t index a3ac27c..a487185 100755 --- a/test/60-comirror-setup.t +++ b/t/60-comirror-setup.t @@ -26,7 +26,7 @@ for my $test_type (qw/loop unicroak/) { $test = Test::Cmd->new( prog => 'bin/comirror-setup', workdir => q{} ); my $cwd = $test->workdir(); - my $next_base = 'file://' . getcwd() . "/test/next-${test_type}"; + my $next_base = 'file://' . getcwd() . "/t/next-${test_type}"; my ($str, $exit); my @links; diff --git a/test/next-loop/1.jpg b/t/next-loop/1.jpg index e69de29..e69de29 100644 --- a/test/next-loop/1.jpg +++ b/t/next-loop/1.jpg diff --git a/test/next-loop/1.xhtml b/t/next-loop/1.xhtml index c0efc65..c0efc65 100644 --- a/test/next-loop/1.xhtml +++ b/t/next-loop/1.xhtml diff --git a/test/next-loop/2.jpg b/t/next-loop/2.jpg index e69de29..e69de29 100644 --- a/test/next-loop/2.jpg +++ b/t/next-loop/2.jpg diff --git a/test/next-loop/2.xhtml b/t/next-loop/2.xhtml index 60e57e1..60e57e1 100644 --- a/test/next-loop/2.xhtml +++ b/t/next-loop/2.xhtml diff --git a/test/next-loop/3.jpg b/t/next-loop/3.jpg index e69de29..e69de29 100644 --- a/test/next-loop/3.jpg +++ b/t/next-loop/3.jpg diff --git a/test/next-loop/3.xhtml b/t/next-loop/3.xhtml index 97eadf4..97eadf4 100644 --- a/test/next-loop/3.xhtml +++ b/t/next-loop/3.xhtml diff --git a/test/next-loop/4.jpg b/t/next-loop/4.jpg index e69de29..e69de29 100644 --- a/test/next-loop/4.jpg +++ b/t/next-loop/4.jpg diff --git a/test/next-loop/4.xhtml b/t/next-loop/4.xhtml index b0cf520..b0cf520 100644 --- a/test/next-loop/4.xhtml +++ b/t/next-loop/4.xhtml diff --git a/test/next-loop/5.jpg b/t/next-loop/5.jpg index e69de29..e69de29 100644 --- a/test/next-loop/5.jpg +++ b/t/next-loop/5.jpg diff --git a/test/next-loop/5.xhtml b/t/next-loop/5.xhtml index 86ff9e8..86ff9e8 100644 --- a/test/next-loop/5.xhtml +++ b/t/next-loop/5.xhtml diff --git a/test/next-none/1.jpg b/t/next-none/1.jpg index e69de29..e69de29 100644 --- a/test/next-none/1.jpg +++ b/t/next-none/1.jpg diff --git a/test/next-none/1.xhtml b/t/next-none/1.xhtml index c0efc65..c0efc65 100644 --- a/test/next-none/1.xhtml +++ b/t/next-none/1.xhtml diff --git a/test/next-none/2.jpg b/t/next-none/2.jpg index e69de29..e69de29 100644 --- a/test/next-none/2.jpg +++ b/t/next-none/2.jpg diff --git a/test/next-none/2.xhtml b/t/next-none/2.xhtml index 60e57e1..60e57e1 100644 --- a/test/next-none/2.xhtml +++ b/t/next-none/2.xhtml diff --git a/test/next-none/3.jpg b/t/next-none/3.jpg index e69de29..e69de29 100644 --- a/test/next-none/3.jpg +++ b/t/next-none/3.jpg diff --git a/test/next-none/3.xhtml b/t/next-none/3.xhtml index 97eadf4..97eadf4 100644 --- a/test/next-none/3.xhtml +++ b/t/next-none/3.xhtml diff --git a/test/next-none/4.jpg b/t/next-none/4.jpg index e69de29..e69de29 100644 --- a/test/next-none/4.jpg +++ b/t/next-none/4.jpg diff --git a/test/next-none/4.xhtml b/t/next-none/4.xhtml index b0cf520..b0cf520 100644 --- a/test/next-none/4.xhtml +++ b/t/next-none/4.xhtml diff --git a/test/next-none/5.jpg b/t/next-none/5.jpg index e69de29..e69de29 100644 --- a/test/next-none/5.jpg +++ b/t/next-none/5.jpg diff --git a/test/next-none/5.xhtml b/t/next-none/5.xhtml index 41012d9..41012d9 100644 --- a/test/next-none/5.xhtml +++ b/t/next-none/5.xhtml diff --git a/test/next-unicroak/1.jpg b/t/next-unicroak/1.jpg index e69de29..e69de29 100644 --- a/test/next-unicroak/1.jpg +++ b/t/next-unicroak/1.jpg diff --git a/test/next-unicroak/1.xhtml b/t/next-unicroak/1.xhtml index 9753197..9753197 100644 --- a/test/next-unicroak/1.xhtml +++ b/t/next-unicroak/1.xhtml diff --git a/test/next-unicroak/2.jpg b/t/next-unicroak/2.jpg index e69de29..e69de29 100644 --- a/test/next-unicroak/2.jpg +++ b/t/next-unicroak/2.jpg diff --git a/test/next-unicroak/2.xhtml b/t/next-unicroak/2.xhtml index b3c3969..b3c3969 100644 --- a/test/next-unicroak/2.xhtml +++ b/t/next-unicroak/2.xhtml diff --git a/test/next-unicroak/3.jpg b/t/next-unicroak/3.jpg index e69de29..e69de29 100644 --- a/test/next-unicroak/3.jpg +++ b/t/next-unicroak/3.jpg diff --git a/test/next-unicroak/3.xhtml b/t/next-unicroak/3.xhtml index b0488cf..b0488cf 100644 --- a/test/next-unicroak/3.xhtml +++ b/t/next-unicroak/3.xhtml diff --git a/test/next-unicroak/4.jpg b/t/next-unicroak/4.jpg index e69de29..e69de29 100644 --- a/test/next-unicroak/4.jpg +++ b/t/next-unicroak/4.jpg diff --git a/test/next-unicroak/4.xhtml b/t/next-unicroak/4.xhtml index 844854e..844854e 100644 --- a/test/next-unicroak/4.xhtml +++ b/t/next-unicroak/4.xhtml diff --git a/test/next-unicroak/5.jpg b/t/next-unicroak/5.jpg index e69de29..e69de29 100644 --- a/test/next-unicroak/5.jpg +++ b/t/next-unicroak/5.jpg diff --git a/test/next-unicroak/5.xhtml b/t/next-unicroak/5.xhtml index 41012d9..41012d9 100644 --- a/test/next-unicroak/5.xhtml +++ b/t/next-unicroak/5.xhtml |