aboutsummaryrefslogtreecommitdiffstats
path: root/main/acf-provisioning-polycom/APKBUILD
blob: eb4c400d32b632cfad54cb051ef824bdde00a1ed (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
# Contributor: Ted Trask <ttrask01@yahoo.com>
# Maintainer: Ted Trask <ttrask01@yahoo.com>
pkgname=acf-provisioning-polycom
pkgver=4.0.8
pkgrel=0
pkgdesc="Files for provisioning Polycom IP phones"
url="http://www.polycom.com/products/voice/index.html"
arch="noarch"
license="AS IS"
depends=""
makedepends=""
source="http://downloads.polycom.com/voice/voip/uc/Polycom_UC_Software_4_0_8_release_sig_split.zip
http://downloads.polycom.com/voice/voip/uc/SoundPoint_IP_BootROM_4_4_0B_Upgrader_release_sig.zip
000000000000.cfg.patch
000000000000-phone.cfg
000000000000-web.cfg
000000000000-directory.xml"
subpackages=""

_builddir="$srcdir/"

link_dupes() {
	local dir=
	local old_pwd="$PWD"
	for dir; do
		echo "Creating links of duplicate files at '$dir'"
		cd "$dir" || break
		prevsum=
		prevfile=
		md5sum *.ld | sort | while read sum file; do
			if [ "$sum" = "$prevsum" ]; then
				echo "* Creating link of '$file'"
				rm $file && ln -s $prevfile $file || break
			else
				prevsum=$sum
				prevfile=$file
			fi
		done || break
	done
	local ret=$?
	cd "$old_pwd"
	return $ret
}

prepare() {
	local i
	cd "$_builddir"
	sed -i -e 's/\r//' 000000000000.cfg
	for i in $source; do
		case $i in
		*.patch) msg "Applying ${i}"; patch -p1 -i $i || return 1;;
		esac
	done
}

package() {
	cd "$_builddir"
	link_dupes "$_builddir" || return 1
	mkdir -p "$pkgdir"/var/www/provisioning/htdocs/Polycom
	mkdir -p "$pkgdir"/var/www/provisioning/htdocs/log
	echo "$pkgname-$pkgver-r$pkgrel" > "$pkgdir"/var/www/provisioning/htdocs/Polycom/package-version
	cp -r *.ld *.wav SoundPointIPLocalization 000000000000.cfg "$pkgdir"/var/www/provisioning/htdocs
	cp 000000000000-directory.xml 000000000000-phone.cfg 000000000000-web.cfg "$pkgdir"/var/www/provisioning/htdocs/Polycom
}

md5sums="e8ef63fdfd7ef72fc218d4658d0b015d  Polycom_UC_Software_4_0_8_release_sig_split.zip
b5ac28a1b4ede82fca226675c0b6981d  SoundPoint_IP_BootROM_4_4_0B_Upgrader_release_sig.zip
4c1fb1bc907a5039f83380052877350c  000000000000.cfg.patch
2c32486b7c9d692326fd6270664eac01  000000000000-phone.cfg
2c32486b7c9d692326fd6270664eac01  000000000000-web.cfg
4a6ff93b944a710da0c3eb99938f42cc  000000000000-directory.xml"
sha256sums="c24178962cac12fa6743499b16f9fbbb91eaeafcf45fd39ae975f56932be6387  Polycom_UC_Software_4_0_8_release_sig_split.zip
4565248f354321901323d01b1aeed8bb6e00beedc331a3f7545cbae83d194113  SoundPoint_IP_BootROM_4_4_0B_Upgrader_release_sig.zip
7cbc6cdafd6fefcf3630eab6b8012a94f6b5921752fcffb3c55f07fec8c205a3  000000000000.cfg.patch
e2f3dcd842d6eb44a98140e7fb60487ca70e519d5d09872a54ce1372d5a432b4  000000000000-phone.cfg
e2f3dcd842d6eb44a98140e7fb60487ca70e519d5d09872a54ce1372d5a432b4  000000000000-web.cfg
875f5bbec057d29508bcd671a203d8e2852cd959aeaeb937443cedbe824e0a41  000000000000-directory.xml"
sha512sums="98219414fea55ca7946ca1917507a18f19e20336928f52463690b77498ee76a4be088e548f24795ebbff37cf877ef36bfd7bcc7f533263d85c3da6eb89a59d21  Polycom_UC_Software_4_0_8_release_sig_split.zip
b624b6618af41c21de016ead0746be9702834632e32de1bd62a5b47ad2308f0fb9def72fcfb35259731b7431d00a958e9c4ad3ad7d7257a29bba9e976dc70c4c  SoundPoint_IP_BootROM_4_4_0B_Upgrader_release_sig.zip
20bfb505c1d4656868921ca4304da52bcbe8ee6d2c91377e796de4c4c0432299ae5d2c1f1479e3684d4ff5c2decc070370dcd564b501276fc528461485552ba9  000000000000.cfg.patch
db2da0f4c393bdea773f3e5a7daa581a58caca738538db6153b223383176aae30e2081c198291d78c44eddd446a1cab9cffef78646360847ce4955c59f288300  000000000000-phone.cfg
db2da0f4c393bdea773f3e5a7daa581a58caca738538db6153b223383176aae30e2081c198291d78c44eddd446a1cab9cffef78646360847ce4955c59f288300  000000000000-web.cfg
9adc73d02aa4f545aca893c335284d77099c56fcc17a48f61003ede8713e96aeb8f467896f4dfbf7db67255cc3d60faf353b76ab86c5881d0ba884d1c0acffb3  000000000000-directory.xml"