You are not logged in.

#1 2008-01-17 17:34:20

max-k
Member
From: Lyon - France
Registered: 2007-11-23
Posts: 38

Can someone tell me what's wrong with my PKGBUILD ??

Hello, i have written a PKGBUILD for kodos, but there is a problem ... it doesn't works :-)

Here's the PKGBUILD :

# Contributor: max-k <max-k@post.com>
pkgname=kodos
pkgver=2.4.9
pkgrel=1
pkgdesc="The Python Regular Expression Debugger"
arch=(any)
url="http://kodos.sourceforge.net/"
license=('GPL')
depends=('python' pyqt' 'sip')
source=(http://ovh.dl.sourceforge.net/sourceforge/kodos/kodos-2.4.9.tar.gz)
md5sums=('d608c8b3484667d3a82ba6dfe29bb18d')

build() {
  cd ${startdir}/src/${pkgname}-${pkgver}
  python setup.py bdist
  tar -xzvf ./dist/${pkgname}-${pkgver}.linux-i686.tar.gz ${startdir}/pkg
  install -D -m 644 $startdir/kodos.desktop $startdir/pkg/usr/share/application$
}

I don't know what's wrong. Can someone help me ?

Another question, i have seen some packages who proposed to choose the sourceforge mirror to download the file from.
I don't know how to do this, does somenone have an idea ?

Offline

#2 2008-01-17 17:52:44

pressh
Developer/TU
From: Netherlands
Registered: 2005-08-14
Posts: 1,719

Re: Can someone tell me what's wrong with my PKGBUILD ??

max-k wrote:

depends=('python' pyqt' 'sip')

should be

depends=('python' 'pyqt' 'sip')

and please don't use mirrors in the source array (so dl.sourceforge.net should be used in this case)

[edit]
and this line is also wrong

  install -D -m 644 $startdir/kodos.desktop $startdir/pkg/usr/share/application$

not sure what you are trying to accomplish....i guess you have included a .desktop file yourself ???
in that case your line should be
install -Dm644 $startdir/src/kodos.desktop $startdir/pkg/usr/share/applications/kodos.desktop
and you should add kodos.desktop to the source array

Last edited by pressh (2008-01-17 21:21:22)

Offline

#3 2008-01-17 20:10:48

byte
Member
From: Düsseldorf (DE)
Registered: 2006-05-01
Posts: 2,046

Re: Can someone tell me what's wrong with my PKGBUILD ??

If you take a closer look at the dependencies, you can slim them down to this: depends=('pyqt')
Also, don't use dl.sf.net or specific mirrors: source=(http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz)

Last edited by byte (2008-01-17 20:12:10)


1000

Offline

#4 2008-01-17 20:21:04

max-k
Member
From: Lyon - France
Registered: 2007-11-23
Posts: 38

Re: Can someone tell me what's wrong with my PKGBUILD ??

thanks a lot
i'll correct it and upload my PKGBUILD

Offline

#5 2008-01-17 20:27:01

max-k
Member
From: Lyon - France
Registered: 2007-11-23
Posts: 38

Re: Can someone tell me what's wrong with my PKGBUILD ??

If i take a lokk at `install --help` the correct line seems to be :
install -D -m=644 ${startdir}/src/kodos.desktop ${startidr}/pkg/usr/share/applications/kodos.desktop
isn't it ?

Last edited by max-k (2008-01-17 20:27:18)

Offline

#6 2008-01-17 21:22:27

pressh
Developer/TU
From: Netherlands
Registered: 2005-08-14
Posts: 1,719

Re: Can someone tell me what's wrong with my PKGBUILD ??

max-k wrote:

If i take a lokk at `install --help` the correct line seems to be :
install -D -m=644 ${startdir}/src/kodos.desktop ${startidr}/pkg/usr/share/applications/kodos.desktop
isn't it ?

roll

pressh wrote:

install -Dm644 $startdir/src/kodos.desktop $startdir/pkg/usr/share/applications/kodos.desktop

Offline

#7 2008-01-17 21:26:13

max-k
Member
From: Lyon - France
Registered: 2007-11-23
Posts: 38

Re: Can someone tell me what's wrong with my PKGBUILD ??

Ok, here's my new PKGBUILD :

# Contributor: max-k <max-k@post.com>
pkgname=kodos
pkgver=2.4.9
pkgrel=1
pkgdesc="The Python Regular Expression Debugger"
arch=(any)
url="http://kodos.sourceforge.net/"
license=('GPL')
depends=('pyqt')
source=(http://downloads.sourceforge.net/sourceforge/${pkgname}/${pkgname}-${pk$
md5sums=('d608c8b3484667d3a82ba6dfe29bb18d')

build() {
  cd ${startdir}/src/${pkgname}-${pkgver}
  python setup.py bdist
  tar -xzvf ./dist/${pkgname}-${pkgver}.linux-i686.tar.gz ${startdir}/pkg
  install  -m 644 ${startdir}/src/kodos.desktop ${startidr}/pkg/usr/share/applications/kodos.desktop
}


it doesn't work because tar cannot create ${startdir}/pkg directory
I don't know how can i do.
`python setup.py bdist` create all that is needed by yaourt or abs to install the package but not in the correct directory and it "targzip" it
It creates it in ${startdir}/src/build and i need to copy it ("untargziped") in ${startdir}/pkg.

Last edited by max-k (2008-01-17 21:28:13)

Offline

#8 2008-01-17 21:38:17

max-k
Member
From: Lyon - France
Registered: 2007-11-23
Posts: 38

Re: Can someone tell me what's wrong with my PKGBUILD ??

I've tried this to but it doesn't work :

# Contributor: max-k <max-k@post.com>
pkgname=kodos
pkgver=2.4.9
pkgrel=1
pkgdesc="The Python Regular Expression Debugger"
arch=(any)
url="http://kodos.sourceforge.net/"
license=('GPL')
depends=('pyqt')
source=(http://downloads.sourceforge.net/sourceforge/${pkgname}/${pkgname}-${pkgver}.tar.gz)
md5sums=('d608c8b3484667d3a82ba6dfe29bb18d')

build() {
  cd ${startdir}/src/${pkgname}-${pkgver}
  python setup.py install
  install -D -m 644 ${startdir}/src/kodos.desktop ${startidr}/pkg/usr/share/applications/kodos.desktop
}

Offline

#9 2008-01-17 21:46:06

max-k
Member
From: Lyon - France
Registered: 2007-11-23
Posts: 38

Re: Can someone tell me what's wrong with my PKGBUILD ??

pressh wrote:
max-k wrote:

If i take a lokk at `install --help` the correct line seems to be :
install -D -m=644 ${startdir}/src/kodos.desktop ${startidr}/pkg/usr/share/applications/kodos.desktop
isn't it ?

roll

pressh wrote:

install -Dm644 $startdir/src/kodos.desktop $startdir/pkg/usr/share/applications/kodos.desktop

I don't understand why you say that : in the help of install, they tell us to use -D -m 644 or -D --mode=644

The problem isn't in this line, this line works.
I've made an other PKGBUILD which works well with the same line inside.

Last edited by max-k (2008-01-17 21:46:42)

Offline

#10 2008-01-17 22:07:26

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

Re: Can someone tell me what's wrong with my PKGBUILD ??

Short command flags can be concatenated (usually) - in this case, -D -m 644 is the same as -Dm644.

Offline

#11 2008-01-17 22:08:08

pressh
Developer/TU
From: Netherlands
Registered: 2005-08-14
Posts: 1,719

Re: Can someone tell me what's wrong with my PKGBUILD ??

max-k wrote:
pressh wrote:
max-k wrote:

If i take a lokk at `install --help` the correct line seems to be :
install -D -m=644 ${startdir}/src/kodos.desktop ${startidr}/pkg/usr/share/applications/kodos.desktop
isn't it ?

roll

pressh wrote:

install -Dm644 $startdir/src/kodos.desktop $startdir/pkg/usr/share/applications/kodos.desktop

I don't understand why you say that : in the help of install, they tell us to use -D -m 644 or -D --mode=644

The problem isn't in this line, this line works.
I've made an other PKGBUILD which works well with the same line inside.

Okay, let me try to explain it to you. You ask what to write in that line, I gave you already a working line in the first post. Second, in your line there is a spelling error. Third what is wrong in that line is that it tries to install a file which does not exist. You do need to create a .desktop file first before you can install it.
I suggest you read about that here

Further it seems you have not much of an idea what you are doing in the PKGBUILD. I hardly doubt you have  looked in setup.py. You really need to examine these custom scripts when you use them.

Anyways, this works for me (you may want to clean it up a bit tongue)

pkgname=kodos
pkgver=2.4.9
pkgrel=1
pkgdesc="The Python Regular Expression Debugger"
arch=(any)
url="http://kodos.sourceforge.net/"
license=('GPL')
depends=('pyqt')
source=(http://dl.sourceforge.net/sourceforge/kodos/kodos-2.4.9.tar.gz)
md5sums=('d608c8b3484667d3a82ba6dfe29bb18d')

build() {
  mkdir -p $startdir/pkg/usr/{bin,share}
  cd ${startdir}/src/${pkgname}-${pkgver}
    python setup.py build
   cd build
   cp -rf lib $startdir/pkg/usr/share/kodos/
   install -Dm755 scripts-2.5/kodos.py $startdir/pkg/usr/share/kodos/kodos.py
   ln -s /usr/share/kodos/kodos.py $startdir/pkg/usr/bin/kodos
#      install -D644 ${startdir}/src/kodos.desktop ${startdir}/pkg/usr/share/applications/kodos.desktop
      }

Last edited by pressh (2008-01-17 22:08:24)

Offline

#12 2008-01-18 01:28:54

max-k
Member
From: Lyon - France
Registered: 2007-11-23
Posts: 38

Re: Can someone tell me what's wrong with my PKGBUILD ??

I'm not stupid !
You haven't understand my question but it's not a problem, i have understand your answer.
I'll going to sleep now because it's 2:28am here.
Have a good night.

Offline

#13 2008-01-18 09:43:51

pressh
Developer/TU
From: Netherlands
Registered: 2005-08-14
Posts: 1,719

Re: Can someone tell me what's wrong with my PKGBUILD ??

max-k wrote:

I'm not stupid !
You haven't understand my question but it's not a problem, i have understand your answer.
I'll going to sleep now because it's 2:28am here.
Have a good night.

I'm sorry, it was not my intention for you to feel stupid. Guess I was a bit tired.
I'm glad your problem is now solved! smile

Offline

#14 2008-01-18 15:16:09

max-k
Member
From: Lyon - France
Registered: 2007-11-23
Posts: 38

Re: Can someone tell me what's wrong with my PKGBUILD ??

pressh wrote:

I'm sorry, it was not my intention for you to feel stupid. Guess I was a bit tired.

It's ok, no problem.

pressh wrote:

I'm glad your problem is now solved! smile

I've tried your solution and mine but any of them works when i publish my package to AUR.

Yours :

build() {
  mkdir -p $startdir/pkg/usr/{bin,share}
  cd ${startdir}/src/${pkgname}-${pkgver}
  python setup.py build
  cd build
  cp -rf lib $startdir/pkg/usr/share/kodos/
  install -Dm755 scripts-2.5/kodos.py $startdir/pkg/usr/share/kodos/kodos.py
  ln -s /usr/share/kodos/kodos.py $startdir/pkg/usr/bin/kodos
  install -D644 ${startdir}/kodos.desktop ${startdir}/pkg/usr/share/applications/kodos.desktop
}

Result :

running build_scripts
creating build/scripts-2.5
copying and adjusting kodos.py -> build/scripts-2.5
changing mode of build/scripts-2.5/kodos.py from 644 to 755
install: option invalide -- 6                                                            ----->               (oh ! this remind me something ;-))
Pour en savoir davantage, faites: « install --help ».
==> ERREUR: La compilation a échoué.
    Abandon...
Error: Makepkg was unable to build kodos package.


Mine :

build() {
cd ${startdir}/src/${pkgname}-${pkgver}
python setup.py bdist
cd dist
tar -xzvf ./${pkgname}-${pkgver}.linux-i686.tar.gz
cp -rf usr ${startdir}/pkg/
install -D -m 644 ${startdir}/kodos.desktop ${startdir}/pkg/usr/share/applications/kodos.desktop
}

Result :

==>  Continue installing 'kodos'? [Y/n]
==>  [v]iew package contents   [c]heck package with namcap
==>   ----------------------------------------------
==>y

erreur: l'ajout de la cible './kodos-2.4.9-1-i686.pkg.tar.gz' a échoué (ouverture du fichier paquet impossible)Chargement des données du paquet... ==> WARNING: Your package is saved in /tmp/kodos-2.4.9-1-i686.pkg.tar.gz
cp: ne peut évaluer `./kodos-2.4.9-1-i686.pkg.tar.gz': Aucun fichier ou répertoire de ce type
==> WARNING: Unable to copy kodos-1-i686.pkg.tar.gz to /tmp/ directory

Offline

#15 2008-01-18 15:22:15

pressh
Developer/TU
From: Netherlands
Registered: 2005-08-14
Posts: 1,719

Re: Can someone tell me what's wrong with my PKGBUILD ??

did you use a clean directory to try my PKGBUILD ? (I just copied it in a directory and ran makepkg and it builds cleanly for me)

Offline

#16 2008-01-19 00:33:46

max-k
Member
From: Lyon - France
Registered: 2007-11-23
Posts: 38

Re: Can someone tell me what's wrong with my PKGBUILD ??

i have uploaded a package to AUR (with the PKGBUILD and the .desktop file) and i have tried to install it from with yaourt package manager.

Last edited by max-k (2008-01-26 19:03:22)

Offline

#17 2008-01-21 23:48:02

max-k
Member
From: Lyon - France
Registered: 2007-11-23
Posts: 38

Re: Can someone tell me what's wrong with my PKGBUILD ??

up

Offline

#18 2008-01-26 08:36:56

max-k
Member
From: Lyon - France
Registered: 2007-11-23
Posts: 38

Re: Can someone tell me what's wrong with my PKGBUILD ??

if someone give me an idea, i'll be happy :-)

Offline

#19 2008-01-26 10:52:06

Xilon
Member
Registered: 2007-01-01
Posts: 243

Re: Can someone tell me what's wrong with my PKGBUILD ??

==> Finished making: kodos (Sat Jan 26 19:50:33 WST 2008)

pressh's PKGBUILD works fine for me.

Edit: Also, when pasting errors, please use LANG="C" makepkg, etc

Last edited by Xilon (2008-01-26 10:57:44)

Offline

#20 2008-01-26 10:57:27

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: Can someone tell me what's wrong with my PKGBUILD ??

max-k: Use a *clean* directory. As in:

cd /var/abs/local/pkgname
rm -rf pkg src

Offline

Board footer

Powered by FluxBB