Make script installable

Change-Id: I88ccc2f661eb6758a91ed6cf9c325083fd708325
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..93f7bef
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,16 @@
+blib
+MYMETA*
+Makefile
+pm_to_blib
+sandbox
+\#*
+*.tar.gz
+*~
+*.sqlite
+*.log
+*.db
+*.old
+.*
+!.gitignore
+!.gitlab-ci.yml
+
diff --git a/Makefile.PL b/Makefile.PL
new file mode 100644
index 0000000..8fa8fe0
--- /dev/null
+++ b/Makefile.PL
@@ -0,0 +1,30 @@
+#!/usr/bin/env perl
+use v5.16;
+use strict;
+use warnings;
+use ExtUtils::MakeMaker;
+
+WriteMakefile(
+  NAME         => 'cosmasvc2koralquery',
+  AUTHOR       => 'Nils DIewald',
+  ABSTRACT     => 'Conversion of Cosmas 2 VC files to KoralQuery',
+  VERSION_FROM => 'script/cosmasvc2koralquery',
+  LICENSE      => 'freebsd',
+  BUILD_REQUIRES => {
+    'Test::More' => 0,
+    'Test::Output' => 0,
+    'File::Basename' => 0,
+    'Data::Dumper' => 0,
+    'File::Spec::Functions' => 0,
+    'Mojolicious' => 0,
+  },
+  MIN_PERL_VERSION => '5.016',
+  EXE_FILES => ['script/cosmasvc2koralquery'],
+  META_MERGE   => {
+    'meta-spec' => { version => 2 },
+    requires  => { perl => '5.010001' },
+    resources => {
+      license     => 'https://opensource.org/licenses/BSD-2-Clause',
+    }
+  }
+);
diff --git a/list2vc.pl b/script/cosmasvc2koralquery
similarity index 98%
rename from list2vc.pl
rename to script/cosmasvc2koralquery
index 3e31e50..85986a9 100755
--- a/list2vc.pl
+++ b/script/cosmasvc2koralquery
@@ -9,6 +9,8 @@
 # 2020-05-29
 #   Introduce optimizable object system.
 
+our $VERSION = 0.1;
+
 our @ARGV;
 
 unless (@ARGV) {
diff --git a/t/list2vc-def.t b/t/list2vc-def.t
index a3b60e7..6a5fcec 100644
--- a/t/list2vc-def.t
+++ b/t/list2vc-def.t
@@ -9,7 +9,7 @@
 use Test::Output;
 use Mojo::JSON 'decode_json';
 
-my $script = catfile(dirname(__FILE__), '..', 'list2vc.pl');
+my $script = catfile(dirname(__FILE__), '..', 'script', 'cosmasvc2koralquery');
 my $list1 = catfile(dirname(__FILE__), 'data', 'list2.def');
 
 # Check STDOUT
diff --git a/t/list2vc.t b/t/list2vc.t
index 93b5226..fd7ea52 100644
--- a/t/list2vc.t
+++ b/t/list2vc.t
@@ -8,7 +8,7 @@
 use Test::Output;
 use Mojo::JSON 'decode_json';
 
-my $script = catfile(dirname(__FILE__), '..', 'list2vc.pl');
+my $script = catfile(dirname(__FILE__), '..', 'script', 'cosmasvc2koralquery');
 my $list1 = catfile(dirname(__FILE__), 'data', 'list1.txt');
 
 # Check STDOUT