6 use IPC::System::Simple qw(run);
8 die "Usage: ezpz-create-test-ezmlm-install ezmlm-source.tgz build-dir install-dir"
11 my ($ezmlm_tarball, $build_dir_path, $install_to_path) = @ARGV;
13 my $orig_cwd = io->dir(cwd);
15 my $build_dir = io->dir(io->dir($build_dir_path)->rel2abs);
16 my $install_to = io->dir(io->dir($install_to_path)->rel2abs);
18 unless ($build_dir->exists) {
21 run 'tar', '-xzf', $ezmlm_tarball;
25 my ($src_dir) = ($build_dir->all_dirs)[0];
27 die "No source dir found in ${build_dir}" unless $src_dir;
29 foreach my $type (qw(bin etc lib man qmail)) {
30 $src_dir->catfile("conf-${type}")->print($install_to->catdir($type)."\n");
39 $install_to->catdir('bin')->mkpath;
40 run make => 'install';