You are not logged in.

#1 2012-02-11 00:22:47

bananagranola
Member
From: US
Registered: 2011-08-07
Posts: 88
Website

First Time Making PKGBUILD: xhotkeys

I wanted to try out a keybinding program called xhotkeys (I like to look aroudn for alternative programs constantly, and noticed that xbindkeys has quite a few dependencies), but when I went to install it from the AUR, it gave me some errors. (Namely, that /usr/share/applications and /usr/share/pixmaps existed.) After checking out the AUR website itself, I discovered that someone had posted that the project page had moved from what the existing PKGBUILD pointed to. So I figured that I had a chance to try to learn how to make PKGBUILDS. I cobbled this together, basing it on the sample PKGBUILD-python:

# Contributor: rainermoerlinghartheim@yahoo.com
pkgname=xhotkeys
pkgver=0.1.2
pkgrel=1
pkgdesc="A simple and easily configurable hotkey launcher in pygtk"
url="http://code.google.com/p/xhotkeys/"
depends=('python2' 'python-xlib' 'python-configobj')
optdepends=('kiwi: xhotkeys-gui support')
arch=('any')
license=('GPL')
source=(http://xhotkeys.googlecode.com/files/xhotkeys-$pkgver.tgz)
epoch=1
md5sums=('edaeb79453ed4e9abc4bf0a60de183f8')
package() {
    cd "$srcdir/$pkgname-$pkgver"
    python2 setup.py install --root="$pkgdir/" --optimize=1
}

# vim:set ts=2 sw=2 et:

It works, and I'm using it right now. I just wanted to check if I was doing anything glaringly wrong. I went through the Arch Packaging Standards at https://wiki.archlinux.org/index.php/Ar … _Standards, and I think it adheres. I ran the install.py script with --record to check that it didn't install to /usr/local.

The package comes with two parts: xbindkeysd, which only uses the python-xlib and python-configobj packages, and xbindkeys-gui, which uses the kiwi package as well. I wasn't sure how that was usually handled, in depends or in optdepends.

Also, a maintainer currently exists for the original website, http://www.nongnu.org/xhotkeys/. Should I be renaming the package? It's a newer version, but I think it's essentially the same program. Or should I contact the original maintainer? Or should I just not bother with uploading the PKGBUILD?

Thanks for any help. Sorry if I sound like a moron.

EDIT: changed contributor email.
EDIT: PKGBUILD.

Last edited by bananagranola (2012-02-11 01:34:51)

Offline

#2 2012-02-11 00:30:28

fsckd
Forum Fellow
Registered: 2009-06-15
Posts: 4,173

Re: First Time Making PKGBUILD: xhotkeys

You don't need

makedepends=('make')

as that is part of group base-devel and AUR users are expected to have that.

Googlecode xhotkeys page says the nongnu one is older. You should try contacting the AUR maintainer and if he fails to respond, ask on the AUR ml to orphan the package so you can upload an updated PKGBUILD.

Edit: Since this is a python 2 package you should add python2 to depends and change

arch=('i686' 'x86_64')

to

arch=('any')

Last edited by fsckd (2012-02-11 00:34:22)


aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies

Offline

#3 2012-02-11 00:52:12

bananagranola
Member
From: US
Registered: 2011-08-07
Posts: 88
Website

Re: First Time Making PKGBUILD: xhotkeys

Thanks, I've removed the makedepends line and changed the arch line. Am I handling the kiwi package correctly?

Offline

#4 2012-02-11 01:14:19

fsckd
Forum Fellow
Registered: 2009-06-15
Posts: 4,173

Re: First Time Making PKGBUILD: xhotkeys

I forgot to mention, if you do upload your PKGBUILD, be sure to set epoch (see man PKGBUILD) as the versioning changes.

As for kiwi, I don't know. The optdepends array looks fine to me. If you want to know whether it's optional or not, contact the upstream author of xhotkeys and ask him. smile


aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies

Offline

#5 2012-02-11 01:35:20

bananagranola
Member
From: US
Registered: 2011-08-07
Posts: 88
Website

Re: First Time Making PKGBUILD: xhotkeys

Thanks, I emailed the upstream author already. I've set epoch=1 and placed it just under source, since it's not in the Guidelines page so I wasn't sure what order it belonged in.

Offline

Board footer

Powered by FluxBB