Переглянути джерело

better dep management here

George Baugh 1 рік тому
батько
коміт
31396f997c
4 змінених файлів з 49 додано та 15 видалено
  1. 2 0
      .gitignore
  2. 42 0
      Makefile.PL
  3. 5 0
      bin/deps2hash.sh
  4. 0 15
      download_deps_and_run.sh

+ 2 - 0
.gitignore

@@ -5,3 +5,5 @@ perl5/
 .bashrc
 .bash_profile
 service/tpsgi.service*
+Makefile
+MYMETA*

+ 42 - 0
Makefile.PL

@@ -0,0 +1,42 @@
+use strict;
+use warnings;
+
+use ExtUtils::MakeMaker;
+
+WriteMakefile(
+	VERSION   => '0.01',
+	META_MERGE        => {
+	"meta-spec" => { version => 2 },
+		resources => {
+			repository => {
+				type => 'git',
+				url  => 'git@github.com:Troglodyne-Internet-Widgets/tpsgi.git',
+				web  => 'https://github.com/Troglodyne-Internet-Widgets/tpsgi',
+			},
+		},
+	},
+	PREREQ_PM => {
+		"Carp::Always" => "0",
+		"CGI::Emulate::PSGI" => "0",
+		"Config::Simple" => "0",
+		"Cwd" => "0",
+		"Data::Dumper" => "0",
+		"DateTime::Format::HTTP" => "0",
+		"File::Find" => "0",
+		"File::Path" => "0",
+		"File::Touch" => "0",
+		"FindBin::libs" => "0",
+		"IO::Compress::Gzip" => "0",
+		"List::Util" => "0",
+		"Log::Dispatch" => "0",
+		"Log::Dispatch::FileRotate" => "0",
+		"Log::Dispatch::Screen" => "0",
+		"Mojo::File" => "0",
+		"Plack::MIME" => "0",
+		"POSIX" => "0",
+		"Sys::Hostname" => "0",
+		"TPSGI" => "0",
+		"UUID" => "0",
+	},
+    test => {TESTS => 't/*.t'}
+);

+ 5 - 0
bin/deps2hash.sh

@@ -0,0 +1,5 @@
+#!/bin/sh
+# Because I am LAZY
+echo "PREREQ_PM => {"
+git grep -P 'use \S+;' | sed -e 's/^.*:use //g;s/[(|)|;]//g' | grep -vP 'strict|warnings' | sort | uniq | sed -e 's/\(.*\)/"\1"/;s/$/ => "0",/'
+echo "}"

+ 0 - 15
download_deps_and_run.sh

@@ -1,15 +0,0 @@
-#!/bin/sh
-CURDIR=$(pwd)
-cd $HOME
-mkdir local-lib; /bin/true
-mkdir perl5; /bin/true
-cd local-lib
-curl https://cpan.metacpan.org/authors/id/H/HA/HAARG/local-lib-2.000029.tar.gz > locallib.tar.gz
-tar --one-top-level=src --strip-components=1 -zxf locallib.tar.gz
-cd src
-perl Makefile.PL --bootstrap
-cd ../..
-eval "$(perl -I$HOME/perl5/lib/perl5 -Mlocal::lib)"
-perl -Ilocal-lib/src/lib -MCPAN -Mlocal::lib -e 'CPAN::install(qw{Starman Plack::MIME IO::Compress::Gzip Time::HiRes Date::Format Sys::Hostname Plack::MIME Mojo::File DateTime::Format::HTTP Time::HiRes Log::Dispatch Log::Dispatch::Screen Log::Dispatch::FileRotate HTTP::Parser::XS})';
-cd $CURDIR
-perl -I~/perl5/lib/perl5 ~/perl5/bin/starman –port 7575 perl-static-file-server.pl