From 9a127d8ed4a43009f93b7e0e2ee60dc07034801d Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Mon, 2 May 2011 10:38:29 +1000 Subject: Update PKGBUILD example Add quotes around $srcdir/$pkgdir (FS#23960) and use a package() function. Signed-off-by: Allan McRae Signed-off-by: Dan McGee --- doc/PKGBUILD-example.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/doc/PKGBUILD-example.txt b/doc/PKGBUILD-example.txt index 99fd8c24..238c0f40 100644 --- a/doc/PKGBUILD-example.txt +++ b/doc/PKGBUILD-example.txt @@ -13,8 +13,12 @@ source=(ftp://ftp.gnu.org/gnu/$pkgname/$pkgname-$pkgver.tar.gz) md5sums=('ee5ae84d115f051d87fcaaef3b4ae782') build() { - cd $srcdir/$pkgname-$pkgver + cd "$srcdir"/$pkgname-$pkgver ./configure --prefix=/usr make - make prefix=$pkgdir/usr install +} + +package() { + cd "$srcdir"/$pkgname-$pkgver + make prefix="$pkgdir"/usr install } -- cgit v1.2.3-70-g09d2 From 8fd9037cfd8836db7dd35ba0e8825ba86c4e4688 Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Mon, 2 May 2011 10:33:22 +1000 Subject: makepkg: quote variable that may contain spaces Prevents failures when $PKGDEST contains spaces (FS#24002) Patch-by: Sebastien Duthil Signed-off-by: Allan McRae Signed-off-by: Dan McGee --- scripts/makepkg.sh.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 69922c99..70dd456a 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -1076,7 +1076,7 @@ create_package() { *tar.bz2) bzip2 -c -f ;; *tar.xz) xz -c -z - ;; *tar) cat ;; - esac > ${pkg_file} || ret=$? + esac > "${pkg_file}" || ret=$? shopt -u nullglob shopt -u -o pipefail -- cgit v1.2.3-70-g09d2