aboutsummaryrefslogtreecommitdiffstats
path: root/main/gnokii/APKBUILD
blob: 402381b38d54f6f796b306a1a48daab52e2c4d6d (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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=gnokii
pkgver=0.6.31
pkgrel=3
pkgdesc="Tools and user space driver for use with mobile phones"
url="http://www.gnokii.org/"
arch="all"
license="GPL"
depends=""
subpackages="$pkgname-dev $pkgname-doc $pkgname-libs xgnokii $pkgname-smsd
	$pkgname-smsd-pgsql:pgsql $pkgname-smsd-mysql:mysql
	$pkgname-smsd-sqlite:sqlite $pkgname-lang"

makedepends="gtk+-dev mysql-dev intltool libusb-compat-dev libxpm-dev
	bluez-dev libical-dev postgresql-dev sqlite-dev
	autoconf automake libtool"
source="http://www.gnokii.org/download/gnokii/gnokii-$pkgver.tar.bz2
	gnokii.patch
	xgnokii.patch"

_builddir="$srcdir"/$pkgname-$pkgver
prepare() {
	cd "$_builddir"
	update_config_sub || return 1
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
	autoreconf || return 1
	sed -i 's|cellphone|phone|' xgnokii/xgnokii.desktop.in
}

build() {
	cd "$_builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--enable-security \
		--disable-unix98test \
		--disable-phonet \
		--with-x \
		|| return 1
	make
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install || return 1
	rm "$pkgdir"/usr/lib/*.la \
		"$pkgdir"/usr/lib/smsd/*.la
}

libs() {
	pkgdesc="gnokii shared libraries"
	replaces="libgnokii"
	mkdir -p "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/libgnokii.so.* "$subpkgdir"/usr/lib/
}

xgnokii() {
	pkgdesk="Gtk+ gnokii application"
	mkdir -p "$subpkgdir"/usr/bin
	mv "$pkgdir"/usr/bin/xgnokii "$subpkgdir"/usr/bin/
}

smsd() {
	pkgdesc="SMS Daemon for mobile phones"
	mkdir -p "$subpkgdir"/usr/bin/
	mv "$pkgdir"/usr/bin/smsd "$subpkgdir"/usr/bin/
}

pgsql() {
	pkgdesc="SMSD plugin for PostgreSQL storage backend"
	depends="gnokii-smsd"
	mkdir -p "$subpkgdir"/usr/lib/smsd
	mv "$pkgdir"/usr/lib/smsd/*pq.so "$subpkgdir"/usr/lib/smsd/
}

mysql() {
	pkgdesc="SMSD plugin for MySQL storage backend"
	depends="gnokii-smsd"
	mkdir -p "$subpkgdir"/usr/lib/smsd
	mv "$pkgdir"/usr/lib/smsd/*mysql.so "$subpkgdir"/usr/lib/smsd/
}

sqlite() {
	pkgdesc="SMSD plugin for SQLite storage backend"
	depends="gnokii-smsd"
	mkdir -p "$subpkgdir"/usr/lib/smsd
	mv "$pkgdir"/usr/lib/smsd/*sqlite*.so "$subpkgdir"/usr/lib/smsd/
}
md5sums="d9627f4a1152d3ea7806df4532850d5f  gnokii-0.6.31.tar.bz2
5de7a1c6a59b740df9d24f5c08cea448  gnokii.patch
6b87d13cb012bfdfd3581d89f42a3cff  xgnokii.patch"