You are not logged in.

#1 2008-11-17 11:51:32

Roberth
Member
From: The Pale Blue Dot
Registered: 2007-01-12
Posts: 894

Issue with simple PKGBUILD

Hello, I have created this PKGBUILD:

pkgname=mpdas
pkgver=0.2.2
pkgrel=1
pkgdesc="C++ last.fm Client for MPD" 
arch=('i686' 'x86_64')
url="http://50hz.ws/mpdas/"
license=('CUSTOM')
depends=('curl' 'libmpd')
install=
makedepends=()
source=('http://50hz.ws/mpdas/mpdas-0.2.2.tar.bz2')
md5sums=()

build() {
    cd ${startdir}/src/${pkgname}-${pkgver}
    make || return 1
    make DESTDIR="$pkgdir/" install
}

But it's trying to install into /usr, what am I doing wrong?


Use the Source, Luke!

Offline

#2 2008-11-17 12:07:35

creslin
Member
Registered: 2008-10-04
Posts: 241

Re: Issue with simple PKGBUILD

Their makefile doesn't have DESTDIR.  Try this:

make PREFIX="$pkgdir/usr" install

or you could replace the make install line with a manual install since it's just 1 file:

install -Dm755 mpdas "$pkgdir/usr/bin/mpdas"

Last edited by creslin (2008-11-17 12:18:43)


ARCH|awesome3.0 powered by Pentium M 750 | 512MB DDR2-533 | Radeon X300 M
The journey is the reward.

Offline

#3 2008-11-17 16:49:20

Roberth
Member
From: The Pale Blue Dot
Registered: 2007-01-12
Posts: 894

Re: Issue with simple PKGBUILD

Hmmm I need an init script for this applicasion how do I create that?

I found something some script and modified it:

#!/bin/bash

. /etc/rc.conf
. /etc/rc.d/functions

PID=`pidof -o %PPID /usr/bin/mpdas`
case "$1" in
start)
stat_busy "Starting mpdas"
/usr/bin/mpdas
if [ $? -gt 0 ]; then
stat_fail
else
stat_done
add_daemon mpdas
fi

;;
stop)
stat_busy "Stoping mpdas"
[ ! -z "$PID" ] && kill $PID &> /dev/null
if [ $? -gt 0 ]; then
stat_fail
else
stat_done
rm_daemon mpdas
fi
;;
restart)
$0 stop
sleep 1
$0 start
;;
*)
echo "usage: $0 {start|stop|restart}" 
esac
install -D $srcdir/mpdas.init $pkgdir/etc/rc.d/mpdas

Would this work?

Last edited by Roberth (2008-11-17 17:12:24)


Use the Source, Luke!

Offline

#4 2008-11-17 21:51:25

voteforpedro36
Member
Registered: 2008-08-06
Posts: 99

Re: Issue with simple PKGBUILD

Roberth wrote:

Hmmm I need an init script for this applicasion how do I create that?

I found something some script and modified it:

#!/bin/bash

. /etc/rc.conf
. /etc/rc.d/functions

PID=`pidof -o %PPID /usr/bin/mpdas`
case "$1" in
start)
stat_busy "Starting mpdas"
/usr/bin/mpdas
if [ $? -gt 0 ]; then
stat_fail
else
stat_done
add_daemon mpdas
fi

;;
stop)
stat_busy "Stoping mpdas"
[ ! -z "$PID" ] && kill $PID &> /dev/null
if [ $? -gt 0 ]; then
stat_fail
else
stat_done
rm_daemon mpdas
fi
;;
restart)
$0 stop
sleep 1
$0 start
;;
*)
echo "usage: $0 {start|stop|restart}" 
esac
install -D $srcdir/mpdas.init $pkgdir/etc/rc.d/mpdas

Would this work?

Why do you want a daemon for a client of a music player that is a daemon?

Offline

#5 2008-11-28 02:01:20

Execute_Method
Member
From: Tennessee
Registered: 2008-07-26
Posts: 105

Re: Issue with simple PKGBUILD

voteforpedro36 wrote:

Why do you want a daemon for a client of a music player that is a daemon?

this is a last.fm scrobbler client that takes your nowplaying and scrobbles it to last.fm


to the OP: try out scrobby, that's what I currently use for last.fm client.
http://bbs.archlinux.org/viewtopic.php?pid=454761



EDIT: sorry, just noticed you are already using it.... Never Mind

Last edited by Execute_Method (2008-11-28 02:03:09)

Offline

Board footer

Powered by FluxBB