shutils: remove tmpl_func.sh, moved to the xbps-templates repo.

xbps-src: added XBPS_COMMONVARSDIR that sources all .sh files in
	  setup_tmpl(), this replaces tmpl_funcs.sh.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091012203056-rtay2drhrwak4ldk
This commit is contained in:
Juan RP 2009-10-12 22:30:56 +02:00
parent 8918861000
commit c6d3868b8b
3 changed files with 11 additions and 16 deletions

View File

@ -94,14 +94,15 @@ set_defvars()
: ${XBPS_TEMPLATESDIR:=$XBPS_DISTRIBUTIONDIR/templates}
: ${XBPS_TRIGGERSDIR:=$XBPS_DISTRIBUTIONDIR/triggers}
: ${XBPS_HELPERSDIR:=$XBPS_TEMPLATESDIR/helpers}
: ${XBPS_HELPERSDIR:=$XBPS_DISTRIBUTIONDIR/helpers}
: ${XBPS_COMMONVARSDIR:=$XBPS_DISTRIBUTIONDIR/common}
: ${XBPS_DBDIR:=$XBPS_MASTERDIR/var/db/xbps}
: ${XBPS_META_PATH:=$XBPS_DBDIR/}
: ${XBPS_PKGMETADIR:=$XBPS_DBDIR/metadata}
: ${XBPS_SHUTILSDIR:=@@XBPS_INSTALL_SHAREDIR@@}
DDIRS="XBPS_TEMPLATESDIR XBPS_TRIGGERSDIR"
DDIRS="$DDIRS XBPS_HELPERSDIR XBPS_SHUTILSDIR"
DDIRS="XBPS_TEMPLATESDIR XBPS_TRIGGERSDIR XBPS_HELPERSDIR"
DDIRS="$DDIRS XBPS_COMMONVARSDIR XBPS_SHUTILSDIR"
for i in ${DDIRS}; do
eval val="\$$i"
[ ! -d "$val" ] && msg_error "cannot find $i, aborting."

View File

@ -30,6 +30,10 @@ info_tmpl()
{
local i=
for f in $(echo $XBPS_COMMONVARSDIR/*.sh); do
[ -r ${f} ] && . ${f}
done
echo "pkgname: $pkgname"
echo "version: $version"
[ -n "$revision" ] && echo "revision: $revision"
@ -95,7 +99,9 @@ setup_tmpl()
[ -z "$pkg" ] && msg_error "missing package name after target."
. $XBPS_SHUTILSDIR/tmpl_vars.sh
for f in $(echo $XBPS_COMMONVARSDIR/*.sh); do
[ -r ${f} ] && . ${f}
done
if [ -f "$XBPS_TEMPLATESDIR/$pkg/template" ]; then
if [ "$pkgname" != "$pkg" ]; then

View File

@ -1,12 +0,0 @@
#
# Common vars that can be used by templates.
#
SOURCEFORGE_SITE="http://downloads.sourceforge.net/sourceforge"
NONGNU_SITE="http://download.savannah.nongnu.org/releases"
UBUNTU_SITE="http://archive.ubuntu.com/ubuntu/pool"
XORG_SITE="http://xorg.freedesktop.org/releases/individual"
DEBIAN_SITE="http://ftp.debian.org/debian/pool"
GNOME_SITE="http://ftp.gnome.org/pub/GNOME/sources"
KERNEL_SITE="http://www.kernel.org/pub/linux"
CPAN_SITE="http://cpan.perl.org/modules/by-module"