]> Sergey Matveev's repositories - public-inbox.git/blobdiff - Makefile.PL
doc: lei blob: wording fixups, describe --remote
[public-inbox.git] / Makefile.PL
index b9e0a8cd291e5ba65c4ac812e2efc840f7bd0aca..b3ac59be32eed944cca46c0d9e6f40c5e17a2d2f 100644 (file)
@@ -5,6 +5,7 @@ use strict;
 use ExtUtils::MakeMaker;
 open my $m, '<', 'MANIFEST' or die "open(MANIFEST): $!\n";
 chomp(my @manifest = (<$m>));
+push @manifest, 'lib/PublicInbox.pm'; # generated
 my @EXE_FILES = grep(m!^script/!, @manifest);
 my $v = {};
 my $t = {};
@@ -44,12 +45,22 @@ $v->{-m1} = [ map {
                }
        } @EXE_FILES,
        qw(
-       lei-add-external lei-config lei-daemon-kill lei-daemon-pid
-       lei-forget-external lei-init lei-ls-external lei-q)];
+       lei-add-external lei-add-watch lei-blob lei-config lei-convert
+       lei-daemon-kill lei-daemon-pid lei-edit-search lei-export-kw
+       lei-forget-external lei-forget-mail-sync lei-forget-search
+       lei-import lei-index lei-init lei-inspect lei-lcat
+       lei-ls-external lei-ls-label lei-ls-mail-source lei-ls-mail-sync
+       lei-ls-search lei-ls-watch lei-mail-diff lei-p2q lei-q
+       lei-rediff lei-refresh-mail-sync lei-rm lei-rm-watch lei-tag
+       lei-up)];
 $v->{-m5} = [ qw(public-inbox-config public-inbox-v1-format
-               public-inbox-v2-format public-inbox-extindex-format) ];
-$v->{-m7} = [ qw(lei-overview public-inbox-overview public-inbox-tuning) ];
-$v->{-m8} = [ qw(public-inbox-daemon) ];
+               public-inbox-v2-format public-inbox-extindex-format
+               lei-mail-formats lei-store-format
+               ) ];
+$v->{-m7} = [ qw(lei-overview lei-security
+               public-inbox-overview public-inbox-tuning
+               public-inbox-glossary) ];
+$v->{-m8} = [ qw(public-inbox-daemon lei-daemon) ];
 my @sections = (1, 5, 7, 8);
 $v->{check_80} = [];
 $v->{manuals} = [];
@@ -67,7 +78,8 @@ for my $i (@sections) {
                $t->{"Documentation/$m.html : $txt"} = [ "\$(txt2pre) <$txt" ];
                $t->{".$m.cols : $m.$i"} = [
                        "\@echo CHECK80 $m.$i;".
-                       "COLUMNS=80 \$(MAN) ./$m.$i | \$(check_man)" ];
+                       "COLUMNS=80 \$(MAN) ./$m.$i | \$(check_man)",
+                       '>$@' ];
                $t->{".$m.lexgrog: $m.$i"} = [
                        "\@echo LEXGROG $m.$i;" .
                        "\$(LEXGROG) ./$m.$i >\$\@+ && mv \$\@+ \$@" ];
@@ -135,7 +147,7 @@ WriteMakefile(
        NAME => 'PublicInbox', # n.b. camel-case is not our choice
 
        # XXX drop "PENDING" in .pod before updating this!
-       VERSION => '1.6.1',
+       VERSION => '1.7.0.PENDING',
 
        AUTHOR => 'Eric Wong <e@80x24.org>',
        ABSTRACT => 'public-inbox server infrastructure',
@@ -153,12 +165,14 @@ WriteMakefile(
                'Digest::SHA' => 0, # rpm: perl-Digest-SHA
                'Encode' => 2.35, # 2.35 shipped with 5.10.1
                'IO::Compress::Gzip' => 0,
+               'IO::Uncompress::Gunzip' => 0,
                'Storable' => 0, # rpm: perl-Storable
+               'Text::ParseWords' => 0, # rpm: perl-Text-ParseWords
 
                # Plack is needed for public-inbox-httpd and PublicInbox::WWW
                # 'Plack' => 0,
 
-               'URI::Escape' => 0,
+               'URI' => 0,
 
                # We have more test dependencies, but do not force
                # users to install them.  See INSTALL
@@ -172,6 +186,20 @@ WriteMakefile(
                # ExtUtils::MakeMaker # this file won't run w/o it...
        },
        MAN3PODS => \%man3,
+       clean => {
+               FILES => 't/home*/setup* t/home*/t* t/home*/.public-inbox '.
+                       't/data-gen/*'
+       },
+       PM => {
+               map {
+                       s[^lib/][]s;
+                       +('lib/' . $_ => '$(INST_LIB)/' . $_);
+               } grep {
+                       # Will include *.pod and an *.h file, but so
+                       # would ExtUtils::MakeMaker.
+                       m[^lib/];
+               } @manifest
+       },
 );
 
 sub MY::postamble {
@@ -232,13 +260,17 @@ Makefile.PL : MANIFEST
 # prefix + bindir matches git.git Makefile:
 prefix = \$(HOME)
 bindir = \$(prefix)/bin
-symlink-install :
+symlink-install : lib/PublicInbox.pm
        mkdir -p \$(bindir)
        lei=\$\$(realpath lei.sh) && cd \$(bindir) && \\
        for x in \$(EXE_FILES); do \\
                ln -sf "\$\$lei" \$\$(basename "\$\$x"); \\
        done
 
+pure_all :: lib/PublicInbox.pm
+lib/PublicInbox.pm : FORCE
+       VERSION=\$(VERSION) \$(PERL) -w ./version-gen.perl
+
 update-copyrights :
        \@case '\$(GNULIB_PATH)' in '') echo >&2 GNULIB_PATH unset; false;; esac
        git ls-files | UPDATE_COPYRIGHT_HOLDER='all contributors' \\