You are not logged in.
Hi there
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
Kristoffer
Offline
Anyone?
Please?
:'(
Offline
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.
Offline
# 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
# 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
Yeah my pkgbuild is not complete....just a step for you in the right direction....
Mr Green
Offline
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
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!
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
*On my way at becoming a linux pro*
Offline
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
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
Kristoffer
Offline
Yes, you should try
#!/bin/sh
verz=`pwd`
cd /usr/share/davemp
perl ./davempd.pl davemp.conf &
cd $verz
Offline
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
Kristoffer
Last edited by Stoffi (2008-01-31 18:06:53)
Offline
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
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
I cant figure out how to remove perl modules, other than it is not supposed to be possible.
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