aboutsummaryrefslogtreecommitdiffstats
path: root/main/pgtcl/APKBUILD
blob: 98eef9648348d92d131d48a80185e7e01321e9af (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# Contributor: G.J.R. Timmer <gjr.timmer@gmail.com>
# Maintainer: G.J.R. Timmer <gjr.timmer@gmail.com>
pkgname=pgtcl
_pkgname=Pgtcl
pkgver=2.1.0
pkgrel=0
pkgdesc="Tcl client side interface to PostgreSQL (libpgtcl)"
url="https://flightaware.github.io/Pgtcl/"
arch="all"
license="BSD"
makedepends="postgresql-dev tcl-dev docbook2x"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/flightaware/$_pkgname/archive/v$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"

prepare() {
	default_prepare || return 1

	cd "$builddir"
	sed -i -e 's/docbook2man/docbook2x-man/g' \
		-e 's|sh \./fix-fi\.sh man/\*||g' \
		doc/Makefile
}

build() {
	cd "$builddir"

	local x64_flags
	case "$CARCH" in
	aarch64 | x86_64) x64_flags="--enable-64bit";;
	esac

	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--mandir=/usr/share/man \
		--disable-rpath \
		--enable-threads \
		$x64_flags \
		|| return 1
	make || return 1
}

package() {
	cd "$builddir"

	make DESTDIR="$pkgdir" install || return 1
	make -C doc DESTDIR="$pkgdir" all || return 1

	# Remove empty directories.
	rmdir "$pkgdir"/usr/bin "$pkgdir"/usr/include
}

sha512sums="895f81548d5fde128b258cfb9cad732f539089a7c89bad08b7bc8a229d7f2ecdb9b31a374ddb3fb392ed3e20ba45cca47c2dccfa6ab86e617177f7021d08b3b3  pgtcl-2.1.0.tar.gz"