Git-Url:
http://git.frugalware.org/gitweb/gitweb.cgi?p=frugalware-current.git;a=commitdiff;h=57a470cb69bf57002bac769a5f3f1f87b69ddc6d
commit 57a470cb69bf57002bac769a5f3f1f87b69ddc6d
Author: Michel Hermier <[EMAIL PROTECTED]>
Date: Wed Sep 12 00:48:04 2007 +0200
source/include/util.sh: Introduce Fpkgversep, a variable representing the
separator of pkgname and pkgver in the
real package file name. (Usefull for archive of the type foo_1.2.3.bar)
diff --git a/source/include/util.sh b/source/include/util.sh
index c7754d1..782a726 100644
--- a/source/include/util.sh
+++ b/source/include/util.sh
@@ -23,7 +23,7 @@
# NOTE: You don't need to use Finclude util, it is automatically included.
#
# == OPTIONS
-# * _F_cd_path (defaults to $pkgname-$pkgver$pkgextraver)
+# * _F_cd_path (defaults to $pkgname$Fpkversep$pkgver$pkgextraver)
# * _F_conf_configure (defaults to ./configure)
# * _F_conf_perl_pipefrom: if set, pipe the output of this command in Fconf()
# for perl packages
@@ -60,6 +60,8 @@
# Since util.sh is included before the FrugalBuild you may modify these
# variables, they won't be overwritten by util.sh again.
#
+# * Fpkgversep (defaults to -): the separator between the package name
+# and the package version in the package archive filename.
# * Fsrcdir
# * Fdestdir
# * Fprefix
@@ -70,6 +72,7 @@
# * Fconfopts
# * LDFLAGS
###
+Fpkversep="-"
Fsrcdir="$startdir/src"
Fdestdir="$startdir/pkg"
Fprefix="/usr"
@@ -110,7 +113,7 @@ Fcd() {
cd "$Fsrcdir/$1" || Fdie
elif [ "$#" -eq 0 ]; then
if [ -z "$_F_cd_path" ]; then
- _F_cd_path="$pkgname-$pkgver$pkgextraver"
+
_F_cd_path="$pkgname$Fpkversep$pkgver$pkgextraver"
fi
Fcd "$_F_cd_path"
fi
@@ -791,7 +794,7 @@ Fautoreconf() {
# Extension of the archive is given as argument.
###
Flastarchive() {
- grep "\($1\)\(\$\|\#\)"|sed -n "s/.*-\(.*\)\($1\).*/\1/;$ p"
+ grep "\($1\)\(\$\|\#\)"|sed -n "s/.*$Fpkversep\(.*\)\($1\).*/\1/;$ p"
}
###
@@ -820,7 +823,7 @@ Flasttarbz2() {
##
Fup2gnugz()
{
- up2date="lynx -dump 'http://ftp.gnu.org/gnu/$pkgname/?C=M;O=A'|grep
'$pkgname-\(.*\).tar.gz$'|sort -n -r|head -n1|Flasttar"
+ up2date="lynx -dump 'http://ftp.gnu.org/gnu/$pkgname/?C=M;O=A'|grep
'$pkgname$Fpkversep\(.*\).tar.gz$'|sort -n -r|head -n1|Flasttar"
}
###
@@ -828,7 +831,7 @@ Fup2gnugz()
##
Fup2gnubz2()
{
- up2date="lynx -dump 'http://ftp.gnu.org/gnu/$pkgname/?C=M;O=A'|grep
'$pkgname-\(.*\).tar.bz2$'|sort -n -r|head -n1|Flasttarbz2"
+ up2date="lynx -dump 'http://ftp.gnu.org/gnu/$pkgname/?C=M;O=A'|grep
'$pkgname$Fpkversep\(.*\).tar.bz2$'|sort -n -r|head -n1|Flasttarbz2"
}
###
_______________________________________________
Frugalware-git mailing list
[email protected]
http://frugalware.org/mailman/listinfo/frugalware-git