App-Phoebe

 view release on metacpan or  search on metacpan

Makefile.PL  view on Meta::CPAN

use 5.008004;
use ExtUtils::MakeMaker;

os_unsupported if $^O eq 'MSWin32';

WriteMakefile(
  NAME             => 'App::Phoebe',
  VERSION_FROM     => 'lib/App/Phoebe.pm',
  ABSTRACT         => 'a Gemini-based wiki',
  AUTHOR           => 'Alex Schroeder',
  LICENSE          => 'agpl_3',
  MIN_PERL_VERSION => '5.26.0', # Modern::Perl '2018'
  EXE_FILES        => [
    'script/phoebe',
    'script/phoebe-ctl',
    'script/gemini',
    'script/gemini-chat',
    'script/titan',
    'script/ijirait',
    'script/spartan',
  ],
  PREREQ_PM => {
    # t/prerequisites.t is serious about all these!
    'Modern::Perl' => 1.20180701, # for '2018'
    'URI::Escape' => 0,
    'Encode::Locale' => 0,
    'Algorithm::Diff' => 0,
    'File::ReadBackwards' => 0,
    'File::Slurper' => 0,
    'Mojolicious' => 9.00,        # removed tls_verify from Mojo::IOLoop::TLS 9.0
    'IO::Socket::SSL' => 2.069,   # optional for Mojo::IOLoop
    'Net::SSLeay' => 1.90,
    'Net::IDN::Encode' => 0,
    'IRI' => 0,                   # for script/gemini
    'Text::Wrapper' => 0,         # Gopher.pm
    'File::MimeInfo' => 0,        # Iapetus.pm, Capsules.pm
    'File::MimeInfo::Magic' => 0, # WebDAV.pm
    'IO::Scalar' => 0,            # WebDAV.pm
    'HTTP::Date' => 0,            # WebDAV.pm
    'XML::LibXML' => 0,           # WebDAV.pm
  },
  META_MERGE => {
    'meta-spec' => { version => 2 },
    resources => {
      repository => {
	type => 'git',
	url  => 'https://alexschroeder.ch/cgit/phoebe',
	web  => 'https://alexschroeder.ch/cgit/phoebe/about/',
      },
    },
  },
  clean => {
    FILES => "test-[0-9][0-9][0-9][0-9] t/*.pem",
  },
);

sub MY::postamble {
  return <<'PHOEBE_TARGETS';

# Check for syntax and documentation formatting errors
check:
	find lib -name '*.pm' -exec perl -Ilib -c '{}' ';' -exec podchecker '{}' ';'

# Start the wiki with the default options (using 'wiki' in the current
# directory as the data directory). This also uses unsafe certificates
# from the test directory. Don't use them in production. See the cert
# target to make your own. :)
start:
	./t/cert.pl
	./script/phoebe \
	  --cert_file=./t/cert.pem \
	  --key_file=./t/key.pem

# Start the wiki as a daemon with the default options, but also server
# port 443 (HTTPS). As this is a port below 1024 it is priviledged and
# requires the use of 'sudo'; the --user and --group options make sure
# that it drops priviledges to the current user as soon as it started.
web:
	./t/cert.pl
	sudo ./script/phoebe \
	  --cert_file=./t/cert.pem \
	  --key_file=./t/key.pem \
          --user=$(shell id -un) --group=$(shell id -gn) \
          --port=443 --port=1965

# Start the wiki on port 2020, with debug log level, two example
# spaces, allowing the upload of JPEG files, and use 'morbo' (which is
# part of the Mojolicious Perl package) to watch for changes of the
# code: when it detects a change, the server is restarted
# automatically.



( run in 0.764 second using v1.01-cache-2.11-cpan-99c4e6809bf )