[arch-commits] Commit in (4 files)
George Rawlinson
grawlinson at gemini.archlinux.org
Wed Jun 29 08:07:57 UTC 2022
Date: Wednesday, June 29, 2022 @ 08:07:56
Author: grawlinson
Revision: 1239901
addpkg: pgformatter 5.2-3
Added:
pgformatter/
pgformatter/repos/
pgformatter/trunk/
pgformatter/trunk/PKGBUILD
----------+
PKGBUILD | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 56 insertions(+)
Added: pgformatter/trunk/PKGBUILD
===================================================================
--- pgformatter/trunk/PKGBUILD (rev 0)
+++ pgformatter/trunk/PKGBUILD 2022-06-29 08:07:56 UTC (rev 1239901)
@@ -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