You are not logged in.

#1 2008-01-10 10:14:13

Stoffi
Member
Registered: 2007-03-15
Posts: 107

[REQUEST] davemp (a web interface for mpd)

Hi there smile

I was wondering if anyone could be kind enogh to make a package of DaveMP?

DaveMP is a web interface similar to pitchfork, but simpler(less features etc). since I am
very new with both linux and arch, I was not able to make pitchfork work, and DaveMP seems
to have everythig I need, so I want to try out DaveMP. (http://www.ion0.com/davemp/index.html)

DaveMP requires perl, HTTP::Server::Simple, and JSON.
Perl                                (as I understand) exists in base, so everyone is supposed to have it if they have not removed it.
JSON                              exists in community as perl-json, and
HTTP::Server::Simple      exists in AUR as perl-http-server-simple
(At least this is how I understood it from the DaveMP webpage.)

The DaveMP files can be found here:
http://www.ion0.com/davemp/downloads/fi … .23.tar.gz

I am also wondering if it is possible to add this (and any other program as a daemon, and if so, how?)
I really hope you will help me with this package, as I am not able to create my own packages yet sad

Kristoffer

Offline

#2 2008-01-20 12:37:33

Stoffi
Member
Registered: 2007-03-15
Posts: 107

Re: [REQUEST] davemp (a web interface for mpd)

Anyone?
Please?

:'(

Offline

#3 2008-01-20 13:33:01

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

Re: [REQUEST] davemp (a web interface for mpd)

Stoffi wrote:

I am not able to create my own packages yet

Well, since you said "yet" at the end of that sentence, and as nobody has responded to your request so far, why don't you have a go yourself? There's plenty of relevant docs on the wiki, and you can ask for help here, on the MLs, and/or on IRC.

Just my €0.02. smile

Offline

#4 2008-01-20 15:14:05

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,893
Website

Re: [REQUEST] davemp (a web interface for mpd)

# Contributor: Your Name <youremail@domain.com>
pkgname=davemp
pkgver=1.23
pkgrel=1
pkgdesc=""
arch=()
url=""
license=('GPL')
groups=()
depends=()
makedepends=()
provides=()
conflicts=()
replaces=()
backup=()
options=()
install=
source=(http://www.ion0.com/davemp/downloads/files/$pkgname-$pkgver.tar.gz)
noextract=()
md5sums=('bef1fe4ac565b716c8838cce79572a2e') #generate with 'makepkg -g'

build() {
  cd "$startdir/src/$pkgname-$pkgver"

  ./configure --prefix=/usr
  make || return 1
  make DESTDIR="$startdir/pkg" install
}

Made a start, the build() will be different more like install....

 install -Dm755 $startdir/<path to files> $startdir/pkg/<files>

Last edited by Mr Green (2008-01-20 15:18:15)


Mr Green

Offline

#5 2008-01-20 16:01:34

Stoffi
Member
Registered: 2007-03-15
Posts: 107

Re: [REQUEST] davemp (a web interface for mpd)

# Contributor: Your Name <youremail@domain.com>
pkgname=davemp
pkgver=1.23
pkgrel=1
pkgdesc="A lightweght web interface for mpd"
arch=()
url="http://www.ion0.com/davemp/"
license=('Creative Commons Attribution-Noncommercial-Share Alike 2.5 License')
groups=()
depends=('perl' 'perl-json' 'perl-http-server-simple')
makedepends=()
provides=()
conflicts=()
replaces=()
backup=()
options=()
install=('davemp.install')
source=(http://www.ion0.com/davemp/downloads/files/$pkgname-$pkgver.tar.gz)
noextract=()
md5sums=('bef1fe4ac565b716c8838cce79572a2e') #generate with 'makepkg -g'

build() {
  cd "$startdir/src/$pkgname-$pkgver"

  ./configure --prefix=/usr
  make || return 1
  make DESTDIR="$startdir/pkg" install
}
 install -Dm755 $startdir/<path to files> $startdir/pkg/<files>

Ok, I have tried to edit the "pkgbuild file" posted by Mr Green.
I didn't quite understand the wiki, and since Mr Green's "pkgbuild file" was incomplete,
i'm sure something is not quite right yet.

I found this wiki page http://wiki.archlinux.org/index.php/The … guidelines
and I have read it.
I will try tomorrow. if I have time, to unpack the source file, (if I have understood right, I
am supposed to do that?) and try to figure out something more.

I have never installed anything on linux exept through pacman, and from aur after i managed
to install yaourt through pacman...

Kristoffer

Offline

#6 2008-01-20 17:00:02

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,893
Website

Re: [REQUEST] davemp (a web interface for mpd)

Yeah my pkgbuild is not complete....just a step for you in the right direction....


Mr Green

Offline

#7 2008-01-20 19:31:17

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,391

Re: [REQUEST] davemp (a web interface for mpd)

if I have time, to unpack the source file, (if I have understood right, I
am supposed to do that?)

to unpack the source it will suffice to say makepkg. makepkg will do the unpacking. there will be a subdir named src/davemp-somewhat whre you can look for further build instructions.

Offline

#8 2008-01-30 09:23:04

Stoffi
Member
Registered: 2007-03-15
Posts: 107

Re: [REQUEST] davemp (a web interface for mpd)

I have finally managed to build up my motivation and do some more work on this (and my general linux understanding).
It started well, I was able to copy the PKGBUILD text from my browser, and into my urxvt terminal,
wich felt really awsome! big_smile

After some more reading and trying, this is what I have now, and I would very much like some input on it before I try a makepkg, because I think maybe it will work a bit this time.

# Contributor: Kristoffer <youremail@gmail.com>
pkgname=davemp
pkgver=1.23
pkgrel=1
pkgdesc="A lightweght web interface for mpd"
arch=('i686')
url="http://www.ion0.com/davemp/"
license=('Creative Commons Attribution-Noncommercial-Share Alike 2.5 License')
groups=()
depends=('perl' 'perl-json' 'perl-http-server-simple')
makedepends=()
provides=()
conflicts=()
replaces=()
backup=()
options=()
install=()
source=(http://www.ion0.com/davemp/downloads/files/$pkgname-$pkgver.tar.gz)
noextract=()
md5sums=('bef1fe4ac565b716c8838cce79572a2e') #generate with 'makepkg -g'

build() {

install -Dm755 $startdir/<path to files> $startdir/pkg/<files>
    }
#  cd "$startdir/src/$pkgname-$pkgver"
#  
#    ./configure --prefix=/usr
#      make || return 1
#        make DESTDIR="$startdir/pkg" install
#        }

This is my PKGBUILD file.
I have tried reading the man page for both install, and chmod, but I cannot figure out which attributes the "755" sets on the files.
I am also very insecure about where to put the files:

$startdir/<path to files>

Is this where the install program should get the files, so that if I am in /.../abs/local/
and I type ls, I should get: PKGBUILD davemp ?
should I then change it to:

$startdir/davemp

?

$startdir/pkg/<files>

I guess this is where davemp should be installed, where should it be installed?
I am really fresh with linux, and XP will probably be my last windows OS (except for some games), so I am completly blank about where things should go, both in linux, and in arch.

Thank you for all the help smile

*On my way at becoming a linux pro*

Offline

#9 2008-01-30 11:14:55

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,391

Re: [REQUEST] davemp (a web interface for mpd)

Hello,
1) $startdir is the directory where your PKGBUILD lies.
2) the words in <> are examples. This has not to be taken literally.
3) Since there is no INSTALL file in the tarball I think this is not a good example for learning to write a PKGBUILD. But on the other hand, everything should be easyly to manage otherwise the authors would have written one.
4) So try this.

 # Contributor: Kristoffer <youremail@gmail.com>
