aboutsummaryrefslogtreecommitdiffstats
path: root/unmaintained/thunderbird/APKBUILD
blob: ae94b46dbae2465e438df781eb1f5fc178cf0df2 (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
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
98
99
100
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=thunderbird
pkgver=8.0
_pkgver=$pkgver
_xulver=8.0
pkgrel=0
pkgdesc="Mozilla Thunderbird mail/newsgroup client"
url="http://www.mozilla.org/projects/thunderbird/"
arch="all"
license="MPLv1.1 or GPLv2+ or LGPLv2+"
depends="xulrunner>=${_xulver} zip"
makedepends="
	alsa-lib-dev
	cairo-dev
	curl-dev
	dbus-glib-dev
	gtk+2.0-dev
	hicolor-icon-theme
	hunspell-dev
	libevent-dev
	libidl-dev
	libnotify-dev
	libvpx-dev
	libx11-dev
	libxext-dev
	libxt-dev
	mesa-dev
	nspr-dev
	nss-dev
	python
	sqlite-dev
	startup-notification-dev
	wireless-tools-dev
	xulrunner-dev>=${_xulver}
	yasm
	"
install=""
subpackages=""
source="http://releases.mozilla.org/pub/mozilla.org/${pkgname}/releases/${pkgver}/source/${pkgname}-${_pkgver}.source.tar.bz2
	mozconfig
	thunderbird.desktop
	xpt.py.patch
	jemalloc-libs.patch
	"
#	mozalloc_usable_size.patch
#	finite.patch

_builddir="${srcdir}/comm-release"
_mozappdir=/usr/lib/thunderbird-$pkgver

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

	cp "${srcdir}/mozconfig" .mozconfig || return 1
	echo "ac_add_options --with-libxul-sdk=$(pkg-config --variable=sdkdir libxul)" >> .mozconfig
}

build() {
	cd "$_builddir"

	# mozilla's buildsystem is on drugs
	export CFLAGS="$(echo $CFLAGS | sed -e 's/-Wall//' -e 's/-fexceptions/-fno-exceptions/g')"
	export CXXFLAGS="$CFLAGS -std=gnu++0x"

#	export LDFLAGS="-Wl,-rpath,${_mozappdir}"
	make -j1 -f client.mk build \
		STRIP="/bin/true" \
		MOZ_MAKE_FLAGS="$MAKEOPTS" || return 1
}

package() {
	cd "$_builddir"
	make -j1 DESTDIR="$pkgdir" -f client.mk install || return 1

	for i in 16x16 22x22 24x24 32x32 48x48 256x256; do
		install -Dm644 other-licenses/branding/thunderbird/mailicon${i/x*/}.png \
		"$pkgdir/usr/share/icons/hicolor/$i/apps/thunderbird.png"
	done

	install -Dm644 "$srcdir"/$pkgname.desktop \
		"$pkgdir"/usr/share/applications/$pkgname.desktop || return 1

	# xulrunner stub launcher has changed to using a symlink overlay...
	# go figure
	ln -sf /usr/lib/xulrunner-${_xulver} ${pkgdir}/$_mozappdir/xulrunner
}

md5sums="332f60036aebdce7dec6ee2b1af4941d  thunderbird-8.0.source.tar.bz2
ca98c2bf1017b33e19dae22fdcef2e73  mozconfig
af3e5b344d2edf1c7d61bb0a5a96de9a  thunderbird.desktop
c872ba4217937bbbb6d2ab469a3bf95a  xpt.py.patch
7f4d92ea8800a34b3c23569c7993f092  jemalloc-libs.patch"