You are not logged in.

#1 2008-03-25 13:31:03

Bebo
Member
From: Göteborg, Sweden
Registered: 2006-06-07
Posts: 207

[Request] SqueezeCenter

Hi,

My squeezebox has been at least partially "bricked" since the change of the perl packages, as slimserver doesn't work anymore. I know it has only been a few days but I'm using my SB a lot and I'm feeling a bit annoyed by this. Further, SlimDevices released their SqueezeCenter some time ago, which is the next version of slimserver, or perhaps rather a replacement for it. So, does anyone have a working PKGBUILD for squeezecenter? (Or perhaps tomk is already working on this, being the maintainer of slimserver?)

Sorry for my impatience... smile

Offline

#2 2008-03-25 14:32:38

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: [Request] SqueezeCenter

I'll be looking at it soon. In the meantime, you could modify the existing slimserver PKGBUILD as required, and see what kind of package you get.

Offline

#3 2008-03-25 14:43:37

Bebo
Member
From: Göteborg, Sweden
Registered: 2006-06-07
Posts: 207

Re: [Request] SqueezeCenter

Thanks for the response. Yeah, I guess I could do that, but I have no idea how to adapt it to the new perl "structure" and tackle the YAML::Syck build.

Offline

#4 2008-03-30 14:17:30

cpu
Member
Registered: 2007-02-22
Posts: 68

Re: [Request] SqueezeCenter

tomk wrote:

I'll be looking at it soon. In the meantime, you could modify the existing slimserver PKGBUILD as required, and see what kind of package you get.

Would be nice if you provide this PKG, anyway as soon as my squeezbox arrive I'll try to make PKGBUILD.

## EDIT ##

Seems that YAML section is not needed... - I've compared PKGBUILD to newest squeezecenter ebuild

Last edited by cpu (2008-03-31 18:32:25)

Offline

#5 2008-04-14 10:42:04

random.bits
Member
From: Ottawa Canada
Registered: 2004-07-18
Posts: 39

Re: [Request] SqueezeCenter

Has anyone got squeezecentre software working with the new Perl configuration?
I have never used the AUR package, I just download the squeezecenter tar file slimdevices provides and run it at boot up.

With the changes, it stopped working. It complains that it cannot load YAML::Syck

I've tried updating using their build-perl-modules.pl script, and also using CPAN, but the slimserver.pl script continues to complain about YAML::Syck

It appears that squeezecenter is distributed with a CPAN directory. How can I modify the perl library search path so the script will find them?

Thanks

Offline

#6 2008-05-04 03:53:58

pjmattal
Forum Fellow
From: Boston, MA
Registered: 2003-12-24
Posts: 40

Re: [Request] SqueezeCenter

After much much wrangling, I think I have Squeezecenter 7.0 at least basically working with perl 5.10 under Arch. I believe it also requires mod_perl 2.0.4.

Both can be found, both PKGBUILD materials and binaries for i686, in:

http://gerolde.archlinux.org/~paul/squeeze7

Please give these a try and let me know how they work for you! Thanks to all for the useful threads that have made this result possible.

- P

Offline

#7 2008-05-22 20:35:31

thorro
Member
From: Skien, Norway
Registered: 2007-05-05
Posts: 25

Re: [Request] SqueezeCenter

Have installed the ver. from pjmattal  http://gerolde.archlinux.org/~paul/squeeze7
it looks like 7.0.1 but Squeezecenter tells me a new ver. is out 7.0.1
But it works for me.


C2D E8500 Nvidia 7950 512mb    WD 500Gb sata   4giga ram   Samsung SyncMaster 226BW, 1680*1050
wowaddict http://eu.wowarmory.com/character-sheet … n=Slackers

Offline

#8 2008-05-23 19:36:02

ghostHack
Member
From: Bristol UK
Registered: 2008-02-29
Posts: 261

Re: [Request] SqueezeCenter

Finally got around to trying this and it does seem to work.  I don't fully understand the mod_perl requirement since the description says that it is for apache.

There were a couple of minor issues to be dealt with, I'll list them here in case anyone else comes up against them;

firstly the mod_perl PKGBUILD had x64_86 rather than x86_64 in the ARCH array

Secondly the prefs directory in /home/squeezecenter was owned by root, this needed to be chown'd to squeezecenter, as did the plugin subdirectory

Thirdly the /var/cache/squeezecenter/cookies.dat file was also owned by root and had to be chown'd

Fourthly, I had to transfer the dbpassword and dbsource fields from my old slimserver config into /home/squeezecenter/prefs/server.prefs so that it could connect to the mysql database and update the library

Aside from these small problems squeezecenter seems to be working for me, although I do have some warnings in the log that seem to be from the web interface and need further investigation:

