Newer
Older
Digital_Repository / OARiNZ / DIY / webmin-exim / webmin-exim_0.2.6-4.diff
--- webmin-exim-0.2.6.orig/debian/changelog
+++ webmin-exim-0.2.6/debian/changelog
@@ -0,0 +1,30 @@
+webmin-exim (0.2.6-4) edgy; urgency=low
+
+  * Adapted for OARiNZ Instant EPrints project.
+
+ -- Nigel Stanger <nstanger@infoscience.otago.ac.nz>  Fri,  6 Jul 2007 14:54:12 +1200
+
+webmin-exim (0.2.6-3) unstable; urgency=low
+
+  * Adopted by Debian Webmin maintainer group (Closes: #300566)
+
+ -- Jaldhar H. Vyas <jaldhar@debian.org>  Thu, 31 Mar 2005 10:03:38 -0500
+
+webmin-exim (0.2.6-2) unstable; urgency=low
+
+  * Orphaned.
+
+ -- Jaldhar H. Vyas <jaldhar@debian.org>  Mon, 13 Sep 2004 19:00:25 -0400
+
+webmin-exim (0.2.6-1) unstable; urgency=low
+
+  * New upstream version.
+  * Works properly with exim3 and 4 (Closes: #246269)
+
+ -- Jaldhar H. Vyas <jaldhar@debian.org>  Mon, 24 May 2004 15:24:05 -0400
+
+webmin-exim (0.2.5-1) unstable; urgency=low
+
+  * New package.  (Closes: #212323)
+
+ -- Jaldhar H. Vyas <jaldhar@debian.org>  Mon, 16 Feb 2004 17:57:32 -0500
--- webmin-exim-0.2.6.orig/debian/control
+++ webmin-exim-0.2.6/debian/control
@@ -0,0 +1,18 @@
+Source: webmin-exim
+Section: admin
+Priority: optional
+Build-Depends-Indep: debhelper (>= 4), perl
+Maintainer: Nigel Stanger <nstanger@infoscience.otago.ac.nz>
+Standards-Version: 3.6.1
+
+Package: webmin-exim
+Architecture: all
+Priority: optional
+Depends: webmin, ${perl:Depends}, exim4 | exim, ucf (>= 0.28)
+Description: exim mail server control module for webmin
+ This module allows webmin (a web-based interface for system administration
+ for Unix) to monitor the exim mail server.
+ .
+ This version has been repackaged for use in the OARiNZ project
+ Instant EPrints installer (see <http://www.oarinz.ac.nz/>). It
+ is NOT intended for general use.
--- webmin-exim-0.2.6.orig/debian/copyright
+++ webmin-exim-0.2.6/debian/copyright
@@ -0,0 +1,22 @@
+This package was debianized by Jaldhar H. Vyas <jaldhar@debian.org> on
+Tue, 28 Jan 2004 17:00:00 -0500.
+
+It was downloaded from http://mtlx.free.fr/webmin/exim/
+
+The upstream author is Alexandre Mathieu <mtlx@free.fr>
+
+Copyright:
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+A copy of the GPL can be found on Debian GNU/Linux systems in
+/usr/share/common-licenses/ .
+
--- webmin-exim-0.2.6.orig/debian/perlpath.pl
+++ webmin-exim-0.2.6/debian/perlpath.pl
@@ -0,0 +1,27 @@
+# perlpath.pl
+# This script gets run only from setup.sh in order to replace the
+# #!/usr/local/bin/perl line at the start of scripts with the real path to perl
+
+$ppath = $ARGV[0];
+if ($ARGV[1] eq "-") {
+        @files = <STDIN>;
+        chop(@files);
+        }
+else {
+        # Get files from command line
+        @files = @ARGV[1..$#ARGV];
+        }
+
+foreach $f (@files) {
+        open(IN, $f);
+        @lines = <IN>;
+        close(IN);
+        if ($lines[0] =~ /^#!\/\S*perl\S*(.*)/) {
+                open(OUT, "> $f");
+                print OUT "#!$ppath$1\n";
+                for($i=1; $i<@lines; $i++) {
+                        print OUT $lines[$i];
+                        }
+                close(OUT);
+                }
+        }
--- webmin-exim-0.2.6.orig/debian/rules
+++ webmin-exim-0.2.6/debian/rules
@@ -0,0 +1,127 @@
+#!/usr/bin/make -f
+# Sample debian/rules that uses debhelper.
+# GNU copyright 1997 to 1999 by Joey Hess.
+
+SHELL=/bin/bash
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+PKG_VER = $(shell perl -e 'print <> =~ /\((.*)\)/' debian/changelog)
+
+build: build-stamp
+build-stamp:
+	dh_testdir
+	# Add here commands to compile the package.
+	touch build-stamp
+
+clean:
+	dh_testdir
+	dh_testroot
+	rm -f build-stamp
+
+	# this is evil, but it matches the equally evil creation of these
+	# files below, and at least it keeps the diff clean (Phil Hands)
+	for p in `dh_listpackages` ; \
+	do \
+		rm -f debian/$$p.substvars ; \
+	done
+
+	dh_clean
+
+install: build
+	dh_testdir
+	dh_testroot
+	dh_clean -k
+
+	dh_installdirs -pwebmin-exim etc/webmin/exim usr/share/webmin/exim
+	lib=`pwd`/debian/webmin-exim/usr/share/webmin/exim ; \
+	etc=`pwd`/debian/webmin-exim/etc/webmin/exim ; \
+	(cp -dp * $$lib ; \
+	cp -a `find * -type d -prune ! -name debian -print` $$lib ; \
+	cd $$lib ; \
+	rm LICENSE CHANGELOG NOTICE ; \
+	for c in config ; \
+	do \
+		etc_sub=$$etc/`dirname $$c` ; \
+		mkdir -p $$etc_sub ; \
+		mv $$c $$etc_sub/config ; \
+		touch $$etc_sub/admin.acl ; \
+	done ; \
+	for c in config-debian-linux ; \
+	do \
+		etc_sub=$$etc/`dirname $$c` ; \
+		mkdir -p $$etc_sub ; \
+		mv $$c $$etc_sub/config ; \
+		touch $$etc_sub/admin.acl ; \
+	done ; \
+	for c in config-debian-linux-3.0 ; \
+	do \
+		etc_sub=$$etc/`dirname $$c` ; \
+		mkdir -p $$etc_sub ; \
+		mv $$c $$etc_sub/config ; \
+		touch $$etc_sub/admin.acl ; \
+	done ; \
+	rm -f config-* ; \
+	for l in aix cobalt-linux corel-linux freebsd \
+		generic-linux gentoo-linux hpux irix lfs-linux macos \
+		mandrake-linux msc-linux netbsd openbsd open-linux \
+		openserver osf1 osf redhat-linux slackware \
+		slackware-linux solaris suse-linux-8.0 suse-linux \
+		turbo-linux united-linux unixware ; \
+	do \
+		if [ -e $$l-lib.pl ] ; \
+		then \
+			rm -f $$l-lib.pl ; \
+		fi \
+	done ; )
+	echo "package:Version=$(PKG_VER)" > debian/webmin-exim.substvars
+
+	# fix up the #!/.../perl paths
+	# sort out the permissions
+	# split things out for subpackages
+	for p in `dh_listpackages` ; \
+	do \
+		find debian/$$p/usr/share/webmin \( -name '*.cgi' -o -name '*.pl' \) -print |  perl ./debian/perlpath.pl /usr/bin/perl - ; \
+		find debian/$$p -type f -print0 | xargs -0 chmod 644 ; \
+		find debian/$$p/etc/webmin -print0 | xargs -0 chmod go-r ; \
+		find debian/$$p -type f \( -name '*.pl' -o -name '*.cgi' \) -exec grep -q '#!/usr/bin/perl' {} \; -print0 | xargs -0 chmod 755 ; \
+	done 
+
+	# config stuff for UCF
+	dh_installdirs -pwebmin-exim usr/share/webmin-exim
+	dh_install -pwebmin-exim debian/exim3.config usr/share/webmin-exim
+	dh_install -pwebmin-exim debian/exim4.config usr/share/webmin-exim
+
+# Build architecture-independent files here.
+# Pass -i to all debhelper commands in this target to reduce clutter.
+binary-indep: build install
+#	dh_testversion
+	dh_testdir
+	dh_testroot
+	for p in `dh_listpackages` ; \
+	do \
+		dh_link -p$$p usr/share/doc/webmin/README.Debian usr/share/doc/$$p/README.Debian ; \
+	done
+	dh_installdocs
+	dh_installchangelogs
+	dh_compress
+	dh_fixperms
+	# make config permissions more secure
+	for p in `dh_listpackages` ; \
+	do \
+		find debian/$$p/etc -name config | xargs chmod 0660 ; \
+	done
+	dh_installdeb
+	dh_perl
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+# Build architecture-dependent files here.
+# Pass -a to all debhelper commands in this target to reduce clutter.
+binary-arch: build install
+# We have nothing to do by default.
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install
--- webmin-exim-0.2.6.orig/debian/compat
+++ webmin-exim-0.2.6/debian/compat
@@ -0,0 +1 @@
+4
--- webmin-exim-0.2.6.orig/debian/webmin-exim.postinst
+++ webmin-exim-0.2.6/debian/webmin-exim.postinst
@@ -0,0 +1,61 @@
+#!/bin/sh
+#set -e
+
+# Find out what version of exim is installed.
+if [ "`dpkg-query -W --showformat='${status}' exim | awk '{ print $3 }'`" = "installed" ]; then
+  version=exim3
+else
+  version=exim4
+fi
+if [ "1" = "1" ]; then
+	# Update the ACL for the root user, or the first user in the ACL
+	grep "^root:" /etc/webmin/webmin.acl >/dev/null
+	if [ "$?" = "0" ]; then
+		user=root
+	else
+		user=`head -1 /etc/webmin/webmin.acl | cut -f 1 -d :`
+	fi
+	mods=`grep $user: /etc/webmin/webmin.acl | cut -f 2 -d :`
+	echo $mods | grep " exim" >/dev/null
+	if [ "$?" != "0" ]; then
+		grep -v ^$user: /etc/webmin/webmin.acl > /tmp/webmin.acl.tmp
+		echo $user: $mods exim > /etc/webmin/webmin.acl
+		cat /tmp/webmin.acl.tmp >> /etc/webmin/webmin.acl
+		rm -f /tmp/webmin.acl.tmp
+	fi
+fi
+if [ "$1" = "configure" ]; then
+  # If upgrading, check with user whether to replace config.
+  if [ "$2" != "" ]; then
+    ucf --three-way --debconf-ok /usr/share/webmin-exim/$version.config /etc/webmin/exim/config
+  # Otherwise, just replace it, as this is the first time installed.
+  else
+    cp /usr/share/webmin-exim/$version.config /etc/webmin/exim/config
+  fi
+fi
+if [ "" != "" -a "" = "1" ]; then
+	# Activate this theme
+	grep -v "^preroot=" /etc/webmin/miniserv.conf >/etc/webmin/miniserv.conf.tmp
+	(cat /etc/webmin/miniserv.conf.tmp ; echo preroot=exim) > /etc/webmin/miniserv.conf
+	rm -f /etc/webmin/miniserv.conf.tmp
+	grep -v "^theme=" /etc/webmin/config >/etc/webmin/config.tmp
+	(cat /etc/webmin/config.tmp ; echo theme=exim) > /etc/webmin/config
+	rm -f /etc/webmin/config.tmp
+	(/etc/webmin/stop && /etc/webmin/start) >/dev/null 2>&1
+fi
+rm -f /etc/webmin/module.infos.cache
+
+# Run post-install function
+if [ "webmin" = "webmin" ]; then
+	cd /usr/share/webmin
+	WEBMIN_CONFIG=/etc/webmin WEBMIN_VAR=/var/webmin /usr/share/webmin/run-postinstalls.pl exim
+fi
+
+# Run post-install shell script
+if [ -r "/usr/share/webmin/exim/postinstall.sh" ]; then
+	cd /usr/share/webmin
+	WEBMIN_CONFIG=/etc/webmin WEBMIN_VAR=/var/webmin /usr/share/webmin/exim/postinstall.sh
+fi
+
+#DEBHELPER#
+
--- webmin-exim-0.2.6.orig/debian/webmin-exim.prerm
+++ webmin-exim-0.2.6/debian/webmin-exim.prerm
@@ -0,0 +1,24 @@
+#!/bin/sh
+#set -e
+
+# De-activate this theme, if in use and if we are not upgrading
+if [ "" = "1" -a "$1" != "upgrade" ]; then
+	grep "^preroot=exim" /etc/webmin/miniserv.conf >/dev/null
+	if [ "$?" = "0" ]; then
+		grep -v "^preroot=exim" /etc/webmin/miniserv.conf >/etc/webmin/miniserv.conf.tmp
+		(cat /etc/webmin/miniserv.conf.tmp) > /etc/webmin/miniserv.conf
+		rm -f /etc/webmin/miniserv.conf.tmp
+		grep -v "^theme=exim" /etc/webmin/config >/etc/webmin/config.tmp
+		(cat /etc/webmin/config.tmp) > /etc/webmin/config
+		rm -f /etc/webmin/config.tmp
+		(/etc/webmin/stop && /etc/webmin/start) >/dev/null 2>&1
+	fi
+fi
+# Run the pre-uninstall script, if we are not upgrading
+if [ "webmin" = "webmin" -a "$1" = "0" -a -r "/usr/share/webmin/exim/uninstall.pl" ]; then
+	cd /usr/share/webmin
+	WEBMIN_CONFIG=/etc/webmin WEBMIN_VAR=/var/webmin /usr/share/webmin/run-uninstalls.pl exim
+fi
+
+#DEBHELPER#
+
--- webmin-exim-0.2.6.orig/debian/webmin-exim.postrm
+++ webmin-exim-0.2.6/debian/webmin-exim.postrm
@@ -0,0 +1,10 @@
+#!/bin/sh
+set -e
+
+if [ "$1" = "purge" ]; then
+  ucf --purge /etc/webmin/exim/config
+  rm -rf /etc/webmin/exim
+fi
+
+#DEBHELPER#
+
--- webmin-exim-0.2.6.orig/debian/exim3.config
+++ webmin-exim-0.2.6/debian/exim3.config
@@ -0,0 +1,11 @@
+exim_path=/usr/sbin/exim
+exim_conf=
+log_default=main
+log_lines=20
+stat_topcount=10
+stat_local_league_table=1
+stat_show_errors=1
+stat_show_relay=1
+stat_show_transport=1
+stat_hist_opt=1
+stat_do_sender=host
--- webmin-exim-0.2.6.orig/debian/exim4.config
+++ webmin-exim-0.2.6/debian/exim4.config
@@ -0,0 +1,11 @@
+exim_path=/usr/sbin/exim4
+exim_conf=
+log_default=main
+log_lines=20
+stat_topcount=10
+stat_local_league_table=1
+stat_show_errors=1
+stat_show_relay=1
+stat_show_transport=1
+stat_hist_opt=1
+stat_do_sender=host