summaryrefslogtreecommitdiff
path: root/lib/SlackBuild
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2018-01-18 10:41:53 +0100
committerSergey Poznyakoff <gray@gnu.org.ua>2018-01-18 10:41:53 +0100
commit4d73721eee53abef0127119a8e3fa6a7517a8159 (patch)
tree94a4b0b8f4144e6efe12ce968e268cebf1f18281 /lib/SlackBuild
parentd5b1a8029b6c0c9c53f8f4b94f6bc86080ff2608 (diff)
downloadslackbuilder-4d73721eee53abef0127119a8e3fa6a7517a8159.tar.gz
slackbuilder-4d73721eee53abef0127119a8e3fa6a7517a8159.tar.bz2
Place output packages into a subdirectory named after the version of Slackware it was built for
* lib/SlackBuild/Rc.pm (code): Source /etc/os-release and emit additional output to help SlackBuilder determine Slackware version. * lib/SlackBuilder.pm (osversion): New method. (file): Place output package into a subdirectory named after the Slackware version. (_build): Set osversion
Diffstat (limited to 'lib/SlackBuild')
-rw-r--r--lib/SlackBuild/Rc.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/SlackBuild/Rc.pm b/lib/SlackBuild/Rc.pm
index 487c5aa..1e85032 100644
--- a/lib/SlackBuild/Rc.pm
+++ b/lib/SlackBuild/Rc.pm
@@ -42,7 +42,9 @@ sub code {
$self->builder->error("$_: package not resolved") for (@$unresolved);
return;
}
- my @code = ('#! /bin/sh', 'set -e',
+ my @code = ('#! /bin/sh',
+ 'set -e',
+ '(. /etc/os-release; echo SLACKBUILDER: DISTRO $NAME; echo SLACKBUILDER: VERSION $VERSION)',
map { "/sbin/installpkg /var/pkg/$_" } @$pkglist);
my $env = $self->builder->environ;

Return to:

Send suggestions and report system problems to the System administrator.