App-sbozyp
view release on metacpan or search on metacpan
}
}
return wantarray ? @pkg_queue : \@pkg_queue;
}
sub build_slackware_pkg {
my ($pkg) = @_;
local $ENV{OUTPUT} = $CONFIG{TMPDIR}; # all SlackBuilds use the $OUTPUT env var to determine output pkg location
my $staging_dir = prepare_pkg($pkg);
my $slackbuild = $pkg->{PRGNAM} . '.SlackBuild';
my $cmd = sbozyp_open('-|', "cd '$staging_dir' && chmod +x ./$slackbuild && ./$slackbuild");
my $slackware_pkg;
while (my $line = <$cmd>) {
$slackware_pkg = $1 if $line =~ /^Slackware package (.+) created\.$/;
print $line; # magically knows to print to stdout or stderr
}
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;
}
package/sbozyp.SlackBuild view on Meta::CPAN
set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
cp -ar $CWD/* .
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
-o -perm 511 \) -exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
perl Makefile.PL \
PREFIX=/usr \
INSTALLDIRS=vendor \
INSTALLVENDORMAN1DIR=/usr/man/man1 \
INSTALLVENDORMAN3DIR=/usr/man/man3
make
make install DESTDIR=$PKG
find $PKG/usr/man -type f -exec gzip -9 {} \;
( run in 0.344 second using v1.01-cache-2.11-cpan-496ff517765 )