You are not logged in.

#1 2009-07-11 06:19:59

s0ma
Member
From: Lansing, MI
Registered: 2009-06-02
Posts: 5
Website

First time PKGBUILDer trouble.

I am attempting to build a package for the development tip of Prosody (prosody-im) as my first attempt at making a PKGBUILD.  The source code is supposed to be cloned in the following code below.  It will update the package fine if it is already there but it fails on cloning with:

abort: HTTP Error 404: Not Found

Here is the pertinent parts from the PKGBUILD.

_hgroot="http://prosody.im/source/hg/"
_hgrepo="prosody-hg"

build() {
   cd ${srcdir}

   if [ -d ${_hgrepo}/.hg ]; then
       cd ${_hgrepo}
       hg pull -u || return 1
   else
       hg clone ${_hgroot} ${_hgrepo} || return 1
   fi


   msg "Mercurial checkout done or server timeout"
   msg "Starting make..."

If I run the command:

hg clone http://prosody.im/source/hg prosody-hg

from the command line it works without trouble.  I apologize if this is something simple I've missed.  Thanks in advance for any insight anybody can offer.

Last edited by s0ma (2009-07-11 06:24:00)

Offline

#2 2009-07-11 07:47:41

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

Re: First time PKGBUILDer trouble.

Pease post the complete PKGBUILD. Anyone who is thinking of helping you will need to run makepkg on it - with the excerpt above, they will have to recreate the PKGBUILD first.

Offline

#3 2009-07-11 07:55:41

djszapi
Member
From: Cambridge, United Kingdom
Registered: 2009-06-14
Posts: 1,439
Website

Re: First time PKGBUILDer trouble.

+1

And why don't you choose downloading from a http mirror ?

E.g. wget http://prosody.im/downloads/source/prosody-0.4.2.tar.gz

At some company every port is forbidden without http, and maybe it will work for you. smile

Offline

#4 2009-07-11 17:55:12

s0ma
Member
From: Lansing, MI
Registered: 2009-06-02
Posts: 5
Website

Re: First time PKGBUILDer trouble.

tomk: Here is the full PKGBUILD.  Sorry, I posted my initial message just before crashing out to go to sleep.

Its just the weird mercurial issue that has me stumped.  It'll probably turn out to be something stupid on my part.

http://zo.mbie.me/hackery/archlinux/prosody-hg/ - is where I have the other files at the moment if you need them.

pkgname=prosody-hg
pkgver=20090711
pkgrel=1
pkgdesc="Development tip of a lightweight and extensible Jabber/XMPP server written in Lua."
arch=('i686' 'x86_64')
url="http://prosody.im"
license=('MIT')
depends=('lua>=5.1' 'luasocket' 'luaexpat' 'luafilesystem' 'libidn>=0.5.18')
optdepends=('luasec: TLS/SSL support')
makedepends=('mercurial' 'gcc')
provides=('prosody')
conflicts=('prosody')
backup=('etc/prosody/prosody.cfg.lua'
        'etc/logrotate.d/prosody')

source=('prosody.rcd' 'prosody.logrotated')

md5sums=('f984c896ca77cc465a8b68092e83bbd6'
         '26466fdbea87963a3ca6f48f76fe4a29')

install=prosody.install

_hgroot=http://prosody.im/source/hg/
_hgrepo=prosody-hg

build() {
   cd ${srcdir}

   if [ -d ${_hgrepo}/.hg ]; then
       cd ${_hgrepo}
       hg pull -u || return 1
   else
       hg clone ${_hgroot} ${_hgrepo} || return 1
   fi

   msg "Mercurial checkout done or server timeout"
   msg "Starting make..."
 
   cp -r ${srcdir}/${_hgrepo} ${srcdir}/${_hgrepo}-build
   cd ${srcdir}/${_hgrepo}-build

   ./configure --prefix=/usr --sysconfdir=/etc/prosody \
    --datadir=/var/lib/prosody || return 1
   make || return 1
   make DESTDIR="$pkgdir" install || return 1

   install -d "$pkgdir/etc/rc.d" || return 1
   install -d "$pkgdir/etc/logrotate.d" || return 1
   install -d "$pkgdir/var/log/prosody" || return 1
   install -d "$pkgdir/var/run/prosody" || return 1
   install -o root -g root -m 644 "${srcdir}/${_hgrepo}/prosody.cfg.lua.dist" \
      "$pkgdir/etc/prosody/prosody.cfg.lua" || return 1
   install -o root -g root -m 755 "$startdir/prosody.rcd" \
      "$pkgdir/etc/rc.d/prosody" || return 1
   install -o root -g root -m 644 "$startdir/prosody.logrotated" \
      "$pkgdir/etc/logrotate.d/prosody" || return 1
  
   rm -rf ${srcdir}/${_hgrepo}-build  
 
}

djszapi: This PKGBUILD is for the development source, not the release source.  But good point about the forbidden ports.  I do not think that this is the case here though.

Offline

#5 2009-07-11 22:28:02

djszapi
Member
From: Cambridge, United Kingdom
Registered: 2009-06-14
Posts: 1,439
Website

Re: First time PKGBUILDer trouble.

But why do you want to use for this purpose a development version, if a stable release is available, and works much easier ?

Offline

#6 2009-07-11 23:46:57

dbb
Member
From: New York City
Registered: 2008-12-14
Posts: 31
Website

Re: First time PKGBUILDer trouble.

s0ma, I figured it out you want it to be:

_hgroot="http://prosody.im/source"
_hgrepo="hg"

Also I've re-added luasec as a hard dependency in prosody-devel, I figure it's easier for everyone that way. See: http://code.liqd.org/packages/prosody-d … 06bff48c77

Offline

#7 2009-07-12 13:23:50

s0ma
Member
From: Lansing, MI
Registered: 2009-06-02
Posts: 5
Website

Re: First time PKGBUILDer trouble.

Awesome, thanks dbb!

Offline

Board footer

Powered by FluxBB