Simplify template files by removing run_stuff_<stage>_<phase> variables.

Now if a file "$pkgname-runstuff-<stage>-<phase>.sh" exists in
PKGFS_TEMPLATESDIR exists, it's executed automatically. Therefore
templates are simplified a lot.

--HG--
extra : convert_revision : 94f1da6424d3df70ef763d4339cf4d8e778ccbac
This commit is contained in:
Juan RP 2008-10-13 05:04:50 +02:00
parent 3e4a2a977c
commit 6575a051be
7 changed files with 15 additions and 67 deletions

View file

@ -250,10 +250,7 @@ reset_tmpl_vars()
make_build_args make_install_args build_style \
short_desc maintainer long_desc checksum wrksrc \
patch_files configure_env make_cmd pkgconfig_override \
configure_env make_env run_stuff_before run_stuff_after \
run_stuff_before_configure_file run_stuff_before_build_file \
run_stuff_before_install_file run_stuff_after_install \
run_stuff_after_install_file make_build_target \
configure_env make_env make_build_target \
run_stuff_before_configure_cmd run_stuff_before_build_cmd \
run_stuff_before_install_cmd run_stuff_after_install_cmd \
make_install_target postinstall_helpers version \
@ -594,14 +591,10 @@ configure_src_phase()
[ ! -f $PKGFS_APPLYPATCHES_DONE ] && apply_tmpl_patches
# Run stuff before configure.
for i in "$run_stuff_before"; do
if [ "$i" = "configure" ]; then
[ -f $run_stuff_before_configure_file ] && \
. $run_stuff_before_configure_file
[ -n "$run_stuff_before_configure_cmd" ] && \
${run_stuff_before_configure_cmd}
fi
done
local rbcf="$PKGFS_TEMPLATESDIR/$pkgname-runstuff-before-configure.sh"
[ -f $rbcf ] && . $rbcf
[ -n "$run_stuff_before_configure_cmd" ] && \
${run_stuff_before_configure_cmd}
# Export configure_env vars.
for f in ${configure_env}; do
@ -711,14 +704,10 @@ build_src_phase()
#
# Run template stuff before building.
#
for i in ${run_stuff_before}; do
if [ "$i" = "build" ]; then
[ -f $run_stuff_before_build_file ] && \
. $run_stuff_before_build_file
[ -n "$run_stuff_before_build_cmd" ] && \
${run_stuff_before_build_cmd}
fi
done
local rbbf="$PKGFS_TEMPLATESDIR/$pkgname-runstuff-before-build.sh"a
[ -f $rbbf ] && . $rbbf
[ -n "$run_stuff_before_build_cmd" ] && ${run_stuff_before_build_cmd}
[ -z "$make_build_target" ] && make_build_target=
[ -n "$PKGFS_MAKEJOBS" ] && PKGFS_MAKEJOBS="-j$PKGFS_MAKEJOBS"
@ -740,14 +729,9 @@ build_src_phase()
#
# Run template stuff before installing.
#
for i in ${run_stuff_before}; do
if [ "$i" = "install" ]; then
[ -f $run_stuff_before_install_file ] && \
. $run_stuff_before_install_file
[ -n "$run_stuff_before_install_cmd" ] && \
${run_stuff_before_install_cmd}
fi
done
local rbif="$PKGFS_TEMPLATESDIR/$pkgname-runstuff-before-install.sh"
[ -f $rbif ] && . $rbif
[ -n "$run_stuff_before_install_cmd" ] && ${run_stuff_before_install_cmd}
$touch_cmd -f $PKGFS_BUILD_DONE
}
@ -794,14 +778,9 @@ install_src_phase()
#
# Run template stuff after installing.
#
for i in ${run_stuff_after}; do
if [ "$i" = "install" ]; then
[ -f $run_stuff_after_install_file ] && \
. $run_stuff_after_install_file
[ -n "$run_stuff_after_install_cmd" ] && \
${run_stuff_after_install_cmd}
fi
done
local raif="$PKGFS_TEMPLATESDIR/$pkgname-runstuff-after-install.sh"
[ -f $raif ] && . $raif
[ -n "$run_stuff_after_install_cmd" ] && ${run_stuff_after_install_cmd}
#
# Transform pkg-config files if requested by template.

View file

@ -11,8 +11,3 @@ short_desc="PCI Access from Modular X.org"
maintainer="Juan RP <xtraeme@gmail.com>"
checksum=5d972b5398f96bb94b2dab7f16613ad998887ece
long_desc="..."
# NetBSD support.
run_stuff_before="configure"
run_stuff_before_configure_file="
$PKGFS_TEMPLATESDIR/$pkgname-runstuff-before-configure.sh"

View file

@ -18,6 +18,3 @@ long_desc="
attempts were made to make it as complete as possible, while
keeping the code easy to understand. Currently, this library
only supports C. Support for other languages is being considered."
run_stuff_before="build"
run_stuff_before_build_file="$PKGFS_TEMPLATESDIR/$pkgname-runstuff-before-build.sh"

View file

@ -15,7 +15,3 @@ long_desc="
uses the zlib(3) compression library, and optionally the JPEG library by the
Independent JPEG Group (IJG) and/or lcms (little CMS), a color-management
library by Marti Maria Saguar."
run_stuff_before="configure"
run_stuff_before_configure_file="
$PKGFS_TEMPLATESDIR/$pkgname-runstuff-before-configure.sh"

View file

@ -21,10 +21,3 @@ long_desc="
procedural and object-oriented (OO) programming, has powerful built-in
support for text processing, and has one of the world's most impressive
collections of third-party modules."
# Perl needs to be handled specially and we have to transform some
# definitions to look at the correct directory.
run_stuff_before="build"
run_stuff_before_build_file="$PKGFS_TEMPLATESDIR/perl-runstuff-before-build.sh"
run_stuff_after="install"
run_stuff_after_install_file="$PKGFS_TEMPLATESDIR/perl-runstuff-after-install.sh"

View file

@ -24,9 +24,5 @@ long_desc="
This package contains the core database of common types and the
update-mime-database command used to extend it."
# Fix hardcoded mime-info database PATH.
run_stuff_before="build"
run_stuff_before_build_file="$PKGFS_TEMPLATESDIR/$pkgname-runstuff-before-build.sh"
# Update shared-mime-info database file.
postinstall_helpers="update-mimedb.sh"

View file

@ -18,11 +18,3 @@ long_desc="
different entities. They can, for example, map public identifiers to
local files or URIs. This allows you to tell the parser where to look
for entities without having to modify the original document source."
# Prepare and install the catalogs.
run_stuff_after="install"
run_stuff_after_install_file="
$PKGFS_TEMPLATESDIR/$pkgname-runstuff-after-install.sh"
run_stuff_before="install"
run_stuff_before_install_file="
$PKGFS_TEMPLATESDIR/$pkgname-runstuff-before-install.sh"