aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--MANIFEST92
-rw-r--r--MANIFEST.SKIP2
-rw-r--r--Makefile.PL32
-rw-r--r--lib/MGA/Mirrors/DB.pm6
-rw-r--r--mga-mirrors.ini.in (renamed from mga-mirror.ini.in)0
-rw-r--r--mga-mirrors.spec.in79
6 files changed, 206 insertions, 5 deletions
diff --git a/MANIFEST b/MANIFEST
new file mode 100644
index 0000000..89514ef
--- /dev/null
+++ b/MANIFEST
@@ -0,0 +1,92 @@
+bin/check_mirror
+Changes
+dump.sql
+inc/Module/AutoInstall.pm
+inc/Module/Install.pm
+inc/Module/Install/AutoInstall.pm
+inc/Module/Install/Base.pm
+inc/Module/Install/Can.pm
+inc/Module/Install/Catalyst.pm
+inc/Module/Install/Fetch.pm
+inc/Module/Install/Include.pm
+inc/Module/Install/Makefile.pm
+inc/Module/Install/Metadata.pm
+inc/Module/Install/Scripts.pm
+inc/Module/Install/Win32.pm
+inc/Module/Install/WriteAll.pm
+lib/MGA/Mirrors.pm
+lib/MGA/Mirrors/Controller/Distrib.pm
+lib/MGA/Mirrors/Controller/Graph.pm
+lib/MGA/Mirrors/Controller/Mirrors.pm
+lib/MGA/Mirrors/Controller/New.pm
+lib/MGA/Mirrors/Controller/Report.pm
+lib/MGA/Mirrors/Controller/Root.pm
+lib/MGA/Mirrors/Controller/Validate.pm
+lib/MGA/Mirrors/DB.pm
+lib/MGA/Mirrors/Model/Mirrors.pm
+lib/MGA/Mirrors/View/GraphViz.pm
+lib/MGA/Mirrors/View/Mail.pm
+lib/MGA/Mirrors/View/TT.pm
+lib/MGA/Mirrors/View/TTBlock.pm
+Makefile.PL
+MANIFEST This list of files
+META.yml
+mga-mirrors-0.01.tar.gz
+mga-mirrors.ini.in
+mga-mirrors.spec
+mga-mirrors.spec.in
+mga_mirrors.conf.in
+README
+root/favicon.ico
+root/html/includes/distrib/distrib.tt
+root/html/includes/footer.tt
+root/html/includes/header.tt
+root/html/includes/host_information.tt
+root/html/includes/menu.tt
+root/html/includes/mirrorslist.tt
+root/html/includes/new/checkurl.tt
+root/html/includes/new/invalid_mirror.tt
+root/html/includes/new/invalid_uri.tt
+root/html/includes/new/mirror_exists.tt
+root/html/includes/new/overlap_hosts.tt
+root/html/includes/new/success.tt
+root/html/includes/new/unsupported_protocol.tt
+root/html/includes/new/url_form.tt
+root/html/pages/distrib/index.tt
+root/html/pages/index.tt
+root/html/pages/mirrors/mirror.tt
+root/html/pages/new/confirm.tt
+root/html/pages/new/index.tt
+root/html/pages/new/new_host.tt
+root/html/pages/report/index.tt
+root/html/pages/validate/error.tt
+root/html/pages/validate/validate.tt
+root/mail/host_up_request.tt
+root/static/images/btn_120x50_built.png
+root/static/images/btn_120x50_built_shadow.png
+root/static/images/btn_120x50_powered.png
+root/static/images/btn_120x50_powered_shadow.png
+root/static/images/btn_88x31_built.png
+root/static/images/btn_88x31_built_shadow.png
+root/static/images/btn_88x31_powered.png
+root/static/images/btn_88x31_powered_shadow.png
+root/static/images/catalyst_logo.png
+root/static/images/page-zoom.png
+root/static/style.css
+script/mga_mirrors_cgi.pl
+script/mga_mirrors_create.pl
+script/mga_mirrors_fastcgi.pl
+script/mga_mirrors_server.pl
+script/mga_mirrors_test.pl
+t/01app.t
+t/02pod.t
+t/03podcoverage.t
+t/controller_Distrib.t
+t/controller_Graph.t
+t/controller_Mirrors.t
+t/controller_New.t
+t/controller_Report.t
+t/controller_Validate.t
+t/model_Mirrors.t
+t/view_GraphViz.t
+t/view_TT.t
diff --git a/MANIFEST.SKIP b/MANIFEST.SKIP
index ff3c78c..c3ff77f 100644
--- a/MANIFEST.SKIP
+++ b/MANIFEST.SKIP
@@ -16,4 +16,4 @@
^#.*#$
^\.#
-^mga-mirror.ini
+^mga-mirrors.ini$
diff --git a/Makefile.PL b/Makefile.PL
index 649120a..281736b 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -6,7 +6,7 @@ use Module::Install::Catalyst; # Complain loudly if you don't have
# Catalyst::Devel installed or haven't said
# 'make dist' to create a standalone tarball.
-name 'MGA-Mirrors';
+name 'mga-mirrors';
all_from 'lib/MGA/Mirrors.pm';
requires 'Catalyst::Runtime' => '5.80027';
@@ -26,3 +26,33 @@ catalyst;
install_script glob('script/*.pl');
auto_install;
WriteAll;
+
+package MY;
+
+sub postamble {
+
+"
+ChangeLog:
+\tsvn log > ChangeLog
+
+\$(DISTNAME).spec: \$(DISTNAME).spec.in Makefile
+\tsed -e 's/\@VERSION@/\$(VERSION)/' < \$< > \$@
+
+srpm: \$(DISTVNAME).tar.gz \$(DISTNAME).spec
+\trpmbuild -bs --clean\\
+\t --define \"_sourcedir `pwd`\" \\
+\t --define \"_specdir `pwd`\" \\
+\t --define \"_srcrpmdir `pwd`\" \\
+\t --define \"_rpmdir `pwd`\" \\
+\t \$(DISTNAME).spec
+
+rpm: \$(DISTVNAME).tar.gz \$(DISTNAME).spec
+\tmkdir ./noarch || :
+\trpmbuild -ba --clean\\
+\t --define \"_sourcedir `pwd`\" \\
+\t --define \"_specdir `pwd`\" \\
+\t --define \"_srcrpmdir `pwd`\" \\
+\t --define \"_rpmdir `pwd`\" \\
+\t \$(DISTNAME).spec
+"
+}
diff --git a/lib/MGA/Mirrors/DB.pm b/lib/MGA/Mirrors/DB.pm
index 80005a3..ac37783 100644
--- a/lib/MGA/Mirrors/DB.pm
+++ b/lib/MGA/Mirrors/DB.pm
@@ -10,13 +10,13 @@ use DBI;
use File::Temp qw(tempfile);
use Net::DNS;
-sub configfile { '/etc/mga-mirror.ini' }
+sub configfile { '/etc/mga-mirrors.ini' }
sub new {
my ($class) = @_;
- my $conf = (-f './mga-mirror.ini')
- ? Config::IniFiles->new(-file => './mga-mirror.ini')
+ my $conf = (-f './mga-mirrors.ini')
+ ? Config::IniFiles->new(-file => './mga-mirrors.ini')
: Config::IniFiles->new(-file => configfile())
or return;
diff --git a/mga-mirror.ini.in b/mga-mirrors.ini.in
index 9297339..9297339 100644
--- a/mga-mirror.ini.in
+++ b/mga-mirrors.ini.in
diff --git a/mga-mirrors.spec.in b/mga-mirrors.spec.in
new file mode 100644
index 0000000..7870e74
--- /dev/null
+++ b/mga-mirrors.spec.in
@@ -0,0 +1,79 @@
+# $Id$
+
+%define realname mga-mirrors
+%define version @VERSION@
+%define release %mkrel 1
+
+Name: %{realname}
+Version: %{version}
+Release: %{release}
+License: GPL or Artistic
+Group: Development/Perl
+Summary: Mageia Mirrors management
+Source: %{realname}-%{version}.tar.gz
+Url: http://forge.ipsl.jussieu.fr/epoll/
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
+BuildArch: noarch
+
+BuildRequires: perl(Catalyst::Plugin::Prototype)
+BuildRequires: perl(Module::Install)
+BuildRequires: perl(Catalyst)
+BuildRequires: perl(Catalyst::Devel)
+BuildRequires: perl(Catalyst::Plugin::Session::State::Cookie)
+BuildRequires: perl(Catalyst::Plugin::Session)
+BuildRequires: perl(Catalyst::Action::RenderView)
+BuildRequires: perl(Catalyst::View::TT)
+BuildRequires: perl(Catalyst::Plugin::ConfigLoader)
+BuildRequires: perl(Catalyst::Plugin::Static::Simple)
+BuildRequires: perl(Catalyst::Plugin::Prototype)
+BuildRequires: perl(DBD::Pg)
+BuildRequires: perl(Mail::Mailer)
+
+Requires: perl(Catalyst::Plugin::Session::State::Cookie)
+Requires: perl(Catalyst::Plugin::Session)
+Requires: perl(Catalyst::Plugin::Session::Store::DBI)
+Requires: perl(Catalyst::Action::RenderView)
+Requires: perl(Catalyst::View::TT)
+Requires: perl(Catalyst::Plugin::ConfigLoader)
+Requires: perl(Catalyst::Plugin::Static::Simple)
+Requires: perl(Catalyst::Plugin::Prototype)
+Requires: perl(DBD::Pg)
+
+%description
+Mageia Mirrors management
+
+%prep
+%setup -q -n %{realname}-%{version}
+
+%build
+%{__perl} Makefile.PL INSTALLDIRS=vendor
+%make
+
+%if 0
+%check
+make test
+%endif
+
+%install
+rm -rf %buildroot
+%makeinstall_std
+
+mkdir -p %{buildroot}%_sysconfdir
+install mga-mirrors.ini.in %{buildroot}%_sysconfdir/mga-mirrors.ini
+
+mkdir -p %{buildroot}%_var/www/cgi-bin
+install script/mga_mirrors_cgi.pl %{buildroot}%_var/www/cgi-bin/mga_mirrors_cgi.pl
+
+%clean
+rm -rf %buildroot
+
+%files
+%defattr(-,root,root)
+%doc Changes README
+%attr(0640,root,apache) %config(noreplace) %_sysconfdir/mga-mirrors.ini
+%_bindir/*
+%_var/www/cgi-bin/mga_mirrors_cgi.pl
+%{_mandir}/man3/*
+%{_mandir}/man1/*
+%perl_vendorlib/*
+