[08-05-23 20:10:42.4066] Slim::Utils::Misc::msg (1241) Warning: [20:10:42.4061] Argument "" isn't numeric in numeric gt (>) at /var/cache/squeezecenter/templates//home/squeezecenter/HTML/Default/pageheader.html line 181.
[08-05-23 20:10:47.9015] Slim::Utils::Misc::msg (1241) Warning: [20:10:47.9011] Argument "" isn't numeric in numeric gt (>) at /var/cache/squeezecenter/templates//home/squeezecenter/HTML/Default/pageheader.html line 181.
[08-05-23 20:10:47.9041] Slim::Utils::Misc::msg (1241) Warning: [20:10:47.9038] Argument "" isn't numeric in numeric gt (>) at /var/cache/squeezecenter/templates//home/squeezecenter/HTML/Default/cmdwrappers_Default line 466.
[08-05-23 20:10:47.9058] Slim::Utils::Misc::msg (1241) Warning: [20:10:47.9055] Argument "" isn't numeric in numeric gt (>) at /var/cache/squeezecenter/templates//home/squeezecenter/HTML/Default/cmdwrappers_Default line 297.
[08-05-23 20:10:47.9086] Slim::Utils::Misc::msg (1241) Warning: [20:10:47.9082] Argument "" isn't numeric in numeric gt (>) at /var/cache/squeezecenter/templates//home/squeezecenter/HTML/Default/cmdwrappers_Default line 466.
[08-05-23 20:10:47.9105] Slim::Utils::Misc::msg (1241) Warning: [20:10:47.9101] Argument "" isn't numeric in numeric gt (>) at /var/cache/squeezecenter/templates//home/squeezecenter/HTML/Default/cmdwrappers_Default line 297.
[08-05-23 20:10:47.9148] Slim::Utils::Misc::msg (1241) Warning: [20:10:47.9145] Argument "" isn't numeric in numeric gt (>) at /var/cache/squeezecenter/templates//home/squeezecenter/HTML/Default/cmdwrappers_Default line 466.
[08-05-23 20:10:47.9167] Slim::Utils::Misc::msg (1241) Warning: [20:10:47.9164] Argument "" isn't numeric in numeric gt (>) at /var/cache/squeezecenter/templates//home/squeezecenter/HTML/Default/cmdwrappers_Default line 297.
[08-05-23 20:10:47.9209] Slim::Utils::Misc::msg (1241) Warning: [20:10:47.9206] Argument "" isn't numeric in numeric gt (>) at /var/cache/squeezecenter/templates//home/squeezecenter/HTML/Default/cmdwrappers_Default line 466.
[08-05-23 20:10:47.9228] Slim::Utils::Misc::msg (1241) Warning: [20:10:47.9225] Argument "" isn't numeric in numeric gt (>) at /var/cache/squeezecenter/templates//home/squeezecenter/HTML/Default/cmdwrappers_Default line 297.
[08-05-23 20:10:50.3321] Slim::Utils::Misc::msg (1241) Warning: [20:10:50.3318] Argument "" isn't numeric in numeric gt (>) at /var/cache/squeezecenter/templates//home/squeezecenter/HTML/Default/pageheader.html line 181.
[08-05-23 20:11:11.7338] Slim::Utils::Misc::msg (1241) Warning: [20:11:11.7335] Argument "" isn't numeric in numeric gt (>) at /var/cache/squeezecenter/templates//home/squeezecenter/HTML/Default/pageheader.html line 181.
[08-05-23 20:11:11.8474] Slim::Utils::Misc::msg (1241) Warning: [20:11:11.8470] Argument "3:43" isn't numeric in numeric gt (>) at /home/squeezecenter/HTML/EN/songinfo_details.html line 120.
[08-05-23 20:11:12.0820] Slim::Utils::Misc::msg (1241) Warning: [20:11:12.0816] Use of uninitialized value $requestedWidth in join or string at /home/squeezecenter/Slim/Web/Graphics.pm line 148.
[08-05-23 20:11:12.0824] Slim::Utils::Misc::msg (1241) Warning: [20:11:12.0822] Use of uninitialized value $requestedHeight in join or string at /home/squeezecenter/Slim/Web/Graphics.pm line 148.
[08-05-23 20:11:12.0951] Slim::Utils::Misc::msg (1241) Warning: [20:11:12.0948] Use of uninitialized value $requestedWidth in concatenation (.) or string at /home/squeezecenter/Slim/Web/Graphics.pm line 217.
[08-05-23 20:11:12.0955] Slim::Utils::Misc::msg (1241) Warning: [20:11:12.0953] Use of uninitialized value $requestedHeight in concatenation (.) or string at /home/squeezecenter/Slim/Web/Graphics.pm line 217.
[08-05-23 20:11:12.0970] Slim::Utils::Misc::msg (1241) Warning: [20:11:12.0966] Use of uninitialized value $imageFilePath in string eq at /home/squeezecenter/Slim/Web/Graphics.pm line 482.
[08-05-23 20:11:12.0974] Slim::Utils::Misc::msg (1241) Warning: [20:11:12.0971] Use of uninitialized value $imageFilePath in concatenation (.) or string at /home/squeezecenter/Slim/Web/Graphics.pm line 492.
[08-05-23 20:12:31.3799] Slim::Utils::Misc::msg (1241) Warning: [20:12:31.3795] Use of uninitialized value in numeric gt (>) at /home/squeezecenter/Slim/Utils/Prefs.pm line 318.
[08-05-23 20:12:31.3803] Slim::Utils::Misc::msg (1241) Warning: [20:12:31.3801] Use of uninitialized value in numeric lt (<) at /home/squeezecenter/Slim/Utils/Prefs.pm line 319.
[08-05-23 20:12:31.3810] Slim::Utils::Misc::msg (1241) Warning: [20:12:31.3807] Use of uninitialized value in numeric lt (<) at /home/squeezecenter/Slim/Utils/Prefs.pm line 320.
[08-05-23 20:13:30.5037] Slim::Utils::Misc::msg (1241) Warning: [20:13:30.5033] getpeername() on closed socket GEN151 at /usr/lib/perl5/core_perl/IO/Socket.pm line 258.
[08-05-23 20:13:40.5071] Slim::Utils::Misc::msg (1241) Warning: [20:13:40.5068] getpeername() on closed socket GEN151 at /usr/lib/perl5/core_perl/IO/Socket.pm line 258.
[08-05-23 20:13:50.5103] Slim::Utils::Misc::msg (1241) Warning: [20:13:50.5099] getpeername() on closed socket GEN151 at /usr/lib/perl5/core_perl/IO/Socket.pm line 258.
[08-05-23 20:14:00.5133] Slim::Utils::Misc::msg (1241) Warning: [20:14:00.5130] getpeername() on closed socket GEN151 at /usr/lib/perl5/core_perl/IO/Socket.pm line 258.
[08-05-23 20:16:37.5388] Slim::Web::JSONRPC::requestMethod (383) request not dispatchable!
[08-05-23 20:16:37.5414] Slim::Web::JSONRPC::requestMethod (383) request not dispatchable!
[08-05-23 20:16:37.5683] Slim::Web::JSONRPC::requestMethod (383) request not dispatchable!
[08-05-23 20:16:37.5759] Slim::Web::JSONRPC::requestMethod (383) request not dispatchable!
[08-05-23 20:16:38.7854] Slim::Web::JSONRPC::requestMethod (383) request not dispatchable!
[08-05-23 20:16:38.7888] Slim::Web::JSONRPC::requestMethod (383) request not dispatchable!
[08-05-23 20:17:04.5043] Slim::Utils::Misc::msg (1241) Warning: [20:17:04.5039] Argument "" isn't numeric in numeric gt (>) at /var/cache/squeezecenter/templates//home/squeezecenter/HTML/Default/pageheader.html line 181.
[08-05-23 20:17:09.4521] Slim::Utils::Misc::msg (1241) Warning: [20:17:09.4518] Argument "" isn't numeric in numeric gt (>) at /var/cache/squeezecenter/templates//home/squeezecenter/HTML/Default/pageheader.html line 181.
[08-05-23 20:17:23.7718] Slim::Utils::Misc::msg (1241) Warning: [20:17:23.7714] Argument "" isn't numeric in numeric gt (>) at /var/cache/squeezecenter/templates//home/squeezecenter/HTML/Default/pageheader.html line 181.
[08-05-23 20:17:29.5565] Slim::Utils::Misc::msg (1241) Warning: [20:17:29.5562] Argument "" isn't numeric in numeric gt (>) at /var/cache/squeezecenter/templates//home/squeezecenter/HTML/Default/pageheader.html line 181.
[08-05-23 20:17:34.4103] Slim::Utils::Misc::msg (1241) Warning: [20:17:34.4100] Argument "" isn't numeric in numeric gt (>) at /var/cache/squeezecenter/templates//home/squeezecenter/HTML/Default/pageheader.html line 181.
[08-05-23 20:17:50.6365] Slim::Utils::Misc::msg (1241) Warning: [20:17:50.6362] Argument "" isn't numeric in numeric gt (>) at /var/cache/squeezecenter/templates//home/squeezecenter/HTML/Default/pageheader.html line 181.
[08-05-23 20:18:55.1263] Slim::Utils::Misc::msg (1241) Warning: [20:18:55.1259] getpeername() on closed socket GEN174 at /usr/lib/perl5/core_perl/IO/Socket.pm line 258.
[08-05-23 20:24:00.7150] Slim::Utils::Misc::msg (1241) Warning: [20:24:00.7145] getpeername() on closed socket GEN212 at /usr/lib/perl5/core_perl/IO/Socket.pm line 258.
[08-05-23 20:29:45.0670] Slim::Utils::Misc::msg (1241) Warning: [20:29:45.0667] getpeername() on closed socket GEN225 at /usr/lib/perl5/core_perl/IO/Socket.pm line 258.
[08-05-23 20:33:09.6661] Slim::Utils::Misc::msg (1241) Warning: [20:33:09.6658] Argument "" isn't numeric in numeric gt (>) at /var/cache/squeezecenter/templates//home/squeezecenter/HTML/Default/pageheader.html line 181.
[08-05-23 20:33:13.2138] Slim::Utils::Misc::msg (1241) Warning: [20:33:13.2135] Argument "" isn't numeric in numeric gt (>) at /var/cache/squeezecenter/templates//home/squeezecenter/HTML/Default/pageheader.html line 181.
[08-05-23 20:35:12.4905] Slim::Utils::Misc::msg (1241) Warning: [20:35:12.4902] getpeername() on closed socket GEN238 at /usr/lib/perl5/core_perl/IO/Socket.pm line 258.

