[arch-commits] Commit in pgformatter/repos (community-any community-any/PKGBUILD)

George Rawlinson grawlinson at gemini.archlinux.org
Wed Jun 29 08:08:33 UTC 2022


    Date: Wednesday, June 29, 2022 @ 08:08:33
  Author: grawlinson
Revision: 1239904

archrelease: copy trunk to community-any

Added:
  pgformatter/repos/community-any/
  pgformatter/repos/community-any/PKGBUILD
    (from rev 1239902, pgformatter/trunk/PKGBUILD)

----------+
 PKGBUILD |   56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 56 insertions(+)

Copied: pgformatter/repos/community-any/PKGBUILD (from rev 1239902, pgformatter/trunk/PKGBUILD)
===================================================================
--- community-any/PKGBUILD	                        (rev 0)
+++ community-any/PKGBUILD	2022-06-29 08:08:33 UTC (rev 1239904)
@@ -0,0 +1,56 @@
+# Maintainer: George Rawlinson <grawlinson at archlinux.org>
+# Contributor: Marco44 (Marc Cousin) <cousinmarc at gmail dot com>
+
+pkgname=pgformatter
+pkgver=5.2
+pkgrel=3
+pkgdesc='A PostgreSQL SQL syntax beautifier'
+arch=('any')
+url='https://github.com/darold/pgformatter'
+license=('BSD')
+depends=('perl')
+makedepends=('git')
+_commit='fe954483a06ebaecbc324ef1dc9e6f58d219fd4a'
+source=("$pkgname::git+$url#commit=$_commit")
+b2sums=('SKIP')
+
+pkgver() {
+  cd "$pkgname"
+
+  git describe --tags | sed 's/^v//'
+}
+
+build() {
+  cd "$pkgname"
+
+  unset PERL5LIB PERL_MM_OPT PERL_LOCAL_LIB_ROOT
+  export PERL_MM_USE_DEFAULT=1 PERL_AUTOINSTALL=--skipdeps
+
+  perl Makefile.PL
+  make
+}
+
+check() {
+  cd "$pkgname"
+
+  unset PERL5LIB PERL_MM_OPT PERL_LOCAL_LIB_ROOT
+  export PERL_MM_USE_DEFAULT=1
+
+  make test
+}
+
+package() {
+  cd "$pkgname"
+
+  unset PERL5LIB PERL_MM_OPT PERL_LOCAL_LIB_ROOT
+  make install INSTALLDIRS=vendor DESTDIR="$pkgdir"
+
+  # provide symlink in /usr/bin for non-interactive shells
+  ln -sf /usr/bin/vendor_perl/pg_format "$pkgdir/usr/bin/pg_format"
+
+  # delete usr/lib as it's empty ...
+  rm -rf "$pkgdir/usr/lib"
+
+  # license
+  install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE
+}



More information about the arch-commits mailing list