#
# Build script for <PACKAGE>
#
-# This build script is meant to be executed from within the source
-# directory created by extracting the tarball.
+# This build script is meant to be executed from within the build
+# directory, regardless of whether that is outside the source tree or
+# not.
#
# It will create up to 12 log files in the $HOME directory:
#
# install.log: All messages output during make install
# install.err: Just the errors output during make install
# upd.log: Any messages from updating the package list
-# (usually nothing)
# upd.err: Just the errors from updating the package list
-# (usually nothing)
# verupd.log: Any messages from updating the package version
-# (usually nothing)
# verupd.err: Just the errors from updating the package version
-# (usually nothing)
#
# After running the script you should check the *.err files to see
# if any problems have occurred. If that is the case, use the corresponding
## Version info.
ourname=${0##*/}
-VERSION=1.3
-COPYRIGHT="Copyright (C) 2007 - 2013 Steve Youngs <steve@steveyoungs.com>"
+VERSION=1.4
+COPYRIGHT="Copyright (C) 2007 - 2014 Steve Youngs <steve@steveyoungs.com>"
version_str="${ourname}: ${VERSION}\n${COPYRIGHT}"
show_version()
}
#*
-# Set this to 1 (one) if the package's version can be updated
-# automatically
+# Set $auto_version to 1 (one) if the package's version can be updated
+# automatically. Set $SRCTREE if building outside the source tree.
auto_version=0
+SRCTREE='.'
#*
# Set the configure commands/options here. Remove everything except
# the braces and colon if the package has no configure.
configure_commands()
{ :
- ./configure --prefix=/usr \
+ ${SRCTREE}/configure --prefix=/usr \
--infodir=/usr/share/info \
--mandir=/usr/share/man \
--sysconfdir=/etc \
update_commands()
{ :
sed -i s/"\(Last_Updated: \).*$"/"\1$(date +%c)"/g ${HOME}/.project
- sed -i s/"\(Deps: \).*$"/"\1$(forall_direntries_from $(whoami) -executable -exec ldd {} 2>/dev/null \;|grep '=>' 2>/dev/null|awk '{print $3;}'|xargs stat --format \"%U:%G\"|sort|uniq|xargs echo -n)"/ ${HOME}/.project
+ sed -i s/"\(Deps: \).*$"/"\1$(find_pkg_deps)"/ ${HOME}/.project
awk '/^CONTENTS:/ { print; exit; } {print}' ${HOME}/.project > ${HOME}/.projtmp
echo "--------" >> ${HOME}/.projtmp
list_package $(whoami) >> ${HOME}/.projtmp