App-sbozyp

 view release on metacpan or  search on metacpan

bin/sbozyp  view on Meta::CPAN

    return $staging_dir;
}

sub build_slackware_pkg {
    my ($pkg, $keep_src, $skip_md5) = @_;
    local $ENV{OUTPUT} = $CONFIG{TMPDIR}; # all SlackBuilds use the $OUTPUT env var to determine output pkg location
    sbozyp_mkdir($CONFIG{TMPDIR});
    my $staging_dir = pkg_prepare_for_build($pkg, $keep_src, $skip_md5);
    my $slackbuild = $pkg->{PRGNAM} . '.SlackBuild';
    my $cmd = with_cwd($staging_dir, sub {
        sbozyp_chmod(0755, "./$slackbuild");
        return sbozyp_open('-|', "./$slackbuild");
    });
    my $slackware_pkg; while (my $line = <$cmd>) {
        $slackware_pkg = $1 if $line =~ /^Slackware package (.+) created\.$/;
        print $line;
    }
    close $cmd;
    sbozyp_die("failed to build $pkg->{PKGNAME}") if $? != 0;
    sbozyp_die("successfully built $pkg->{PKGNAME} but couldn't determine the path of the created Slackware package") if !defined $slackware_pkg;
    return $slackware_pkg;

bin/sbozyp  view on Meta::CPAN

    my ($mode, $path) = @_;
    open(my $fh, $mode, $path) or sbozyp_die("could not open file '$path': $!");
    return $fh;
}

sub sbozyp_unlink {
    my ($file) = @_;
    unlink $file or sbozyp_die("could not unlink file '$file': $!");
}

sub sbozyp_chmod {
    my ($mode, $file) = @_;
    chmod $mode, $file or sbozyp_die(sprintf("could not chmod 0%o '%s': %s", $mode, $file, $!));
}

sub sbozyp_chdir {
    my ($dir) = @_;
    chdir $dir or sbozyp_die("could not chdir '$dir': $!");
}

sub sbozyp_print_file {
    my ($file) = @_;
    my $fh = sbozyp_open('<', $file);



( run in 0.726 second using v1.01-cache-2.11-cpan-5b529ec07f3 )