Mail-SpamCannibal

 view release on metacpan or  search on metacpan

Makefile.PL  view on Meta::CPAN

	@$(MKPATH) $(SPAMCANNIBAL_HOME)/sess
	@$(MKPATH) $(SPAMCANNIBAL_HOME)/private
	$(CP) -p private/* $(SPAMCANNIBAL_HOME)/private

install_sc_permissions	:
	chown -R $(SPAMUID) $(SPAMCANNIBAL_HOME)
	chgrp -R $(SPAMGID) $(SPAMCANNIBAL_HOME)
	chmod 0700 $(SPAMCANNIBAL_HOME)/sess
	chmod 0700 $(SPAMCANNIBAL_HOME)/private
	chmod 0600 $(SPAMCANNIBAL_HOME)/private/*
	chmod 0640 $(SPAMCANNIBAL_HOME)/config/*
	chmod 0644 $(SPAMCANNIBAL_HOME)/config/sc_web*
	chmod 0644 $(SPAMCANNIBAL_HOME)/config/sc_Black*
	chmod 04755 $(SPMCNBL_SCRIPT_DIR)/sc_sesswrap
	chmod 01700 $(SPMCNBL_SCRIPT_DIR)/sc_session.pl
	chmod 0700 $(SPMCNBL_SCRIPT_DIR)/sc_remote.pl
	if [ -d $(SPAMCANNIBAL_HOME)/public_html/tmp ]; then \
	    $(RM_F) $(SPAMCANNIBAL_HOME)/public_html/tmp/*; \
	else \
	    $(MKPATH) $(SPAMCANNIBAL_HOME)/public_html/tmp; \
	    chown -R $(SPAMUID) $(SPAMCANNIBAL_HOME)/public_html/tmp; \
	    chgrp -R $(SPAMGID) $(SPAMCANNIBAL_HOME)/public_html/tmp; \
	    chmod 0777 $(SPAMCANNIBAL_HOME)/public_html/tmp; \
	fi
	if [ -d $(SPAMCANNIBAL_HOME)/public_html/flags ]; then \
	    echo "$(SPAMCANNIBAL_HOME)/public_html/flags exists, skipping..."; \
	else \
	    $(MKPATH) $(SPAMCANNIBAL_HOME)/public_html/flags; \
	    chown -R $(SPAMUID) $(SPAMCANNIBAL_HOME)/public_html/flags; \
	    chgrp -R $(SPAMGID) $(SPAMCANNIBAL_HOME)/public_html/flags; \
	    chmod 0777 $(SPAMCANNIBAL_HOME)/public_html/flags; \
	fi

install_daemon	:
	@cd BDBaccess && $(MAKE) install_daemon $(PASTHRU)
	@cd DNSBLserver && $(MAKE) install_daemon $(PASTHRU)

clean_CTest	:
	@cd BDBaccess && $(MAKE) clean_CTest $(PASTHRU)
	@cd DNSBLserver && $(MAKE) clean_CTest $(PASTHRU)

|;
  if ($workaround) {
    $postamble .= pf_htmlifypods(\%makeparms,\%Config);
  }
  $postamble;
}

sub MY::top_targets {
  my $inherited;
  {
    package MY;   # add dependencies for .pm and xs files
    $inherited = shift->SUPER::top_targets(@_);
  }
  $inherited =~ s|(\npure_all\s+::.+)config(.+)|${1}SiteConfig.pm scripts/sc_sesswrap INSTALL config$2|;
  if ($workaround) {
    $inherited =~ s/(manifypods)/pf_htmlifypods $1/g;
  }
  $inherited .= q|

scripts/sc_sesswrap	: cdata/sc_sesswrap.c
	@$(CC) cdata/sc_sesswrap.c -o scripts/sc_sesswrap

|;
}

sub MY::makefile {
  package MY;
  my $inherited = shift->SUPER::makefile(@_);
  $inherited =~ s/(Makefile\s+:.+)/$1 config.db/;
  $inherited .= q|
config.db :
	@$(NOOP);

|;
}

sub MY::install {
  my $inherited;
  {
    package MY;
    $inherited = shift->SUPER::install(@_);
  }
  $inherited =~ s/(\ninstall\s+::)(.+doc.+install)/$1 install_daemon install_spamcannibal${2} install_sc_permissions/;
  $inherited =~ s/(\ninstall_perl\s+::(.+doc.+install))/$1 install_daemon install_spamcannibal${2} install_sc_permissions/;
  $inherited =~ s/(\ninstall_site\s+::)(.+doc.+install)/$1 install_daemon install_spamcannibal${2} install_sc_permissions/;   
  $inherited =~ s/(\s+)all(\s+)/${1}all clean_CTest${2}/g;
#  $inherited =~ s|(pure_site_install\s+::.*)|$1\n\t\@\$\(MKPATH\) \$\(INSTALLHTMLSITELIBDIR\)|;
  if ($workaround) {
    $inherited = pf_psias($inherited);
  }
  $inherited;
}

sub MY::realclean {
  package MY;   
  my $inherited = shift->SUPER::realclean(@_) . q|
	$(RM_F) config.db
	$(RM_F) SiteConfig.pm
	$(RM_F) scripts/sc_sesswrap
	$(RM_F) INSTALL
|;
}

sub MY::htmlifypods {
  package MY;
  my $inherited = shift->SUPER::htmlifypods(@_) .q|
	./fixuplinks.pl $(INST_HTMLLIBDIR)
|;
}

sub MY::const_config {
  package MY;
  $inherited = shift->SUPER::const_config(@_);
  return q|LANG=en_US
SUPPORTED=en_US:en
|. $inherited;
}

eval {	require IPTables::IPv4::DBTarpit::Inst ||
	die "no IPTables installed"; };



( run in 0.767 second using v1.01-cache-2.11-cpan-39bf76dae61 )