--- /dev/null
+#!/usr/bin/env perl
+
+use strictures 1;
+use IO::All;
+use Cwd;
+use IPC::System::Simple qw(run);
+
+die "Usage: ezpz-create-test-ezmlm-install ezmlm-source.tgz build-dir install-dir"
+ unless @ARGV == 3;
+
+my ($ezmlm_tarball, $build_dir_path, $install_to_path) = @ARGV;
+
+my $orig_cwd = io->dir(cwd);
+
+my $build_dir = io->dir(io->dir($build_dir_path)->rel2abs);
+my $install_to = io->dir(io->dir($install_to_path)->rel2abs);
+
+unless ($build_dir->exists) {
+ $build_dir->mkpath;
+ $build_dir->chdir;
+ run 'tar', '-xzf', $ezmlm_tarball;
+ $orig_cwd->chdir;
+}
+
+my ($src_dir) = ($build_dir->all_dirs)[0];
+
+die "No source dir found in ${build_dir}" unless $src_dir;
+
+foreach my $type (qw(bin etc lib man qmail)) {
+ $src_dir->catfile("conf-${type}")->print($install_to->catdir($type)."\n");
+}
+
+$src_dir->chdir;
+
+run make => 'clean';
+run 'make';
+run make => 'man';
+run './ezmlm-test';
+$install_to->catdir('bin')->mkpath;
+run make => 'install';