EDIT: I'm now also seeing an error: Can't exec "/home/squeezecenter/Bin/i386-linux/mDNSResponderPosix": No such file or directory
however, the file does exist and is executable.  The strange thing is I still get this error (no such file) if I try and run mDNSResponderPosix directly from the terminal

Last edited by ghostHack (2008-05-23 20:56:37)

Offline

#9 2008-05-31 14:30:46

Bebo
Member
From: Göteborg, Sweden
Registered: 2006-06-07
Posts: 207

Re: [Request] SqueezeCenter

Okay, AT LAST I've managed to get sc 7.0.1 up and running.

I tried to write my own PKGBUILD, based on tomk's slimserver PKGBUILD, and used pjmattal's version as inspiration. Eventually of course I ended up with something almost identical to pjmattal's. Mimicking pjmattal's version I added gd as a dependency. This is not present in the slimserver PKGBUILD, and I didn't do any checks at all, so I took pjmattal's word for it wink

There are some differences from pjmattal's version. The verstring patch seems not be needed for 7.0.1. Also, I removed mod_perl as a depencency, and added perl-encode-detect (in the AUR). The reason for adding perl-encode-detect was that I got a bunch of error messages concerning something like Encode::Detect (can't remember exactly what they said now). Maybe this is what mod_perl was for, I have no idea.

