3 # This file is part of App::CPAN2Pkg.
4 # Copyright (c) 2009 Jerome Quelin, all rights reserved.
6 # This program is free software; you can redistribute it and/or modify
7 # it under the same terms as Perl itself.
14 # for testing purposes
15 use FindBin
qw{ $Bin };
16 use lib
"$Bin/../lib";
19 use App
::CPAN2Pkg
::Curses
;
20 use Hook
::Output
::File
;
23 my $dir = _get_development_root
();
25 $hook = Hook
::Output
::File
->redirect(
26 stdout
=> "$dir/cpan2pkg.stdout",
27 stderr
=> "$dir/cpan2pkg.stderr",
32 my $modules = $ARGV{'<module>'};
33 my $ui = App
::CPAN2Pkg
::Curses
->spawn({modules
=>$modules});
38 sub _get_development_root
{
40 return $dir if -d
"$dir/.git";
48 cpan2pkg - generating native packages from cpan
53 =head2 Purpose of the program
55 This script is a glue application around cpan2dist, interacting with
56 your upstream distribution. When calling this script, it will:
62 check whether it's alrady packaged by your vendor, and install from it
67 otherwise, build a native package with cpan2dist - this implies that
68 there is a working C<CPANPLUS::Dist> backend for your OS.
72 once built, import the module in upstream repository.
76 then submit module to upstream buildsystem.
80 And this, while dealing with dependencies, all the way long, repeating
81 steps over and over as needed.
83 Read L<this blog entry|http://jquelin.blogspot.com/2009/01/cpan-modules-native-linux-
84 packages.html> for this module rationale.
91 See the options below (or C<cpan2pkg --help>) for more information on
92 how to launch the script. Once launched, you will get a curses
93 application, with a list on the left and some text on the right.
95 The left list contains all the modules currently being built / installed
96 / worked upon. You can get back to this list at any time by hitting the
97 F2 key. A plus (+) prefix means that module is available locally. A
98 minus (-) means that module is not yet available locally. A question
99 mark (?) prefix means that module needs help and that user should do
100 something before continuing.
102 The right list contains details on a given module: name, missing
103 prereqs, and everything being done for this module. One can change the
104 module shown by hitting the Enter key in the left list.
106 You can hit C<Ctrl+Q> at any time to quit the application. This will
107 also terminate all operations currently running.
111 =head1 REQUIRED ARGUMENTS
117 Module to install / build / package.
134 Print the usual program information
142 Jerome Quelin C<< <jquelin@cpan.org> >>
148 Copyright (c) 2009 Jerome Quelin, all rights reserved.
150 This program is free software; you can redistribute it and/or modify it
151 under the same terms as Perl itself.