summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarren Ng2020-03-16 00:22:04 +0800
committerDarren Ng2020-03-16 00:54:06 +0800
commit23244ac1c17cb4c5be3bba97383a2972f798ea18 (patch)
treefc7ac5a1e6e3d2306482252633fa0d5340ab0379
downloadaur-23244ac1c17cb4c5be3bba97383a2972f798ea18.tar.gz
init
-rw-r--r--.SRCINFO17
-rw-r--r--.gitignore4
-rw-r--r--PKGBUILD61
3 files changed, 82 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..4cec06294964
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,17 @@
+pkgbase = pgtcl
+ pkgdesc = Tcl client side interface to PostgreSQL (libpgtcl)
+ pkgver = 2.7.1
+ pkgrel = 1
+ url = https://flightaware.github.io/Pgtcl/
+ arch = x86_64
+ license = BSD
+ depends = postgresql>=12.2
+ depends = postgresql-libs>=12.2
+ depends = tcl>=8.6
+ depends = tcl<8.7
+ provides = libpgtcl
+ source = pgtcl-2.7.1.tar.gz::https://github.com/flightaware/Pgtcl/archive/v2.7.1.tar.gz
+ sha1sums = edf384a2bc9ae05b9ffbc69735f7e4064c51a76e
+
+pkgname = pgtcl
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..31d27563afeb
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+*
+!.gitignore
+!PKGBUILD
+!.SRCINFO \ No newline at end of file
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..a4988b5d8b70
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,61 @@
+# Maintainer: Darren Ng <$(base64 --decode <<<'ZGFycmVuMTk5NzA4MTBAZ21haWwuY29tCg==')>
+
+# "Plagiarized" from
+# https://packages.ubuntu.com/source/focal/pgtcl
+# https://git.alpinelinux.org/aports/tree/main/pgtcl/APKBUILD
+# https://github.com/OpenIndiana/oi-userland/blob/oi/hipster/components/tcl/pgtcl/Makefile
+
+_pkgname=Pgtcl
+pkgname=pgtcl
+pkgver=2.7.1
+pkgrel=1
+pkgdesc="Tcl client side interface to PostgreSQL (libpgtcl)"
+arch=("x86_64")
+url="https://flightaware.github.io/Pgtcl/"
+license=("BSD")
+depends=("postgresql>=12.2" "postgresql-libs>=12.2" "tcl>=8.6" "tcl<8.7")
+provides=("libpgtcl")
+source=("$pkgname-$pkgver.tar.gz::https://github.com/flightaware/Pgtcl/archive/v$pkgver.tar.gz")
+sha1sums=("edf384a2bc9ae05b9ffbc69735f7e4064c51a76e")
+
+build() {
+
+ cd "$_pkgname-$pkgver"
+
+ # https://github.com/flightaware/Pgtcl/blob/master/README.Linux
+ autoreconf
+
+ # rpath
+ # https://stackoverflow.com/a/8482308
+
+ # /usr/lib/tclConfig.sh
+
+ ./configure \
+ --prefix=/usr \
+ --mandir=/usr/share/man \
+ --with-tcl=/usr/lib/ \
+ --with-tclinclude=/usr/include/ \
+ --with-postgres-include=/usr/include/postgresql \
+ --with-postgres-lib=/usr/lib/postgresql \
+ --enable-64bit \
+ --enable-threads \
+ --enable-shared \
+ --enable-64bit \
+ --disable-rpath
+
+ make
+
+}
+
+# Test HammerDB w/ pgtcl make'd but not installed
+# https://wiki.tcl-lang.org/page/auto_path
+# https://wiki.tcl-lang.org/page/TCLLIBPATH
+# export LD_LIBRARY_PATH="/home/darren/.cache/yay/pgtcl/Pgtcl-2.7.1/tmp/usr/lib"
+# export TCLLIBPATH="/home/darren/.cache/yay/pgtcl/Pgtcl-2.7.1/tmp/usr/lib"
+
+package() {
+ cd "$_pkgname-$pkgver"
+ make DESTDIR="$pkgdir/" install
+ install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+ rmdir "$pkgdir/usr/bin" || exit 1
+}