If anyone is interested, here are the PKGBUILD and other files. Mind that they aren't exceedingly tested or anything. Except for the potential problems of slimserver and squeezecenter poking around in the same database (if one is using an existing instance of mysql), I believe they can be installed alongside eachother. BTW, the other files are basically copies of tomk's slimserver files, but edited for SqueezeCenter.

PKGBUILD

pkgname=squeezecenter
pkgver=7.0.1
pkgrel=1
pkgdesc="Powerful streaming audio server from Slim Devices"
depends=(
        'perl-compress-zlib' 
        'perl-dbd-mysql' 
        'perl-html-parser'
        'perl-digest-sha1' 
        'perl-template-toolkit' 
        'perl-encode-detect'
        'perlxml'
        'gd'
        )
source=(http://www.slimdevices.com/downloads/SqueezeCenter_v${pkgver}/${pkgname}-${pkgver}-noCPAN.tgz 
        http://www.cpan.org/authors/id/A/AU/AUDREYT/YAML-Syck-0.64.tar.gz
        http://search.cpan.org/CPAN/authors/id/M/ML/MLEHMANN/JSON-XS-2.2.tar.gz
        http://search.cpan.org/CPAN/authors/id/L/LD/LDS/GD-2.39.tar.gz
        $pkgname.rc
        $pkgname.conf.d
        )
conflicts=('perl-yaml-syck' 'perl-json-xs' 'perl-gd')
provides=('perl-yaml-syck' 'perl-json-xs' 'perl-gd')

url="http://www.slimdevices.com/pi_features.html"
license=('GPL')
arch=('i686' 'x86_64')
install=squeezecenter.install

build() {
  cd $startdir/src/squeezecenter-${pkgver}-noCPAN || return 1

  # Change all to_json to encode_json to work with JSON-XS-2.x
  find Slim -type f -name '*.pm' -exec sed -i 's|to_json|encode_json|g' {} \;
  # Change all from_json to decode_json to work with JSON-XS-2.x
  find Slim -type f -name '*.pm' -exec sed -i 's|from_json|decode_json|g' {} \;

  mkdir -p $startdir/pkg/home/squeezecenter || return 1
  cp -a * $startdir/pkg/home/squeezecenter || return 1
  install -D -m755 ../squeezecenter.rc $startdir/pkg/etc/rc.d/squeezecenter || return 1
  install -D -m644 ../squeezecenter.conf.d $startdir/pkg/etc/conf.d/squeezecenter || return 1
  mkdir $startdir/pkg/home/squeezecenter/prefs
  
  # Remove conflicting/offending version 2.34 of perlxml in CPAN dir
  rm -rf $startdir/pkg/home/$pkgname/CPAN/XML/Parser{,.pm} || return 1
  # Remove conflicting/offending version 2.15 of perl-template-toolkit in CPAN dir
  rm -rf $startdir/pkg/home/$pkgname/CPAN/Template{,.pm} || return 1

  # Building YAML::Syck
  cd  $startdir/src/YAML-Syck-0.64 || return 1
  # install module in vendor directories.
  PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor || return 1
  make  || return 1
  make install DESTDIR=${startdir}/pkg || return 1

  # Building/Bundling JSON::XS
  cd $startdir/src/JSON-XS-2.2 || return 1
  # install module in vendor directories.
  PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor || return 1
  make || return 1
  make install DESTDIR=${startdir}/pkg || return 1

  # Building/Bundling GD 
  cd $startdir/src/GD-2.39 || return 1
  # install module in vendor directories.
  PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor || return 1
  make || return 1
  make install DESTDIR=${startdir}/pkg || return 1
  
  # remove perllocal.pod and .packlist
  find ${startdir}/pkg -name perllocal.pod -delete
  find ${startdir}/pkg -name .packlist -delete

}

md5sums=('e0332a2710231e11b8f1d57445acdb45'
         '51054b5da582e381158f10276f82ae15'
         '21d641c8e630ba986bb0648a59ed6520'
         '5fdb681e5614236e7a952a07eabc8791'
         '1cf63e3b353e82d196974279b51bdfe4'
         'b506d45be7cf0009cb9cd4f32f4518e3')

squeezecenter.install

