Commit a263a69f authored by Thomas Sibley's avatar Thomas Sibley
Browse files

Packaging updates to match modern preferred practices

parent f968ce3a
MANIFEST
MANIFEST.bak
META.yml
MANIFEST.SKIP.bak
Makefile
Makefile.old
SIGNATURE
......
......@@ -16,4 +16,5 @@ inc/Module/Install/WriteAll.pm
lib/RT/Extension/FormTools.pm
Makefile.PL
MANIFEST This list of files
MANIFEST.SKIP
META.yml
#!start included /opt/perlbrew/perls/perl-5.16.2/lib/5.16.3/ExtUtils/MANIFEST.SKIP
# Avoid version control files.
\bRCS\b
\bCVS\b
\bSCCS\b
,v$
\B\.svn\b
\B\.git\b
\B\.gitignore\b
\b_darcs\b
\B\.cvsignore$
# Avoid VMS specific MakeMaker generated files
\bDescrip.MMS$
\bDESCRIP.MMS$
\bdescrip.mms$
# Avoid Makemaker generated and utility files.
\bMANIFEST\.bak
\bMakefile$
\bblib/
\bMakeMaker-\d
\bpm_to_blib\.ts$
\bpm_to_blib$
\bblibdirs\.ts$ # 6.18 through 6.25 generated this
# Avoid Module::Build generated and utility files.
\bBuild$
\b_build/
\bBuild.bat$
\bBuild.COM$
\bBUILD.COM$
\bbuild.com$
# Avoid temp and backup files.
~$
\.old$
\#$
\b\.#
\.bak$
\.tmp$
\.#
\.rej$
# Avoid OS-specific files/dirs
# Mac OSX metadata
\B\.DS_Store
# Mac OSX SMB mount metadata files
\B\._
# Avoid Devel::Cover and Devel::CoverX::Covered files.
\bcover_db\b
\bcovered\b
# Avoid MYMETA files
^MYMETA\.
#!end included /opt/perlbrew/perls/perl-5.16.2/lib/5.16.3/ExtUtils/MANIFEST.SKIP
^\.tags
\.tar\.gz$
---
abstract: 'RT Extension-FormTools Extension'
build_requires:
ExtUtils::MakeMaker: 6.36
configure_requires:
ExtUtils::MakeMaker: 6.36
distribution_type: module
dynamic_config: 1
generated_by: 'Module::Install version 1.06'
license: unknown
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
version: 1.4
name: RT-Extension-FormTools
no_index:
directory:
- html
- inc
version: 0.14
......@@ -8,13 +8,13 @@ no warnings 'once';
use Module::Install::Base;
use base 'Module::Install::Base';
our $VERSION = '0.29';
our $VERSION = '0.31';
use FindBin;
use File::Glob ();
use File::Basename ();
my @DIRS = qw(etc lib html bin sbin po var);
my @DIRS = qw(etc lib html static bin sbin po var);
my @INDEX_DIRS = qw(lib bin sbin);
sub RTx {
......@@ -62,10 +62,11 @@ sub RTx {
unshift @INC, "$RT::LocalPath/lib" if $RT::LocalPath;
unshift @INC, $lib_path;
$RT::LocalVarPath ||= $RT::VarPath;
$RT::LocalPoPath ||= $RT::LocalLexiconPath;
$RT::LocalHtmlPath ||= $RT::MasonComponentRoot;
$RT::LocalLibPath ||= "$RT::LocalPath/lib";
$RT::LocalVarPath ||= $RT::VarPath;
$RT::LocalPoPath ||= $RT::LocalLexiconPath;
$RT::LocalHtmlPath ||= $RT::MasonComponentRoot;
$RT::LocalStaticPath ||= $RT::StaticPath;
$RT::LocalLibPath ||= "$RT::LocalPath/lib";
my $with_subdirs = $ENV{WITH_SUBDIRS};
@ARGV = grep { /WITH_SUBDIRS=(.*)/ ? ( ( $with_subdirs = $1 ), 0 ) : 1 }
......@@ -129,18 +130,7 @@ install ::
my %has_etc;
if ( File::Glob::bsd_glob("$FindBin::Bin/etc/schema.*") ) {
# got schema, load factory module
$has_etc{schema}++;
$self->load('RTxFactory');
$self->postamble(<< ".");
factory ::
\t\$(NOECHO) \$(PERL) -Ilib -I"$local_lib_path" -I"$lib_path" -Minc::Module::Install -e"RTxFactory(qw($RTx $name))"
dropdb ::
\t\$(NOECHO) \$(PERL) -Ilib -I"$local_lib_path" -I"$lib_path" -Minc::Module::Install -e"RTxFactory(qw($RTx $name drop))"
.
}
if ( File::Glob::bsd_glob("$FindBin::Bin/etc/acl.*") ) {
$has_etc{acl}++;
......@@ -164,28 +154,19 @@ dropdb ::
print "For first-time installation, type 'make initdb'.\n";
my $initdb = '';
$initdb .= <<"." if $has_etc{schema};
\t\$(NOECHO) \$(PERL) -Ilib -I"$local_lib_path" -I"$lib_path" -Minc::Module::Install -e"RTxInitDB(qw(schema))"
\t\$(NOECHO) \$(PERL) -Ilib -I"$local_lib_path" -I"$lib_path" -Minc::Module::Install -e"RTxInitDB(qw(schema \$(NAME) \$(VERSION)))"
.
$initdb .= <<"." if $has_etc{acl};
\t\$(NOECHO) \$(PERL) -Ilib -I"$local_lib_path" -I"$lib_path" -Minc::Module::Install -e"RTxInitDB(qw(acl))"
\t\$(NOECHO) \$(PERL) -Ilib -I"$local_lib_path" -I"$lib_path" -Minc::Module::Install -e"RTxInitDB(qw(acl \$(NAME) \$(VERSION)))"
.
$initdb .= <<"." if $has_etc{initialdata};
\t\$(NOECHO) \$(PERL) -Ilib -I"$local_lib_path" -I"$lib_path" -Minc::Module::Install -e"RTxInitDB(qw(insert))"
\t\$(NOECHO) \$(PERL) -Ilib -I"$local_lib_path" -I"$lib_path" -Minc::Module::Install -e"RTxInitDB(qw(insert \$(NAME) \$(VERSION)))"
.
$self->postamble("initdb ::\n$initdb\n");
$self->postamble("initialize-database ::\n$initdb\n");
}
}
sub RTxInit {
unshift @INC, substr( delete( $INC{'RT.pm'} ), 0, -5 ) if $INC{'RT.pm'};
require RT;
RT::LoadConfig();
RT::ConnectToDatabase();
die "Cannot load RT" unless $RT::Handle and $RT::DatabaseType;
}
# stolen from RT::Handle so we work on 3.6 (cmp_versions came in with 3.8)
{ my %word = (
a => -4,
......@@ -228,4 +209,4 @@ sub requires_rt {
__END__
#line 348
#line 329
......@@ -3,7 +3,7 @@ use strict;
package RT::Extension::FormTools;
our $VERSION = '0.13';
our $VERSION = '0.14';
=head2 is_core_field
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment