aboutsummaryrefslogtreecommitdiffstats
path: root/main/sqsh/APKBUILD
blob: 11d9ccb907d8a2aba71aa900e8a5393aa3e8ec33 (plain)
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
56
57
58
59
# Contributor: Ashton Spencer <aspec.451@gmail.com>
# Maintainer: Jeff Bilyk <jbilyk@gmail.com>
pkgname=sqsh
pkgver=2.5.16.1
case $pkgver in
*.*.*.*) _v=${pkgver%.*.*};;
*.*.*) _v=${pkgver%.*};;
*) _v=$pkgver;;
esac
pkgrel=3
pkgdesc="Sybase iSQL replacement"
url="http://www.sqsh.org"
arch="all"
license="GPL"
depends=""
depends_dev=""
makedepends="freetds-dev readline-dev ncurses-dev"
install=""
subpackages="$pkgname-doc"
source="https://downloads.sourceforge.net/project/sqsh/sqsh/sqsh-$_v/sqsh-$pkgver.tgz
	tds-version.patch
	datetime.patch
	"

builddir="$srcdir"/$pkgname-$_v
prepare() {
	local i
	cd "$builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

build() {
	cd "$builddir"
	SYBASE=/usr
	export SYBASE
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/doc \
		--with-readline \
		|| return 1
	make || return 1
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install || return 1
	make DESTDIR="$pkgdir" install.man || return 1
}

sha512sums="d011d413f5a21059e1b043c75f0a15ea29d10972b59ea980ebcb010b1b0e16eb377a66d21ba4f3ea4433c4deac5ba80b1af7e858129a306a6611de32da48981c  sqsh-2.5.16.1.tgz
f73696f016e6a0f3c8f4020ba79b7dc9618c1958872dbb531e31c1b2709d7d7af227a3206b466bda932d8319443c838f6b05042b79b50560a9de842502274798  tds-version.patch
6b424d995755d07fab6986a0594350e3d045c36fd4852f28608dee918d1052e0ec8e92b8758347c18f39a2eefa42a8421d44d54c799386a533a606b6b4802352  datetime.patch"