Date: Sunday, September 29, 2013 @ 18:38:47 Author: dreisner Revision: 195265
upgpkg: time 1.7-7 - cleanup PKGBUILD, use prepare, fix build with newer toolchains Modified: time/trunk/PKGBUILD time/trunk/time.install --------------+ PKGBUILD | 34 +++++++++++++++++++++------------- time.install | 16 +++++++++------- 2 files changed, 30 insertions(+), 20 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2013-09-29 16:13:33 UTC (rev 195264) +++ PKGBUILD 2013-09-29 16:38:47 UTC (rev 195265) @@ -1,11 +1,12 @@ # $Id$ -# Maintainer: Stéphane Gaudreault <[email protected]> +# Maintainer: Dave Reisner <[email protected]> +# Contributor: Stéphane Gaudreault <[email protected]> # Contributor: Daniel J Griffiths <[email protected]> # Contributor: damir <[email protected]> pkgname=time pkgver=1.7 -pkgrel=6 +pkgrel=7 pkgdesc="Utility for monitoring a program's use of system resources" arch=('i686' 'x86_64') url="http://www.gnu.org/directory/time.html" @@ -19,22 +20,29 @@ 'fff80e05dd41f0a59bb1f49d1c6e581d5e8e92e5' 'b2a909e1d92f7af1bc99a4524ad84d467ed79a06') +prepare() { + cd "$pkgname-$pkgver" -build() { - cd "${srcdir}/${pkgname}-${pkgver}" - - # cf https://bugzilla.redhat.com/show_bug.cgi?id=527276 - patch -Np1 -i ../time-1.7-Recompute-CPU-usage-at-microsecond-level.patch + # cf https://bugzilla.redhat.com/show_bug.cgi?id=527276 + patch -Np1 < "$srcdir"/time-1.7-Recompute-CPU-usage-at-microsecond-level.patch - # cf https://bugzilla.redhat.com/show_bug.cgi?id=702826 - patch -Np1 -i ../time-1.7-ru_maxrss-is-in-kilobytes-on-Linux.patch + # cf https://bugzilla.redhat.com/show_bug.cgi?id=702826 + patch -Np1 < "$srcdir"/time-1.7-ru_maxrss-is-in-kilobytes-on-Linux.patch - ./configure --prefix=/usr --infodir=/usr/share/info - make + # rebuild the ancient autoconf setup to fix a variety of build issues + # surrounding missing/incorrect includes. + autoreconf -fisv } +build() { + cd "$pkgname-$pkgver" + + ./configure --prefix=/usr --infodir=/usr/share/info + make +} + package() { - cd "${srcdir}/${pkgname}-${pkgver}" + cd "$pkgname-$pkgver" - make exec_prefix="${pkgdir}/usr" infodir="${pkgdir}/usr/share/info" install + make exec_prefix="$pkgdir/usr" infodir="$pkgdir/usr/share/info" install } Modified: time.install =================================================================== --- time.install 2013-09-29 16:13:33 UTC (rev 195264) +++ time.install 2013-09-29 16:38:47 UTC (rev 195265) @@ -1,20 +1,22 @@ +#!/bin/bash + infodir=/usr/share/info filelist=(time.info.gz) post_install() { - [ -x usr/bin/install-info ] || return 0 - for file in ${filelist[@]}; do - install-info $infodir/$file $infodir/dir 2> /dev/null + [[ -x usr/bin/install-info ]] || return 0 + for file in "${filelist[@]}"; do + install-info "$infodir/$file" "$infodir/dir" 2>/dev/null done } post_upgrade() { - post_install $1 + post_install "$1" } pre_remove() { - [ -x usr/bin/install-info ] || return 0 - for file in ${filelist[@]}; do - install-info --delete $infodir/$file $infodir/dir 2> /dev/null + [[ -x usr/bin/install-info ]] || return 0 + for file in "${filelist[@]}"; do + install-info --delete "$infodir/$file" "$infodir/dir" 2>/dev/null done }