post_install() {
  echo -n "adding squeezecenter user... "
  useradd -c "SqueezeCenter" -g users -s /bin/false squeezecenter && echo "done."
  passwd -l squeezecenter &>/dev/null

  chown -R squeezecenter:users /home/squeezecenter
    
  install -o squeezecenter -d /var/cache/squeezecenter
  touch /var/log/squeezecenter.log
  chown squeezecenter:users /var/log/squeezecenter.log
    
  cat << 'EOM'

==> SqueezeCenter uses MySQL instead of sqlite. If you have MySQL up and running
==> you can configure SqueezeCenter to use that server as described here:
==> http://wiki.slimdevices.com/index.php/ExistingMySQLInstance 

==> PLEASE NOTE: SqueezeCenter should always be run as the user 'squeezecenter'.
==> This is easily done by adding squeezecenter to the DAEMONS array in rc.conf,
==> after network and mysql.

==> Additional run-time options can be added to /etc/conf.d/squeezecenter.
==> Please refer to "/home/squeezecenter/slimserver.pl --help" for full details.

EOM
}

post_upgrade() {
  chown -R squeezecenter:users /home/squeezecenter
    
  cat << 'EOM'

==> SqueezeCenter uses MySQL instead of sqlite. If you have MySQL up and running
==> you can configure SqueezeCenter to use that server as described here:
==> http://wiki.slimdevices.com/index.php/ExistingMySQLInstance 

EOM
}

pre_remove() {
  # pre_remove gets called whenever post_remove is defined.
  true
}

post_remove() {
  # post_remove doesn't start at a newline like the other post_* functions,
  # so we'll have to make one for ourselves.
  echo -n -e "\nremoving squeezecenter user... "
  userdel squeezecenter && echo "done."
  
  rm -r /var/cache/squeezecenter /var/log/squeezecenter.log
}

op=$1
shift
$op $*

squeezecenter.rc

#!/bin/bash

# source application-specific settings
[ -f /etc/conf.d/squeezecenter ] && . /etc/conf.d/squeezecenter

# general config
. /etc/rc.conf
. /etc/rc.d/functions

squeezehome=/home/squeezecenter
pidfile=/var/run/squeezecenter.pid
logfile=/var/log/squeezecenter.log
prefsdir=/home/squeezecenter/prefs
cachedir=/var/cache/squeezecenter


case "$1" in
  start)
    stat_busy "Starting SqueezeCenter"
    cd $squeezehome
    ./slimserver.pl --daemon --user squeezecenter --prefsdir $prefsdir \
    --cachedir $cachedir --pidfile $pidfile --logfile $logfile $SQUEEZECENTER_OPTS 
    if [ $? -gt 0 ]; then
      stat_fail
    else
      add_daemon squeezecenter
      stat_done
    fi
    ;;
  stop)
    stat_busy "Stopping SqueezeCenter"
    kill `cat $pidfile` &>/dev/null
    if [ $? -gt 0 ]; then
      stat_fail
    else
      rm_daemon squeezecenter
      stat_done
    fi
    ;;
  restart)
    $0 stop
    sleep 3
    $0 start
    ;;
  *)
    echo "usage: $0 {start|stop|restart}"  
esac

squeezecenter.conf.d

# Configuration file for SqueezeCenter on Arch Linux.
# Save this as /etc/conf.d/squeezecenter

# Enter space-delimited options on the following line.
# e.g. SQUEEZECENTER_OPTS="--diag --d_scan --d_command" 
# See "/home/squeezecenter/slimserver.pl --help" for a full list of possible options.
SQUEEZECENTER_OPTS=""

Offline

#10 2008-06-10 22:18:38

ghostHack
Member
From: Bristol UK
Registered: 2008-02-29
Posts: 261

Re: [Request] SqueezeCenter

Thanks for your work on this Bebo, however I was still having problems with 7.0.1 and looking on the slimdevices forums I saw that 7.0.1 did not work with perl 5.10 so I tried 7.1 and I think I now have something that works.  I still have the mDNS responder issue but I found out that its because its a 32-bit binary so it obviously won't work with my arch64 install.

I had to split off the JSON::XS into a seperate package since 7.1 also needs JSON::XS::VersionOneAndTwo which has JSON::XS as a dependancy.  So,

