diff --git a/pkgfs.sh b/pkgfs.sh index 7a3d73c32c7..d739ef9a246 100755 --- a/pkgfs.sh +++ b/pkgfs.sh @@ -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. diff --git a/templates/libpciaccess.tmpl b/templates/libpciaccess.tmpl index 006c8b5490d..535ced17498 100755 --- a/templates/libpciaccess.tmpl +++ b/templates/libpciaccess.tmpl @@ -11,8 +11,3 @@ short_desc="PCI Access from Modular X.org" maintainer="Juan RP " checksum=5d972b5398f96bb94b2dab7f16613ad998887ece long_desc="..." - -# NetBSD support. -run_stuff_before="configure" -run_stuff_before_configure_file=" -$PKGFS_TEMPLATESDIR/$pkgname-runstuff-before-configure.sh" diff --git a/templates/libpng.tmpl b/templates/libpng.tmpl index 003e200f09e..41fec38534f 100755 --- a/templates/libpng.tmpl +++ b/templates/libpng.tmpl @@ -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" diff --git a/templates/mng.tmpl b/templates/mng.tmpl index 3ae31bbe171..7b67bedb28c 100755 --- a/templates/mng.tmpl +++ b/templates/mng.tmpl @@ -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" diff --git a/templates/perl.tmpl b/templates/perl.tmpl index df3465b0c94..a7c27559c6a 100755 --- a/templates/perl.tmpl +++ b/templates/perl.tmpl @@ -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" diff --git a/templates/shared-mime-info.tmpl b/templates/shared-mime-info.tmpl index e7c325fd93a..e1d0bd83742 100755 --- a/templates/shared-mime-info.tmpl +++ b/templates/shared-mime-info.tmpl @@ -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" diff --git a/templates/xmlcatmgr.tmpl b/templates/xmlcatmgr.tmpl index 4a37ca2d7f4..b3ab72db0d0 100755 --- a/templates/xmlcatmgr.tmpl +++ b/templates/xmlcatmgr.tmpl @@ -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"