#
# Makefile for mail2news script
#
# Last updated by gossamer on Fri Nov  3 16:35:42 EST 2000
#

require 5;
use strict;

# Check for modules we need.
#$| = 1;
#my $missing_modules = 0;
#
#print "Checking for XXX ...";
#eval {
#    require XXX;
#};
#if ($@) {
#    print " missing!\n";
#    $missing_modules++;
#    print "$@\n";
#    sleep(2);  # Don't hurry too much
#} else {
#    print " got it\n";
#}
#
#print <<EOT if $missing_modules;
#The missing modules can be obtained from CPAN - you'll need them to
#complete the installation.  
#
#Visit <URL:http://www.perl.com/CPAN/> to find a CPAN site near you.
#
#EOT

use ExtUtils::MakeMaker;
WriteMakefile(
    'NAME'	   => 'mail2news',
    'EXE_FILES'    => [ 'mail2news' ],
    'VERSION_FROM' => 'mail2news',
    'PREFIX'       => '/usr/local',

    'dist'         => { 
                         COMPRESS => 'gzip -9f',
                         SUFFIX => '.gz',
                      },
);

sub MY::postamble {
   package MY;

   '

WEBDIR = /home/gossamer/web/tertius/homepage/code

webdist: $(DISTVNAME).tar$(SUFFIX)
	@$(MKPATH) $(WEBDIR)/$(DISTNAME)/
	cp $(DISTVNAME).tar$(SUFFIX) $(WEBDIR)/$(DISTNAME)/
	cp README $(WEBDIR)/$(DISTNAME)/$(DISTVNAME).README

FILES=Mail2News.mini-HOWTO.sgml

TO_HTML=sgml2html --split=0 --imagebuttons
TO_TEXT=sgml2txt --filter

html: $(FILES)
	$(TO_HTML) $(FILES)

txt: $(FILES)
	$(TO_TEXT) $(FILES)

'
}

