# Contributor: Ted Trask # Maintainer: Ted Trask pkgname=acf-provisioning-polycom pkgver=5.3.0 pkgrel=3 pkgdesc="Files for provisioning Polycom IP phones" url="http://www.polycom.com/products/voice/index.html" arch="noarch" license="AS IS" depends="" makedepends="" # Make sure 5.3.0 comes after 4.0.8c so that older files are overwritten source="http://downloads.polycom.com/voice/voip/uc/Polycom_UC_Software_4_0_8_Rev_C_release_sig_split.zip http://downloads.polycom.com/voice/voip/uc/SoundPoint_IP_BootROM_4_4_0B_Upgrader_release_sig.zip http://downloads.polycom.com/voice/voip/uc/Polycom_UC_Software_5_3_0_rts37_release_sig_split.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 VVXLocalization 000000000000.cfg "$pkgdir"/var/www/provisioning/htdocs cp 000000000000-directory.xml 000000000000-phone.cfg 000000000000-web.cfg "$pkgdir"/var/www/provisioning/htdocs/Polycom } # unpack the sources default_unpack() { local u if [ -z "$force" ]; then verify || return 1 initdcheck || return 1 fi mkdir -p "$srcdir" for u in $source; do local s="$SRCDEST/$(filename_from_uri $u)" case "$s" in *.zip) msg "Unpacking $s..." unzip -o "$s" -d "$srcdir" || return 1;; esac done } md5sums="be6364402a35d4fc3f38d817a2bd5117 Polycom_UC_Software_4_0_8_Rev_C_release_sig_split.zip b5ac28a1b4ede82fca226675c0b6981d SoundPoint_IP_BootROM_4_4_0B_Upgrader_release_sig.zip 7a354d76afaf5508935daa12576534ae Polycom_UC_Software_5_3_0_rts37_release_sig_split.zip 1f1c9b42d768b0b2753bc1eb8ce44157 000000000000.cfg.patch 2c32486b7c9d692326fd6270664eac01 000000000000-phone.cfg 2c32486b7c9d692326fd6270664eac01 000000000000-web.cfg 4a6ff93b944a710da0c3eb99938f42cc 000000000000-directory.xml" sha256sums="b2ffe49f306b071b9e04e1049b4293dda06e8e1e5c27fd129af31ec535cbd381 Polycom_UC_Software_4_0_8_Rev_C_release_sig_split.zip 4565248f354321901323d01b1aeed8bb6e00beedc331a3f7545cbae83d194113 SoundPoint_IP_BootROM_4_4_0B_Upgrader_release_sig.zip 1706670e43355faf105c80e7c652a8477449a851d58b1e225e81136fcd112799 Polycom_UC_Software_5_3_0_rts37_release_sig_split.zip d3142732d52dde59b3937d8dd5871196ecd540c350af5ae4ca68e497c4439e09 000000000000.cfg.patch e2f3dcd842d6eb44a98140e7fb60487ca70e519d5d09872a54ce1372d5a432b4 000000000000-phone.cfg e2f3dcd842d6eb44a98140e7fb60487ca70e519d5d09872a54ce1372d5a432b4 000000000000-web.cfg 875f5bbec057d29508bcd671a203d8e2852cd959aeaeb937443cedbe824e0a41 000000000000-directory.xml" sha512sums="1ca4b9975948f2266e299aa6a27c29554898af04ad07f6a76b6033b95473f915c4d96c132e9ab67cc32613f95a4433129f05a7c125dbd3a53b9c393e68c0e871 Polycom_UC_Software_4_0_8_Rev_C_release_sig_split.zip b624b6618af41c21de016ead0746be9702834632e32de1bd62a5b47ad2308f0fb9def72fcfb35259731b7431d00a958e9c4ad3ad7d7257a29bba9e976dc70c4c SoundPoint_IP_BootROM_4_4_0B_Upgrader_release_sig.zip 0dec724f1dbd18a2c0af21c736a2771b5ccb4cb98e6fda43970ff091c3e8ac6af8d42d5334ecd82d06cbf6914ee8c1be4d3d5231fdf67a9225f22c27d4dbc8a9 Polycom_UC_Software_5_3_0_rts37_release_sig_split.zip 041499a8a8c1b145e2a5ba28ad41ebdf27b57bc01b6f4ea84f270a495b24bd68583b2b5b54ade302b51f350ebdbc4bb9f6d19116f4fda99d916bafb0407ac6a8 000000000000.cfg.patch db2da0f4c393bdea773f3e5a7daa581a58caca738538db6153b223383176aae30e2081c198291d78c44eddd446a1cab9cffef78646360847ce4955c59f288300 000000000000-phone.cfg db2da0f4c393bdea773f3e5a7daa581a58caca738538db6153b223383176aae30e2081c198291d78c44eddd446a1cab9cffef78646360847ce4955c59f288300 000000000000-web.cfg 9adc73d02aa4f545aca893c335284d77099c56fcc17a48f61003ede8713e96aeb8f467896f4dfbf7db67255cc3d60faf353b76ab86c5881d0ba884d1c0acffb3 000000000000-directory.xml"