You are not logged in.

#1 2008-10-23 15:30:17

AsA
Member
From: Milan - Italy
Registered: 2008-10-05
Posts: 40

My first PKGBUILD - Accentuate 1.0

Hi everyone, I started to practice some ABS, and i created a simple PKGBUILD to install accentuate (it's a fork of KeyJnote, now unreachable for legal issues), a software to present pdf or png slideshows with interesting (and sometimes hidden) features.

Because it is the first PKGBUILD I'm going to release in the AUR, It would be great if someone gave me a little review of what I've done.

Here it is:

# Contributor: Asa Marco <marcoasa90 <at> gmail.com>

pkgname="accentuate-git"
pkgver=20081023
pkgrel=1
license="GPL"
arch=('i686' 'x86_64')
pkgdesc="Presentation tool based on KeyJNote, with many eyecandy effects"
depends=('python' 'python-opengl' 'python-pygame' 'pil' 'poppler')
makedepends=('git')
optdepends=('mplayer: needed to play audio and videos')
source=()
url="http://www.cs.rit.edu/~jrm8005/accentuate.html"
md5sums=()
_gitroot="git://repo.or.cz/accentuate.git"
_gitname="accentuate"

build() {
    git clone $_gitroot
     cd $startdir/src/$_gitname
    install -D -m755 accentuate ${startdir}/pkg/usr/bin/accentuate
}

Another way to make it works, could look like this:

...
source=('http://repo.or.cz/w/accentuate.git?a=snapshot;h=heads/master;sf=tgz')
url="http://www.cs.rit.edu/~jrm8005/accentuate.html"
md5sums=()
_gitname="accentuate"

build() {
  cd $startdir/src/$_gitname
  install -D -m755 accentuate ${startdir}/pkg/usr/bin/accentuate
}

Considering that the second option doesn't need any makedepends, what's the best approach?

Any suggestion is wellcome!


WINDOS - Windos Is Not a Decent Operating System

Help me improve my english!
If you notice bad grammar in my posts, please correct me! Thanks!

Offline

#2 2008-10-24 01:49:41

foutrelis
Developer
From: Athens, Greece
Registered: 2008-07-28
Posts: 705
Website

Re: My first PKGBUILD - Accentuate 1.0

I like the first way best and having git as an extra dependency isn't really an issue.

Now, the PKGBUILD looks great (considering it's your first), although there is room for improvement. For starters, you can base your package on /usr/share/pacman/PKGBUILD-git.proto (here's a newer version), which is a nice template for git packages. Doing so will help create a more sophisticated package whilst preventing order inconsistencies. Another thing you might want to do is to remove empty fields from the PKGBUILD (i.e.: source, md5sums, etc), purely for aesthetic reasons. Lastly and more importantly, the license field must be an array instead of a string.

All three of the above are minor issues and shouldn't put you off. smile

Edit: You may as well leave python out of the dependencies list, as it's implicitly required by the rest of the python packages.

Last edited by foutrelis (2008-10-24 01:53:06)

Offline

#3 2008-10-24 02:08:49

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

Re: My first PKGBUILD - Accentuate 1.0

foutrelis wrote:

Another thing you might want to do is to remove empty fields from the PKGBUILD (i.e.: source, md5sums, etc), purely for aesthetic reasons.

I believe the source and md5 arrays are mandatory regardless of size.


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

Offline

#4 2008-10-24 14:05:37

AsA
Member
From: Milan - Italy
Registered: 2008-10-05
Posts: 40

Re: My first PKGBUILD - Accentuate 1.0

Thank for everything guys, now it's in the AUR, I corrected the PKGBUILD following your suggestions, and now looks quite different wink
The final result:
http://aur.archlinux.org/packages/accen … t/PKGBUILD

If you want to give it a try...http://aur.archlinux.org/packages.php?ID=20961; highlight boxes, spotlight and overview screen could really enhance your presentations. wink

edit: p.s. yes, source and md5sums are mandatory.

Last edited by AsA (2008-10-24 14:06:21)


WINDOS - Windos Is Not a Decent Operating System

Help me improve my english!
If you notice bad grammar in my posts, please correct me! Thanks!

Offline

#5 2008-10-24 15:13:39

foutrelis
Developer
From: Athens, Greece
Registered: 2008-07-28
Posts: 705
Website

Re: My first PKGBUILD - Accentuate 1.0

creslin wrote:

I believe the source and md5 arrays are mandatory regardless of size.

You're right. Thanks for the correction. smile

Offline

Board footer

Powered by FluxBB