diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2017-11-04 21:09:14 +0100 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2017-11-04 23:29:17 +0100 |
commit | e5c04a4cf2ccf85077fafd6eb3963debf3e460c8 (patch) | |
tree | 5011b56a216739e0256d7b1149c2ea691f82e3e8 /main/postgresql/APKBUILD | |
parent | f7805e8850a0183df538cba1edbd696567dd81ca (diff) | |
download | aports-e5c04a4cf2ccf85077fafd6eb3963debf3e460c8.tar.bz2 aports-e5c04a4cf2ccf85077fafd6eb3963debf3e460c8.tar.xz |
main/postgresql: refactor abuild
Diffstat (limited to 'main/postgresql/APKBUILD')
-rw-r--r-- | main/postgresql/APKBUILD | 74 |
1 files changed, 33 insertions, 41 deletions
diff --git a/main/postgresql/APKBUILD b/main/postgresql/APKBUILD index 4b6f548859..80d8852905 100644 --- a/main/postgresql/APKBUILD +++ b/main/postgresql/APKBUILD @@ -123,37 +123,32 @@ package() { make DESTDIR="$pkgdir" install install-docs + cd "$pkgdir" + install -d -m750 -o postgres -g postgres \ - "$pkgdir"/var/lib/postgresql \ - "$pkgdir"/var/log/$pkgname - - install -D -m755 postgresql.initd \ - "$pkgdir"/etc/init.d/postgresql - install -D -m644 postgresql.confd \ - "$pkgdir"/etc/conf.d/postgresql - - install -D -m755 "$srcdir"/pg-restore.initd \ - "$pkgdir"/etc/init.d/pg-restore - install -D -m644 "$srcdir"/pg-restore.confd \ - "$pkgdir"/etc/conf.d/pg-restore + ./var/lib/postgresql \ + ./var/log/$pkgname + + install -D -m755 "$builddir"/postgresql.initd ./etc/init.d/postgresql + install -D -m644 "$builddir"/postgresql.confd ./etc/conf.d/postgresql + + install -D -m755 "$srcdir"/pg-restore.initd ./etc/init.d/pg-restore + install -D -m644 "$srcdir"/pg-restore.confd ./etc/conf.d/pg-restore } dev() { default_dev - mkdir -p "$subpkgdir"/usr/bin "$subpkgdir"/usr/lib/postgresql - mv "$pkgdir"/usr/bin/pg_config \ - "$pkgdir"/usr/bin/ecpg \ - "$subpkgdir"/usr/bin/ - mv "$pkgdir"/usr/lib/postgresql/pgxs "$subpkgdir"/usr/lib/postgresql/ + _submv usr/bin/pg_config \ + usr/bin/ecpg \ + usr/lib/postgresql/pgxs } libpq() { pkgdesc="PostgreSQL libraries" depends="" - mkdir -p "$subpkgdir"/usr/lib - mv "$pkgdir"/usr/lib/libpq.so.* "$subpkgdir"/usr/lib/ + _submv usr/lib/libpq.so.* } libs() { @@ -165,25 +160,25 @@ client() { pkgdesc="PostgreSQL client" depends="" + cd "$pkgdir"/usr/bin mkdir -p "$subpkgdir"/usr/bin - mv \ - "$pkgdir"/usr/bin/clusterdb \ - "$pkgdir"/usr/bin/createdb \ - "$pkgdir"/usr/bin/createlang \ - "$pkgdir"/usr/bin/createuser \ - "$pkgdir"/usr/bin/dropdb \ - "$pkgdir"/usr/bin/droplang \ - "$pkgdir"/usr/bin/dropuser \ - "$pkgdir"/usr/bin/pg_basebackup \ - "$pkgdir"/usr/bin/pg_dump \ - "$pkgdir"/usr/bin/pg_dumpall \ - "$pkgdir"/usr/bin/pg_isready \ - "$pkgdir"/usr/bin/pg_receivexlog \ - "$pkgdir"/usr/bin/pg_recvlogical \ - "$pkgdir"/usr/bin/pg_restore \ - "$pkgdir"/usr/bin/psql \ - "$pkgdir"/usr/bin/reindexdb \ - "$pkgdir"/usr/bin/vacuumdb \ + mv clusterdb \ + createdb \ + createlang \ + createuser \ + dropdb \ + droplang \ + dropuser \ + pg_basebackup \ + pg_dump \ + pg_dumpall \ + pg_isready \ + pg_receivexlog \ + pg_recvlogical \ + pg_restore \ + psql \ + reindexdb \ + vacuumdb \ "$subpkgdir"/usr/bin/ } @@ -210,7 +205,6 @@ pltcl() { pkgdesc="PL/Tcl procedural language for PostgreSQL" depends="pgtcl" - cd "$pkgdir" _submv usr/bin/pltcl* \ usr/lib/postgresql/pltcl.so \ usr/share/postgresql/unknown.pltcl \ @@ -224,7 +218,6 @@ plperl() { pkgdesc="PL/Perl procedural language for PostgreSQL" depends="" - cd "$pkgdir" _submv usr/lib/postgresql/plperl.so \ usr/share/postgresql/extension/plperl* } @@ -240,7 +233,6 @@ plpython2() { pkgdesc="PL/Python2 procedural language for PostgreSQL" depends="python2" - cd "$pkgdir" _submv usr/lib/postgresql/plpython2.so \ usr/share/postgresql/extension/plpython* } @@ -299,7 +291,7 @@ _run_tests() { _submv() { local path; for path in "$@"; do mkdir -p "$subpkgdir/${path%/*}" - mv "$path" "$subpkgdir/$path" + mv "$pkgdir"/$path "$subpkgdir"/${path%/*}/ done } |