diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2017-01-28 14:12:25 +0100 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2017-02-07 11:53:35 +0100 |
commit | e8cea42c3f1e997adb08b468acd54d2f76d84d01 (patch) | |
tree | 54164c1b9293c637bab9dd7c5a9b5cdf993274b5 /main/postgresql | |
parent | 9de1a651d6a361e0776574a4e677c339df775d73 (diff) | |
download | aports-e8cea42c3f1e997adb08b468acd54d2f76d84d01.tar.bz2 aports-e8cea42c3f1e997adb08b468acd54d2f76d84d01.tar.xz |
main/postgresql: DRY moving files
Diffstat (limited to 'main/postgresql')
-rw-r--r-- | main/postgresql/APKBUILD | 43 |
1 files changed, 20 insertions, 23 deletions
diff --git a/main/postgresql/APKBUILD b/main/postgresql/APKBUILD index 1470172ca0..c21fd54ef5 100644 --- a/main/postgresql/APKBUILD +++ b/main/postgresql/APKBUILD @@ -136,8 +136,8 @@ client() { } contrib() { - depends="" pkgdesc="Extension modules distributed with PostgreSQL" + depends="" cd "$builddir" make DESTDIR="$subpkgdir" -C contrib install || return 1 @@ -151,22 +151,18 @@ plperl() { depends="" pkgdesc="PL/Perl procedural language for PostgreSQL" - mkdir -p "$subpkgdir"/usr/lib/postgresql - mv "$pkgdir"/usr/lib/postgresql/plperl.so "$subpkgdir"/usr/lib/postgresql/plperl.so - - mkdir -p "$subpkgdir"/usr/share/postgresql/extension - mv "$pkgdir"/usr/share/postgresql/extension/plperl* "$subpkgdir"/usr/share/postgresql/extension/ + cd "$pkgdir" + _submv usr/lib/postgresql/plperl.so \ + usr/share/postgresql/extension/plperl* } plpython2() { - depends="" pkgdesc="PL/Python2 procedural language for PostgreSQL" + depends="" - mkdir -p "$subpkgdir"/usr/lib/postgresql - mv "$pkgdir"/usr/lib/postgresql/plpython2.so "$subpkgdir"/usr/lib/postgresql/plpython2.so - - mkdir -p "$subpkgdir"/usr/share/postgresql/extension - mv "$pkgdir"/usr/share/postgresql/extension/plpython* "$subpkgdir"/usr/share/postgresql/extension/ + cd "$pkgdir" + _submv usr/lib/postgresql/plpython2.so \ + usr/share/postgresql/extension/plpython* } plpython3() { @@ -179,20 +175,21 @@ plpython3() { } pltcl() { - depends="pgtcl" pkgdesc="PL/Tcl procedural language for PostgreSQL" + depends="pgtcl" - mkdir -p "$subpkgdir"/usr/bin - mv "$pkgdir"/usr/bin/pltcl* "$subpkgdir"/usr/bin - - mkdir -p "$subpkgdir"/usr/lib/postgresql - mv "$pkgdir"/usr/lib/postgresql/pltcl.so "$subpkgdir"/usr/lib/postgresql/pltcl.so - - mkdir -p "$subpkgdir"/usr/share/postgresql - mv "$pkgdir"/usr/share/postgresql/unknown.pltcl "$subpkgdir"/usr/share/postgresql/unknown.pltcl + cd "$pkgdir" + _submv usr/bin/pltcl* \ + usr/lib/postgresql/pltcl.so \ + usr/share/postgresql/unknown.pltcl \ + usr/share/postgresql/extension/pltcl* +} - mkdir -p "$subpkgdir"/usr/share/postgresql/extension - mv "$pkgdir"/usr/share/postgresql/extension/pltcl* "$subpkgdir"/usr/share/postgresql/extension/ +_submv() { + local path; for path in "$@"; do + mkdir -p "$subpkgdir/${path%/*}" + mv "$path" "$subpkgdir/$path" || return 1 + done } md5sums="92ae6d7cdf18e648b3c22d0aa015565d postgresql-9.6.1.tar.bz2 |