Added $make_{build,install}_target, to be used in templates.

Use them if package doesn't use defaults.

While here always create $wrksrc/libtool if libtool is installed,
sometimes it's not there and you might need it anyway.

This fixes jpeg package.

--HG--
extra : convert_revision : 6d846b82f44bc4b2e837c6cb6355b4d18bc7edfb
This commit is contained in:
Juan RP 2008-10-02 18:39:26 +02:00
parent 43077fd21d
commit 47e0dc43cd
2 changed files with 18 additions and 4 deletions

View File

@ -446,6 +446,8 @@ fixup_tmpl_libtool()
$ln_cmd -s $PKGFS_MASTERDIR/bin/libtool $lt_file
$ln_cmd -s $PKGFS_MASTERDIR/share/libtool/config/ltmain.sh \
$wrksrc/ltmain.sh
elif [ -f "$PKGFS_MASTERDIR/bin/libtool" ]; then
$ln_cmd -s $PKGFS_MASTERDIR/bin/libtool $lt_file
fi
}
@ -453,7 +455,7 @@ build_tmpl_sources()
{
[ -z "$pkgname" ] && return 1
if [ -n "$distfiles" ]; then
if [ -n "$distfiles" -a -z "$wrksrc" ]; then
wrksrc=$PKGFS_BUILDDIR/$distfiles
elif [ -z "$wrksrc" ]; then
wrksrc=$PKGFS_BUILDDIR/$pkgname
@ -553,10 +555,12 @@ build_tmpl_sources()
fi
done
[ -z "$make_build_target" ] && make_build_target=
#
# Build package via make.
#
${MAKE_CMD} ${make_build_args}
${MAKE_CMD} ${make_build_args} ${make_build_target}
if [ "$?" -ne 0 ]; then
echo "*** ERROR building (make stage) \`$pkgname' ***"
exit 1
@ -572,11 +576,13 @@ build_tmpl_sources()
fi
done
[ -z "$make_install_target" ] && make_install_target=install
#
# Install package via make.
#
${MAKE_CMD} ${make_install_args} \
install prefix="$PKGFS_DESTDIR/$pkgname"
${MAKE_CMD} ${make_install_args} ${make_install_target} \
prefix="$PKGFS_DESTDIR/$pkgname"
if [ "$?" -ne 0 ]; then
echo "*** ERROR instaling \`$pkgname' ***"
exit 1

View File

@ -37,9 +37,17 @@
# Passed flags to the 'make' command before building the package.
#make_build_args="-j4"
# Target to be used for building. Use it if default is not the one
# that is needed.
#make_build_target="mytarget"
# Passed flags to the 'make' command before installing the package.
#make_install_args=""
# Target to be used for installing. Use it if default is not the
# one that is needed.
#make_install_target="install-foo"
# Make command to be used while building, it needs a full path.
# Uncomment the following line to use GNU make.
#make_cmd="$PKGFS_MASTERDIR/bin/gmake"