1 | package Mail::ExpandAliases; |
---|
2 | |
---|
3 | # ---------------------------------------------------------------------- |
---|
4 | # Makefile.PL - Generate a Makefile |
---|
5 | # Copyright (C) 2002 darren chamberlain <darren@cpan.org> |
---|
6 | # |
---|
7 | # This program is free software; you can redistribute it and/or |
---|
8 | # modify it under the terms of the GNU General Public License as |
---|
9 | # published by the Free Software Foundation; version 2. |
---|
10 | # |
---|
11 | # This program is distributed in the hope that it will be useful, but |
---|
12 | # WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
---|
14 | # General Public License for more details. |
---|
15 | # |
---|
16 | # You should have received a copy of the GNU General Public License |
---|
17 | # along with this program; if not, write to the Free Software |
---|
18 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA |
---|
19 | # 02111-1307 USA |
---|
20 | # ---------------------------------------------------------------------- |
---|
21 | |
---|
22 | use strict; |
---|
23 | |
---|
24 | use ExtUtils::MakeMaker; |
---|
25 | use File::Basename qw(basename); |
---|
26 | |
---|
27 | my $dist = '$(DISTNAME)-$(VERSION).tar.gz'; |
---|
28 | my @EXE_FILES = ('expand-alias'); |
---|
29 | my %PREREQ_PM = ('IO::File'); |
---|
30 | my %clean = ('FILES' => "$dist $dist.asc distdir"); |
---|
31 | my %macro = ( |
---|
32 | 'GPG' => 'gpg', |
---|
33 | 'AUTHOR' => 'darren@cpan.org', |
---|
34 | 'SIGN' => '--detach-sign --armor', |
---|
35 | ); |
---|
36 | |
---|
37 | WriteMakefile( |
---|
38 | NAME => __PACKAGE__, |
---|
39 | VERSION_FROM => 'ExpandAliases.pm', |
---|
40 | EXE_FILES => \@EXE_FILES, |
---|
41 | PREREQ_PM => \%PREREQ_PM, |
---|
42 | clean => \%clean, |
---|
43 | macro => \%macro, |
---|
44 | ); |
---|
45 | |
---|
46 | package MY; |
---|
47 | sub dist_dir { |
---|
48 | my $self = shift; |
---|
49 | my $stuff = $self->SUPER::dist_dir(@_); |
---|
50 | |
---|
51 | return "$stuff\ttouch distdir\n\n"; |
---|
52 | } |
---|
53 | |
---|
54 | sub postamble { |
---|
55 | return <<'P'; |
---|
56 | distsign :: $(DISTVNAME).tar$(SUFFIX) |
---|
57 | $(GPG) $(SIGN) -u $(AUTHOR) $(DISTVNAME).tar$(SUFFIX) |
---|
58 | @cat $(DISTVNAME).tar$(SUFFIX).asc |
---|
59 | P |
---|
60 | } |
---|
61 | |
---|
62 | __END__ |
---|