You are not logged in.

#1 2008-05-31 18:14:19

lardon
Member
Registered: 2008-05-31
Posts: 264
Website

First PKGBUILD, please review

I've just created my first PKGBUILD, would you mind reviewing it before I post it to AUR?

# Contributor: Joel Schaerer <joel.schaerer@laposte.net>
pkgname=textext
pkgver=0.4.2
pkgrel=1
pkgdesc="Great extension to the inkscape drawing program which lets you add LaTeX equations to your inkscape document"
arch=(i686 x86_64)
url="http://www.elisanet.fi/ptvirtan/software/textext/"
license=('BSD')
groups=()
depends=(inkscape texlive-core python-lxml pstoedit)
makedepends=()
install=
source=(http://www.elisanet.fi/ptvirtan/software/textext/$pkgname-$pkgver.tar.gz)
md5sums=('448051b36169a06473519c83f20338d8') #generate with 'makepkg -g'

build() {
      cd "$srcdir"

      mkdir -p "${startdir}/pkg/usr/share/inkscape/extensions/"
      install -m 755 textext.py  "${startdir}/pkg/usr/share/inkscape/extensions/"
      install -m 644 textext.inx "${startdir}/pkg/usr/share/inkscape/extensions/"
    }

Autojump, the fastest way to navigate your filesystem from the command line!

Offline

#2 2008-05-31 19:30:39

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

Re: First PKGBUILD, please review

Works like a charm! Thank you!

Some formal, very minor issues:
* Arrays like (i686 x86_64) should be written ('i686' 'x86_64'). Also valid for the depends.
* Delete empty fields (groups, makedepends, install)
* replace mkdir -p by install -d

Also formal, but less minor and not your fault: There is no clear license statement made by the author. "BSD" is not a license, but an idea of a license, or a bunch of similar licenses. I would put an echo line with some sentence at the end of the PKGBUILD, redirected to $startdir/pkg/usr/share/licenses/$pkgname/BSD.

Offline

#3 2008-05-31 19:38:13

lardon
Member
Registered: 2008-05-31
Posts: 264
Website

Re: First PKGBUILD, please review

Thanks for the answer! I've corrected the three minor issues.

I'm aware of the license problem, and I wrote to the author to request a more formal license. He has added a LICENSE.txt to the project and will include it in the next release, but I don't really know what to do in the mean time.


Autojump, the fastest way to navigate your filesystem from the command line!

Offline

#4 2008-05-31 19:54:59

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

Re: First PKGBUILD, please review

Well, as long as the program is not in the AUR, there isn't a problem IMHO. Just wait. Or is the license file available somewhere? You can put it into the source array then and upload it in the PKGBUILD's tarball.

Offline

#5 2008-05-31 20:37:58

lardon
Member
Registered: 2008-05-31
Posts: 264
Website

Re: First PKGBUILD, please review

Ok, I've added the license and added it to the AUR:

http://aur.archlinux.org/packages.php?ID=17267

Any comments welcome.


Autojump, the fastest way to navigate your filesystem from the command line!

Offline

#6 2008-06-01 01:09:28

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

Re: First PKGBUILD, please review

Looks very good for a first PKGBUILD

Minor comments in the quest for perfection:
- You can use ${pkgdir} instead of ${startdir}/pkg. 
- Items in the source array do not need quoted
- You can remove the comment #generate with 'makepkg -g'

Offline

#7 2008-06-01 02:31:46

pelle.k
Member
From: Åre, Sweden (EU)
Registered: 2006-04-30
Posts: 667

Re: First PKGBUILD, please review

Install with -Dm instead of assuming those directories are there. It's a good habit to do so.

      install -Dm 755 textext.py  "${pkgdir}/usr/share/inkscape/extensions/textext.py"
      install -Dm 644 textext.inx "${pkgdir}/usr/share/inkscape/extensions/textext.inx"

Last edited by pelle.k (2008-06-01 02:32:17)


"Your beliefs can be like fences that surround you.
You must first see them or you will not even realize that you are not free, simply because you will not see beyond the fences.
They will represent the boundaries of your experience."

SETH / Jane Roberts

Offline

#8 2008-06-01 03:01:17

bender02
Member
From: UK
Registered: 2007-02-04
Posts: 1,328

Re: First PKGBUILD, please review

I would appreciate a bit more straightforward description, like "An inkscape extension which lets you add LaTeX equations to your drawings". But that's just my personal preference. I personally would not use word "great" in the description, since
1) it should be as short as possible
2) it's really up to every user to decide if he/she thinks whether it's great or not.

Offline

#9 2008-06-01 08:30:30

lardon
Member
Registered: 2008-05-31
Posts: 264
Website

Re: First PKGBUILD, please review

Thank you all for your comments! I've taken your remarks into account, and created a second release of the package.

One little question: I can't find the package with yaourt. Should I just wait some time or am I missing something?


Autojump, the fastest way to navigate your filesystem from the command line!

Offline

Board footer

Powered by FluxBB