pkgname=perl-json-xs
_realname=JSON-XS
pkgver=2.2
pkgrel=1
pkgdesc="A Perl class to convert JSON objects"
depends=( 'perl')
makedepends=('perl-module-build' 'perl-extutils-cbuilder')
source=(http://search.cpan.org/CPAN/authors/id/M/ML/MLEHMANN/${_realname}-$pkgver.tar.gz)
url="http://search.cpan.org/dist/${_realname}/"
license=('GPL' 'PerlArtistic')
arch=('i686' 'x86_64')

build() {
  cd ${startdir}/src/${_realname}-${pkgver}
  # install module in vendor directories.
  PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor || return 1
  make || return 1
  make install DESTDIR=${startdir}/pkg || return 1

  # remove perllocal.pod and .packlist
  find ${startdir}/pkg -name perllocal.pod -delete
  find ${startdir}/pkg -name .packlist -delete

}
md5sums=('21d641c8e630ba986bb0648a59ed6520')

Unfortunately version 7.1 is still on nightly builds with no apparent way of determining the build number so the PKGBUILD and md5sums have to be edited each time, but here is my attempt at squeezecenter 7.1 (heavily based on Bebo's PKGBUILD and use the same install/rc.d/config scripts):

pkgname=squeezecenter
pkgver=7.1
_night=20582
pkgrel=3
pkgdesc="Powerful streaming audio server from Slim Devices"
depends=( 'perl-dbd-mysql' 'perl-html-parser'
        'perl-digest-sha1' 'perl-template-toolkit' 
        'perl-encode-detect' 'perl-compress-zlib'
        'perlxml' 'perl-json-xs' 'gd')
source=(http://www.slimdevices.com/downloads/nightly/latest/7.1/${pkgname}-${pkgver}-${_night}-noCPAN.tgz 
        http://www.cpan.org/authors/id/A/AU/AUDREYT/YAML-Syck-0.64.tar.gz
        http://search.cpan.org/CPAN/authors/id/L/LD/LDS/GD-2.39.tar.gz
    http://search.cpan.org/CPAN/authors/id/L/LB/LBROCARD/JSON-XS-VersionOneAndTwo-0.31.tar.gz
        $pkgname.rc
        $pkgname.conf.d
        )
conflicts=('perl-yaml-syck' 'perl-gd' 'perl-json-versiononeandtwo')
provides=('perl-yaml-syck' 'perl-gd' 'perl-json-versiononeandtwo')

url="http://www.slimdevices.com/pi_features.html"
license=('GPL')
arch=('i686' 'x86_64')
install=squeezecenter.install

build() {
  cd $startdir/src/squeezecenter-${pkgver}-${_night}-noCPAN || return 1

  mkdir -p $startdir/pkg/home/squeezecenter || return 1
  cp -a * $startdir/pkg/home/squeezecenter || return 1
  install -D -m755 ../squeezecenter.rc $startdir/pkg/etc/rc.d/squeezecenter || return 1
  install -D -m644 ../squeezecenter.conf.d $startdir/pkg/etc/conf.d/squeezecenter || return 1
  install -d -m755 $startdir/pkg/home/squeezecenter/prefs || return 1
  
  # Remove conflicting/offending version 2.34 of perlxml in CPAN dir
  rm -rf $startdir/pkg/home/$pkgname/CPAN/XML/Parser{,.pm} || return 1
  # Remove conflicting/offending version 2.15 of perl-template-toolkit in CPAN dir
  rm -rf $startdir/pkg/home/$pkgname/CPAN/Template{,.pm} || return 1
  # remove conflicting version of Compress Zlib from CPAN dir
  rm -rf $startdir/pkg/home/$pkgname/CPAN/Compress/Zlib.pm || return 1
  # remove conflicting version of GD from CPAN dir
  rm -rf $startdir/pkg/home/$pkgname/CPAN/GD.pm || return 1
  # remove conflicting version of JSON::XS from CPAN dir
  rm -rf $startdir/pkg/home/$pkgname/CPAN/JSON/XS{,.pm} || return 1

  # Building YAML::Syck
  cd  $startdir/src/YAML-Syck-0.64 || return 1
  # install module in vendor directories.
  PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor || return 1
  make  || return 1
  make install DESTDIR=${startdir}/pkg || return 1

  # Building/Bundling GD 
  cd $startdir/src/GD-2.39 || return 1
  # install module in vendor directories.
  PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor || return 1
  make || return 1
  make install DESTDIR=${startdir}/pkg || return 1
  
  # Building/Bundling JSON::XS::VersionOneAndTwo
  cd $startdir/src/JSON-XS-VersionOneAndTwo-0.31 || return 1
  # install module in vendor directories.
  PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor INSTALLVENDORLIB=/usr/lib/perl5/vendor_perl || return 1
  make || return 1
  make install DESTDIR=${startdir}/pkg INSTALLVENDORLIB=/usr/lib/perl5/vendor_perl || return 1

  # remove perllocal.pod and .packlist
  find ${startdir}/pkg -name perllocal.pod -delete
  find ${startdir}/pkg -name .packlist -delete

}
md5sums=('0bdcb41b494b5b05cdbabf481d3c0c2f'
         '51054b5da582e381158f10276f82ae15'
         '5fdb681e5614236e7a952a07eabc8791'
         '98adc44db12b2d50af1d7e4734244dce'
         '1cf63e3b353e82d196974279b51bdfe4'
         'b506d45be7cf0009cb9cd4f32f4518e3')

Offline

#11 2008-06-11 22:36:18

Bebo
Member
From: Göteborg, Sweden
Registered: 2006-06-07
Posts: 207

Re: [Request] SqueezeCenter

ghostHack, I have those messages that you posted before in my log file as well, or at least similar ones. I'm a bit surprised by the abundance of warnings about uninitialized variables and attempts to use the empty string in additions (I guess that's more a result of the size of the project). I've also had a fair share of denied permissions, but that's sorted now (by some chown:s). I haven't seen any problems with mDNSresponder, so I guess you're right about it being a 32/64 bit issue. I find it a bit strange that it is so difficult to make a PKGBUILD for this, but maybe it is how it's supposed to be... I always try to find the minimal solution to problems, and my PKGBUILD definitely seems to fall short of that. I'm still hoping for an "official" package for this wink

Offline

#12 2009-05-22 00:03:58

theking2
Banned
From: Romanshorn Switzerland
Registered: 2009-03-04
Posts: 372

Re: [Request] SqueezeCenter

Interesting thread. I'm attempting to make a package for 7.3.2 but I'm stuck at the perl-encode-detect package. pacman claims it doesn't know perl-encode-detect. Compiling without the package leads to error "Can't locate loadable object for module Encode::Detect::Detector" so I assume it needs the package anyhow.

what is going on here?


archlinux on a Gigabyte C1037UN-EU, 16GiB
a Promise  PDC40718 based ZFS set
root on a Samsung SSD PB22-J
running LogitechMediaServer(-git), Samba, MiniDLNA, TOR

Offline

#13 2009-05-22 06:17:40

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: [Request] SqueezeCenter

pacman doesn't know it - it's in the AUR. For squeezecenter, you need the 1.00 release, not the current 1.01.

Offline

#14 2009-05-22 09:23:03

Bebo
Member
From: Göteborg, Sweden
Registered: 2006-06-07
Posts: 207

Re: [Request] SqueezeCenter

theking2 wrote:

Interesting thread. I'm attempting to make a package for 7.3.2 but I'm stuck at the perl-encode-detect package. pacman claims it doesn't know perl-encode-detect. Compiling without the package leads to error "Can't locate loadable object for module Encode::Detect::Detector" so I assume it needs the package anyhow.

what is going on here?

I haven't had that dependency for a while. It was quite simple to create a PKGBUILD if I didn't care about the noCPAN stuff. Here is my current PKGBUILD, has been working for some time:

pkgname=squeezecenter
pkgver=7.3.2
_pkgvertgz=7.3.2
pkgrel=2
pkgdesc="Powerful streaming audio server from Slim Devices"
depends=('perl' 'freetype2')
source=(http://www.slimdevices.com/downloads/SqueezeCenter_v${pkgver}/${pkgname}-${_pkgvertgz}.tgz 
        $pkgname.rc
        $pkgname.conf.d
        )
url="http://www.slimdevices.com/pi_features.html"
license=('GPL')
arch=('i686' 'x86_64')
backup=('etc/conf.d/squeezecenter' 'etc/rc.d/squeezecenter')
install=squeezecenter.install

build() {
  cd $startdir/src/squeezecenter-${_pkgvertgz} || return 1

  mkdir -p $startdir/pkg/home/squeezecenter || return 1
  cp -a * $startdir/pkg/home/squeezecenter || return 1
  install -D -m755 ../squeezecenter.rc $startdir/pkg/etc/rc.d/squeezecenter || return 1
  install -D -m644 ../squeezecenter.conf.d $startdir/pkg/etc/conf.d/squeezecenter || return 1
  mkdir $startdir/pkg/home/squeezecenter/prefs
}

md5sums=('8b12cfa911fd61607e56883914ec3bac'
         '1cf63e3b353e82d196974279b51bdfe4'
         'b506d45be7cf0009cb9cd4f32f4518e3')

Offline

#15 2009-05-22 10:50:49

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: [Request] SqueezeCenter

Yeah, that works too. The idea behind my original and pjmattal's update was to do it as close to The Arch Way as possible i.e. use existing official and AUR packages as dependencies where required, instead of duplicating them as Bebo's version does. However, building it from the bundled tarball is fine if you want it to "just work". smile

Offline

#16 2009-05-22 11:29:14

theking2
Banned
From: Romanshorn Switzerland
Registered: 2009-03-04
Posts: 372

Re: [Request] SqueezeCenter

Thanks to both of you.

A question for tomk though the link to  http://gerolde.archlinux.org/~paul/squeeze7 contains some old stuff. there is no http://search.cpan.org/CPAN/authors/id/ … 2.2.tar.gz (anymore). so I've updated this to the latest http://cpan.mirror.solnet.ch/authors/id … 232.tar.gz . does that make sense?


archlinux on a Gigabyte C1037UN-EU, 16GiB
a Promise  PDC40718 based ZFS set
root on a Samsung SSD PB22-J
running LogitechMediaServer(-git), Samba, MiniDLNA, TOR

Offline

#17 2009-05-22 11:31:52

theking2
Banned
From: Romanshorn Switzerland
Registered: 2009-03-04
Posts: 372

Re: [Request] SqueezeCenter

Oh and btw the package has the problem that the squeezecenter folder under /var/cache cannot be written to by the squeezecenter user. What would the prefered way be change this? just chown it or is there a more appropriate way?

Last edited by theking2 (2009-05-22 11:35:24)


archlinux on a Gigabyte C1037UN-EU, 16GiB
a Promise  PDC40718 based ZFS set
root on a Samsung SSD PB22-J
running LogitechMediaServer(-git), Samba, MiniDLNA, TOR

Offline

#18 2009-05-22 11:47:49

Bebo
Member
From: Göteborg, Sweden
Registered: 2006-06-07
Posts: 207

Re: [Request] SqueezeCenter

tomk wrote:

Yeah, that works too. The idea behind my original and pjmattal's update was to do it as close to The Arch Way as possible i.e. use existing official and AUR packages as dependencies where required, instead of duplicating them as Bebo's version does. However, building it from the bundled tarball is fine if you want it to "just work". smile

Hehe, yes, I was desperate, deciding to do it the easy way instead of the right way smile

theking2 wrote:

Oh and btw the package has the problem that the squeezecenter folder under /var/cache cannot be written to by the squeezecenter user. What would the prefered way be change this? just chown it or is there a more appropriate way?

Yes, chown it or use "install -o squeezecenter -d /var/cache/squeezecenter" (which is what I do).

Offline

#19 2009-05-22 11:54:38

theking2
Banned
From: Romanshorn Switzerland
Registered: 2009-03-04
Posts: 372

Re: [Request] SqueezeCenter

but that line is already in the .install file. ... puzzeling
btw the md5sum have changed. working with

md5sums=('8b12cfa911fd61607e56883914ec3bac'
         'fa98a463841eaa78f9db27ec5e000fa7'
         'b506d45be7cf0009cb9cd4f32f4518e3')

(output makepkg -g)

Last edited by theking2 (2009-05-22 12:03:33)


archlinux on a Gigabyte C1037UN-EU, 16GiB
a Promise  PDC40718 based ZFS set
root on a Samsung SSD PB22-J
running LogitechMediaServer(-git), Samba, MiniDLNA, TOR

Offline

#20 2009-05-22 14:11:23

theking2
Banned
From: Romanshorn Switzerland
Registered: 2009-03-04
Posts: 372

Re: [Request] SqueezeCenter

That last iteration did the trick. I'm still trying to understand why I got the log4perl error message in my initial attempt to install SQ7.3.2 manually and later used the PKGBUILD set mentioned earlier in this thread but I assume that there were some pretty antiquated  perl package references in it. With the last PKGBUILD  script or more precisely

pkgname=squeezecenter
pkgver=7.3.2
_pkgvertgz=7.3.2
pkgrel=2
pkgdesc="Powerful streaming audio server from Slim Devices"
depends=('perl' 'freetype2')
source=(http://www.slimdevices.com/downloads/SqueezeCenter_v${pkgver}/${pkgname}-${_pkgvertgz}.tgz
        $pkgname.rc
        $pkgname.conf.d
        )
url="http://www.slimdevices.com/pi_features.html"
license=('GPL')
arch=('i686' 'x86_64')
backup=('etc/conf.d/squeezecenter' 'etc/rc.d/squeezecenter')
install=squeezecenter.install

build() {
  cd $startdir/src/squeezecenter-${_pkgvertgz} || return 1

  mkdir -p $startdir/pkg/home/squeezecenter || return 1
  cp -a * $startdir/pkg/home/squeezecenter || return 1
  install -D -m755 ../squeezecenter.rc $startdir/pkg/etc/rc.d/squeezecenter || return 1
  install -D -m644 ../squeezecenter.conf.d $startdir/pkg/etc/conf.d/squeezecenter || return 1
  mkdir $startdir/pkg/home/squeezecenter/prefs
}

md5sums=('8b12cfa911fd61607e56883914ec3bac'
         'fa98a463841eaa78f9db27ec5e000fa7'
         'b506d45be7cf0009cb9cd4f32f4518e3')

It all works .

Thanks for lending a hand tomk and Bebo

Last edited by theking2 (2009-05-22 14:11:57)


archlinux on a Gigabyte C1037UN-EU, 16GiB
a Promise  PDC40718 based ZFS set
root on a Samsung SSD PB22-J
running LogitechMediaServer(-git), Samba, MiniDLNA, TOR

Offline

#21 2009-05-22 14:59:33

theking2
Banned
From: Romanshorn Switzerland
Registered: 2009-03-04
Posts: 372

Re: [Request] SqueezeCenter

It might just be some left overs from the zillion attempts to get it working. What I will attempt next is to remove everything (including the reference perl packages) and give it another go. Just to make sure that the next time I or someone else tries this I now that is worked. Therefor:

sudo pacman -R squeezecenter
sudo pacman -R perl-dbd-mysql perl-html-parser perl-digest-sha1 perl-template-toolkit
sudo pacman -R perl-encode-detect
sudo pacman -R perl-json-xs
sudo pacman -R perl-html-tagset perlxml perl-appconfig
sudo pacman -R perl-dbi

another makepkg and another pacman and
...
sudo /etc/rc.d/squeezecenter start
...

and presto! again a new squeezecenter .

One more point to Bebo. Pardon a real n00b here, what exactly would be the preferred way? My guess is that in the package as it is build by the last PKGBUILD I posted is that it will contain more than is necessary but I'm not sure how to have it depend on pacman to load the required dependencies.
On close reading I got it. The difference between the noCPAN and the (double size) "normal" version. Let's see what can be done

Last edited by theking2 (2009-05-23 08:53:43)


archlinux on a Gigabyte C1037UN-EU, 16GiB
a Promise  PDC40718 based ZFS set
root on a Samsung SSD PB22-J
running LogitechMediaServer(-git), Samba, MiniDLNA, TOR

Offline

#22 2009-05-22 15:19:19

theking2
Banned
From: Romanshorn Switzerland
Registered: 2009-03-04
Posts: 372

Re: [Request] SqueezeCenter

one final touch to the squeezecenter.install file to  allow the prefs/plugin folder readable for the squeezecenter user :

  install -o squeezecenter -d /home/squeezecenter/prefs/plugin

archlinux on a Gigabyte C1037UN-EU, 16GiB
a Promise  PDC40718 based ZFS set
root on a Samsung SSD PB22-J
running LogitechMediaServer(-git), Samba, MiniDLNA, TOR

Offline

Board footer

Powered by FluxBB