summaryrefslogtreecommitdiff
path: root/~emulatorman/jitsi-stable/PKGBUILD
blob: 1b9ff60f1a8a46cd076e6e269a6b5eb5cc7967f9 (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
# Maintainer: xduugu
# Contributor: Ananda Samaddar ananda@samaddar.co.uk
# Contributor: Xavion <Xavion (dot) 0 (at) Gmail (dot) com>
# Contributor: atommix aka Aleks Lifey <Aleks.Lifey@gmail.com>
# Contributor: Keshav P R <(skodabenz) (aatt) (rocketmail) (ddoott) (ccoomm)>
# Contributor (Parabola): André Silva <andre.paulista@adinet.com.uy>

_pkgname=jitsi
pkgname=$_pkgname-stable
pkgver=1.0.3967
pkgrel=1
pkgdesc="An audio/video/chat communicator that supports protocols such as SIP and XMPP/Jabber"
arch=('i686' 'x86_64')
url="http://jitsi.org"
license=('LGPL')
depends=('java-runtime')
makedepends=('apache-ant' 'java-environment')
provides=("$_pkgname=$pkver")
conflicts=("$_pkgname")
options=(!strip !emptydirs zipman !libtool docs)
source=("http://download.jitsi.org/jitsi/src/jitsi-src-1.0-build.${pkgver##*.}.zip"
        $_pkgname.{desktop,sh})
md5sums=('0fb7aaaad551177c3037ae570ca2f2e1'
         '5923eeca35823f8ef1e416a9a6fc0fac'
         '55fe144bbf19283e7ec5d7bd3228cf5b')
sha256sums=('cfc918f5b1c5890f10e3c0861cd51432ce33baa09a0a98068e51fbd58a05c46d'
            '770132b617d94ed468e9592b991ceac10eb3e03e7198b8f5f2f05918f7db4302'
            '98027ddaa1ebfe948fa49f6e57ab0d2c866d5e7c37873e30638b86223a2a15e9')

# uncomment to get the latest stable release; you have to adjust/skip checksums
#source[0]=http://download.jitsi.org/jitsi/src/$(curl -Ss 'http://download.jitsi.org/jitsi/src/' | grep -om1 'jitsi-src[^"<]\+[0-9].zip' | head -1)
#pkgver=$(sed -r 's/[^0-9]*([0-9.]+).*(.build.([0-9]+))\..*/\1.\3/' <<<${source[0]})

build() {
	cd "$srcdir/$_pkgname"

	# append the build revision to the jitsi version
	sed -i "s/0\.build\.by\.SVN/build.${pkgver##*.}/" src/net/java/sip/communicator/impl/version/NightlyBuildID.java

	. /etc/profile.d/apache-ant.sh
	ant rebuild
}

package() {
	cd "$srcdir/$_pkgname"

	find lib/ lib/bundle/ -maxdepth 1 -type f \
		-exec install -Dm644 {} "$pkgdir/usr/lib/$_pkgname/"{} \;
	find lib/os-specific/linux/ -maxdepth 1 -type f \
		-execdir install -Dm644 {} "$pkgdir/usr/lib/$_pkgname/lib/"{} \;

	shopt -sq extglob
	find lib/native/linux$(sed 's/_/-/g' <<<${CARCH/#*(i?86|x86)/})/ -maxdepth 1 -type f \
		-execdir install -Dm644 {} "$pkgdir/usr/lib/$_pkgname/lib/native/"{} \;

	find sc-bundles/{,os-specific/linux/} -maxdepth 1 -type f \
		-execdir install -Dm644 {} "$pkgdir/usr/lib/$_pkgname/sc-bundles/"{} \;

	install -Dm755 "$srcdir/$_pkgname.sh"      "$pkgdir/usr/bin/$_pkgname"
	install -Dm644 "$srcdir/$_pkgname.desktop" "$pkgdir/usr/share/applications/$_pkgname.desktop"

	local _file
	for _file in resources/install/debian/*.{svg,xpm}; do
		install -Dm644 "$_file" "$pkgdir/usr/share/pixmaps/$_pkgname${_file/*sip-communicator/}"
	done
}