updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / squeezebox-server / PKGBUILD
blobc36a405f7ad55178bd7e8a50dedf8828f0dcf907
1 # Maintainer: Gaetan Bisson <bisson@archlinux.org>
3 pkgname=squeezebox-server
4 pkgver=7.6.1
5 pkgrel=1
6 pkgdesc='Streaming audio server supported by Logitech'
7 arch=('i686' 'x86_64')
8 url='http://www.mysqueezebox.com/download'
9 license=('GPL')
10 depends=('perl')
11 replaces=('squeezecenter' 'squeezeboxcenter')
12 source=("http://downloads.slimdevices.com/SqueezeboxServer_v${pkgver}/squeezeboxserver-${pkgver}.tgz"
13         'perl-5.14.patch'
14         'scanner.patch'
15         'conf.d'
16         'rc.d')
17 backup=('etc/conf.d/squeezebox-server')
18 sha1sums=('aae42e4c25b1d8a4f57d6ea5e0d393e4a6f5f204'
19           'bf9b04da56d8e365c7970f8b1544f1ce374344b2'
20           '241d93fdebbc13f7fe734f2165e87bd3fad7bc69'
21           'edaa6af06eae98d253a690fdf5abf6a6f07796d0'
22           '999fb59f99dd87fffbf27532a501c086b9db087e')
24 install=install
26 makedepends=('nasm' 'yasm')
27 depends=('perl>5.13' 'perl<5.15' 'perl-dbi')
29 build_cpan() {
30         svnurl=svn.slimdevices.com/repos/slim/7.6/trunk/vendor/CPAN/
31         wget -r --no-parent http://${svnurl} --reject 'mysql-*'
32         pushd ${svnurl}
33         wget http://search.cpan.org/CPAN/authors/id/F/FL/FLORA/Sub-Name-0.05.tar.gz
34         sed \
35                 -e '/build DBI/d' \
36                 -e '/build_module DBI/d' \
37                 -e '/build DBD::mysql/d' \
38                 -e '/RUN_TESTS=1/c RUN_TESTS=0' \
39                 -e 's/Sub-Name-0.04/Sub-Name-0.05/g' \
40                 -e 's/perl5.12.3/perl/g' \
41                 -e 's/5.12.3/5.14.1/g' \
42                 -e 's/5.12/5.14/g' \
43                 -e 's/512/514/g' \
44                 -i buildme.sh
45         chmod +x buildme.sh
46         ./buildme.sh
47         popd
48         sed \
49                 -e '/Sub::Name 0.04/c Sub::Name 0.05' \
50                 -e '/Audio::Scan 0.88/c Audio::Scan 0.9' \
51                 -i modules.conf
52         cp -r ${svnurl}build/5.14/lib/perl5/*-linux-thread-multi/* CPAN/
53         cp -r ${svnurl}build/arch CPAN/
54         rm -fr svn.slimdevices.com
57 build() {
58         cd "${srcdir}"/squeezeboxserver-*-*
59         rm -r Bin/{arm-linux,darwin,i386-freebsd-64int,powerpc-linux}
60         rm -r CPAN/arch/5.{8,10,12}
61         build_cpan
62         patch -p1 -i ../perl-5.14.patch
63         patch -p1 -i ../scanner.patch
64         #rm -r CPAN/arch/5.14/{arm-linux-gnueabi-thread-multi,darwin-thread-multi-2level,powerpc-linux-thread-multi}
65         #[[ ${CARCH} = i686   ]] && rm -r CPAN/arch/5.14/x86_64-linux-thread-multi || true
66         #[[ ${CARCH} = x86_64 ]] && rm -r CPAN/arch/5.14/i386-linux-thread-multi || true
69 package() {
70         cd "${srcdir}"/squeezeboxserver-*-*
71         install -d "${pkgdir}/opt/${pkgname}"
72         cp -a * "${pkgdir}/opt/${pkgname}/"
73         install -D -m755 ../rc.d "${pkgdir}/etc/rc.d/${pkgname}"
74         install -D -m644 ../conf.d "${pkgdir}/etc/conf.d/${pkgname}"