You are not logged in.

#1 2008-06-02 03:04:10

violagirl23
Member
Registered: 2008-01-24
Posts: 184

[SOLVED] Made a pymtp packagebuild, made a mistake?

I made my first package build to submit to the AUR. The install script is in the directory made by the tarball, so I figured just a cd $startdir would suffice, but I must be missing something, because makepkg spits out

python: can't open file 'setup.py': [Errno 2] No such file or directory

so I must not be cd'ing to the right directory.
Here is my package build:

# Contributer: Megan M<violagirl23@gmail.com>

pkgname=pymtp
pkgver=0.0.4
pkgrel=1
pkgdesc="LibMTP bindings in Python"
arch=('i686' 'x86_64')
url="http://nick125.com/projects/pymtp/"
license=('GPL')
depends=('libmtp>=0.2.6' 'python>=2.5')
source=(http://downloads.nick125.com/projects/${pkgname}/${pkgname}-${pkgver}.tar.bz2)
md5sums=('5eff39cbcc2e073228df04fe1ab1fce8')
build()
{
    cd $startdir/
    python setup.py build
    python setup.py install --root=$startdir/pkg/
}

So what is the small mistake I made, and how can I fix it? smile

Last edited by violagirl23 (2008-07-17 23:27:37)


"You can't just ask to borrow somebody else's lampshade. It's AWKWARD!"

Offline

#2 2008-06-02 03:22:05

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,396
Website

Re: [SOLVED] Made a pymtp packagebuild, made a mistake?

The tarballs are extracted in the "${startdir}/src/" or equivalently "${srcdir}" directory.  You probably want to "cd ${srcdir}/${pkgname}-${pkgver}"  or whatever directory is made when extracting the source file.

Offline

#3 2008-06-02 03:55:52

violagirl23
Member
Registered: 2008-01-24
Posts: 184

Re: [SOLVED] Made a pymtp packagebuild, made a mistake?

All right, I changed that and all seemed to be well. Other than that, does there seem to be any problems with it? It is a fairly simple little package, and it does not look like I missed anything else.


"You can't just ask to borrow somebody else's lampshade. It's AWKWARD!"

Offline

#4 2008-06-02 03:58:19

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,396
Website

Re: [SOLVED] Made a pymtp packagebuild, made a mistake?

Apart from that, it looks really good.  Go ahead and upload it.

Offline

#5 2008-06-02 05:44:59

violagirl23
Member
Registered: 2008-01-24
Posts: 184

Re: [SOLVED] Made a pymtp packagebuild, made a mistake?

Ah, one more thing, at the developer's request I created a .install file to echo a message once you install it and uploaded it with the .install file included, but when I install it, the message doesn't seem to be showing to the screen. How would I do that? (I just made it by copying the format on another .install file I saw).
Here is the file:
pymtp.install:

## arg 1:  the new package version
post_install() {
    echo -n "To install documentation for PyMTP, install epydoc and issue the following command to have the documentation installed in <output directory>: epydoc -o <output directory> pymtp.py"
}

"You can't just ask to borrow somebody else's lampshade. It's AWKWARD!"

Offline

#6 2008-06-02 05:51:55

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,396
Website

Re: [SOLVED] Made a pymtp packagebuild, made a mistake?

You have to add an "install=ptmtp.install" line to the PKGBUILD.  I would split that echo statement over a couple of lines as well.

Offline

#7 2008-06-02 06:28:22

violagirl23
Member
Registered: 2008-01-24
Posts: 184

Re: [SOLVED] Made a pymtp packagebuild, made a mistake?

Okay, I have done this and it works. One last thing. Is there any easy way to print the same message for both post_install() and post_upgrade()? I merely copied the message and put it in twice but suspect there is a more efficient way.


"You can't just ask to borrow somebody else's lampshade. It's AWKWARD!"

Offline

#8 2008-06-02 07:34:33

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

Re: [SOLVED] Made a pymtp packagebuild, made a mistake?

You can just call post_install in post_upgrade.

Offline

#9 2008-06-04 22:15:45

violagirl23
Member
Registered: 2008-01-24
Posts: 184

Re: [SOLVED] Made a pymtp packagebuild, made a mistake?

Thanks, I did that. Is it normal to not submit a package but not see an update? I submitted the edited version and it said it was submitted successfully but the package page still seems to be using the one from two days ago. Do I have the change pkgrel to 2 to make it work? It just seemed unnecessary to me, as the build is exactly the same as before.


"You can't just ask to borrow somebody else's lampshade. It's AWKWARD!"

Offline

#10 2008-06-04 22:31:20

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,396
Website

Re: [SOLVED] Made a pymtp packagebuild, made a mistake?

I'm guessing you figured this out given it has been resubmitted?

Offline

#11 2008-06-04 22:36:09

violagirl23
Member
Registered: 2008-01-24
Posts: 184

Re: [SOLVED] Made a pymtp packagebuild, made a mistake?

I guess it just took a while to show is all, yes. After about half an hour it had updated it.
Marking as SOLVED!


"You can't just ask to borrow somebody else's lampshade. It's AWKWARD!"

Offline

Board footer

Powered by FluxBB