1 # This file is part of GNU Stow.
3 # GNU Stow is free software: you can redistribute it and/or modify it
4 # under the terms of the GNU General Public License as published by
5 # the Free Software Foundation, either version 3 of the License, or
6 # (at your option) any later version.
8 # GNU Stow is distributed in the hope that it will be useful, but
9 # WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 # General Public License for more details.
13 # You should have received a copy of the GNU General Public License
14 # along with this program. If not, see https://www.gnu.org/licenses/.
21 # These are required by the test suite.
25 my $build = Module::Build->new(
26 module_name => 'Stow',
27 keywords => [ qw/stow symlink software package management install/ ],
30 # Module::Build forces us to use v1.4 of the CPAN Meta Spec:
31 # https://rt.cpan.org/Ticket/Display.html?id=71502
34 # url => 'http://search.cpan.org/perldoc?CPAN::Meta::Spec',
38 license => 'http://www.gnu.org/licenses/gpl-2.0.html' ,
39 homepage => 'https://savannah.gnu.org/projects/stow',
41 # Module::Build forces us to use v1.4 of the CPAN Meta Spec:
42 # https://rt.cpan.org/Ticket/Display.html?id=71502
44 # web => 'http://rt.cpan.org/Public/Dist/Display.html?Name=Stow',
45 # mailto => 'stow-devel@gnu.org',
47 #bugtracker => 'http://rt.cpan.org/Public/Dist/Display.html?Name=Stow',
49 # Module::Build forces us to use v1.4 of the CPAN Meta Spec:
50 # https://rt.cpan.org/Ticket/Display.html?id=71502
52 # url => 'git://git.savannah.gnu.org/stow.git',
53 # web => 'https://savannah.gnu.org/git/?group=stow',
56 repository => 'git://git.savannah.gnu.org/stow.git',
64 script_files => [ 'bin/stow', 'bin/chkstow' ],
65 all_from => 'lib/Stow.pm.in',
66 configure_requires => {
76 if (system('grep', '-q', '^use lib ', 'bin/stow') >> 8 == 0) {
79 ERROR: bin/stow contains 'use lib' line which could interfere
80 with CPAN-style installation via Module::Build. To avoid this,
81 you should run ./configure with parameters which result in
82 --with-pmdir's value being in Perl's built-in @INC, and then run
83 'make' (NOT 'make install') to regenerate bin/stow, e.g.
85 eval `perl -V:siteprefix`
86 ./configure --prefix=$siteprefix && make
90 ./configure --with-pmdir=`PERL5LIB= perl -le 'print $INC[0]'` && make
92 Then re-run this script.
94 Note that these parameters are chosen purely to regenerate
95 bin/stow without a 'use lib' line, so don't run 'make install'
96 while Stow is configured in this way unless you really want an
97 installation using these parameters.
102 $build->create_build_script();