pkgname=davemp
pkgver=1.23
pkgrel=1
pkgdesc="A lightweght web interface for mpd"
arch=('any')
url="http://www.ion0.com/davemp/"
license=('Creative Commons Attribution-Noncommercial-Share Alike 2.5 License')
groups=()
depends=('perl' 'perl-json' 'perl-http-server-simple')
source=(http://www.ion0.com/davemp/downloads/files/$pkgname-$pkgver.tar.gz davemp.sh)
md5sums=('bef1fe4ac565b716c8838cce79572a2e') #generate with 'makepkg -g'

build() {

cd "$startdir/src/$pkgname-$pkgver"
install -Dm755 $startdir/davemp.sh $startdir/pkg/usr/bin/davemp
install -d $startdir/pkg/usr/share/davemp
cp -R * $startdir/pkg/usr/share/davemp
    }

create a file davemp.sh into the same directory as the PKGBUILD and put the following lines into it

#!/bin/sh
verz=`pwd`
cd /usr/share/davemp
perl ./davempd.pl
cd $verz

this file needs a md5sum in your PKGBUILD, so run makepkg -g and add the missing string.

then makepkg should build something. when I write this, I sit at an windows PC so nothing is tested.

Offline

#10 2008-01-30 21:08:17

Stoffi
Member
Registered: 2007-03-15
Posts: 107

Re: [REQUEST] davemp (a web interface for mpd)

I have made a package now, but it doesn't seem to work.

When I try to start davemp, I get this error message:

[root@archbox ~]# davemp 
Can't locate JSON/XS.pm in @INC (@INC contains: ./lib /usr/lib/perl5/5.8.8/i686-linux-thread-multi /usr/lib/perl5/5.8.8 /usr/lib/perl5/site_perl/5.8.8/i686-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl/5.8.7/i686-linux-thread-multi /usr/lib/perl5/site_perl/5.8.7 /usr/lib/perl5/site_perl/5.8.6/i686-linux-thread-multi /usr/lib/perl5/site_perl/5.8.6 /usr/lib/perl5/site_perl/5.8.5/i686-linux-thread-multi /usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl/5.8.4/i686-linux-thread-multi /usr/lib/perl5/site_perl/5.8.4 /usr/lib/perl5/site_perl/5.8.3/i686-linux-thread-multi /usr/lib/perl5/site_perl/5.8.3 /usr/lib/perl5/site_perl/5.8.2/i686-linux-thread-multi /usr/lib/perl5/site_perl/5.8.2 /usr/lib/perl5/site_perl/5.8.1/i686-linux-thread-multi /usr/lib/perl5/site_perl/5.8.1 /usr/lib/perl5/site_perl/5.8.0/i686-linux-thread-multi /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl .) at lib/Davemp.pm line 23, <DATA> line 11.
BEGIN failed--compilation aborted at lib/Davemp.pm line 23, <DATA> line 11.
Compilation failed in require at ./davempd.pl line 18, <DATA> line 11.
BEGIN failed--compilation aborted at ./davempd.pl line 18, <DATA> line 11.

This is my PKGBUILD:

# Contributor: Kristoffer <youremail@gmail.com>
pkgname=davemp
pkgver=1.23
pkgrel=1
pkgdesc="A lightweght web interface for mpd"
arch=('any')
url="http://www.ion0.com/davemp/"
license=('Creative Commons Attribution-Noncommercial-Share Alike 2.5 License')
groups=()
depends=('perl' 'perl-json' 'perl-http-server-simple')
makedepends=()
provides=()
conflicts=()
replaces=()
backup=()
options=()
install=()
source=(http://www.ion0.com/davemp/downloads/files/$pkgname-$pkgver.tar.gz davemp.sh)
noextract=()
md5sums=('bef1fe4ac565b716c8838cce79572a2e' '4c1a4bbb555002748838feb3b8b4ad8f')

build() {

  cd "$startdir/src/$pkgname-$pkgver"
  install -Dm755 $startdir/davemp.sh $startdir/pkg/usr/bin/davemp
  install -d $startdir/pkg/usr/share/davemp
  cp -R * $startdir/pkg/usr/share/davemp
        }

And this is my davemp.sh:

#!/bin/sh
verz=`pwd`
cd /usr/share/davemp
perl ./davempd.pl
cd $verz

I have installed perl through pacman, and perl-json and perl-http-server-simple through yaourt.

This is written on the davemp page, should any of this be implemented in the PKGBUILD or the davemp.sh?

Starting DaveMP

Starting DaveMP is very simple. Edit the davemp.conf file to match your configuration. Then run the davempd.pl command with the davemp.conf as it's argument. DaveMP does not put itself in the background automatically, You can do this yourself by simply adding & to the end of the command.

Example:
./davempd.pl davemp.conf &

Thank you for all the help smile

Kristoffer

Offline

#11 2008-01-31 10:58:20

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,391

Re: [REQUEST] davemp (a web interface for mpd)

Yes, you should try

#!/bin/sh
verz=`pwd`
cd /usr/share/davemp
perl ./davempd.pl davemp.conf &
cd $verz

Offline

#12 2008-01-31 18:06:27

Stoffi
Member
Registered: 2007-03-15
Posts: 107

Re: [REQUEST] davemp (a web interface for mpd)

I tried again with the new davemp.sh, but I still get this error message.

[root@archbox ~]# davemp 
[root@archbox ~]# Can't locate JSON/XS.pm in @INC (@INC contains: ./lib /usr/lib/perl5/5.8.8/i686-linux-thread-multi /usr/lib/perl5/5.8.8 /usr/lib/perl5/site_perl/5.8.8/i686-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl/5.8.7/i686-linux-thread-multi /usr/lib/perl5/site_perl/5.8.7 /usr/lib/perl5/site_perl/5.8.6/i686-linux-thread-multi /usr/lib/perl5/site_perl/5.8.6 /usr/lib/perl5/site_perl/5.8.5/i686-linux-thread-multi /usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl/5.8.4/i686-linux-thread-multi /usr/lib/perl5/site_perl/5.8.4 /usr/lib/perl5/site_perl/5.8.3/i686-linux-thread-multi /usr/lib/perl5/site_perl/5.8.3 /usr/lib/perl5/site_perl/5.8.2/i686-linux-thread-multi /usr/lib/perl5/site_perl/5.8.2 /usr/lib/perl5/site_perl/5.8.1/i686-linux-thread-multi /usr/lib/perl5/site_perl/5.8.1 /usr/lib/perl5/site_perl/5.8.0/i686-linux-thread-multi /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl .) at lib/Davemp.pm line 23, <DATA> line 11.
BEGIN failed--compilation aborted at lib/Davemp.pm line 23, <DATA> line 11.
Compilation failed in require at ./davempd.pl line 18, <DATA> line 11.
BEGIN failed--compilation aborted at ./davempd.pl line 18, <DATA> line 11.

I tried to install JSON throug perl with a command I found at the davemp homepage, but the result is still the same.
Is there maybe something wrong with the JSON package, or do I somehow need to direct davemp to where JSON lies?

Thank you for all the help smile
Kristoffer

Last edited by Stoffi (2008-01-31 18:06:53)

Offline

#13 2008-01-31 20:43:39

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,391

Re: [REQUEST] davemp (a web interface for mpd)

I think you are right and something is wrong with the json-package.

Another possibility is that davemp relies on a too old version of json. The Readme wants us to have json 1.0. The recent version is 2.02.

Sorry, no solution.

Offline

#14 2008-02-05 23:01:22

Stoffi
Member
Registered: 2007-03-15
Posts: 107

Re: [REQUEST] davemp (a web interface for mpd)

I have managed to get it to work.
Now I wonder how I get back to scratch, so that I can figure out exactly which perl-modules davemp needs.
The davemp that I have installed now doesn't seem to read the config file either, shouldn't the config file be placed in /etc/<something> also?

Offline

#15 2008-02-07 03:55:47

Stoffi
Member
Registered: 2007-03-15
Posts: 107

Re: [REQUEST] davemp (a web interface for mpd)

I cant figure out how to remove perl modules, other than it is not supposed to be possible. sad
I have installed some perl modules, and I wonder if JSON is needed when I have JSON::XS (which is needed by davemp)

I'm also wondering if it is possible to set perl modules as dependencies in the PKGBUILD?
Class::Accessor::Fast and JSON::XS was the missing modules that I needed to get davemp to work, alltough it doesn't seem to read the config file.
I also got a warning about using JSON::XS::to_JSON on line 71 in Davemp.pm.  it needs to be chonged to encode_json, is this modification possible to do in the pkgbuild also?

Offline

Board footer

Powered by FluxBB