You are not logged in.
Hi all, I've been trying to write my first PKGBUILD, this time reading the wiki attentively.
I was in need of a package called ratmen, a little app for ratpoison (but not only), which creates a X menu using the command line. I still don't really understand what use I could make of it, but there is a script using it quite nicely (window-menu, so I thought I could give it a go. Everything worked fine, but I'm not sure I can post it in AUR yet, I would like some feedback from more experienced users. Thanks
# Contributor: Emmanuele Massimi <finferflu@gmail.com>
pkgname=ratmen
pkgver=2.2.2
pkgrel=1
pkgdesc="ratmen is a program derived from ratmenu (although some code was copied and
pasted directly from its parent 9menu). This program is intended for use with
ratpoison, but I guess it'll work fine with 9wm and other similarly-minded
window managers."
arch=('i686')
url=""
license=('GPL')
depends=(perl)
makedepends=()
provides=(ratmen)
conflicts=()
replaces=(ratmen)
install=
source=(http://www.update.uu.se/~zrajm/programs/ratmen/$pkgname-$pkgver.tar.gz)
md5sums=('0091cb16db87951b9e19a9ee4b4cd08c')
build() {
cd "$startdir/src/$pkgname-$pkgver"
pod2man ./ratmen.c > ratmen.1
make || return 1
make PREFIX="$startdir/pkg" install
}
I'm not entirely sure where to find the makedepends and conflicts arguments, if any.
Last edited by finferflu (2007-10-16 14:43:00)
Have you Syued today?
Free music for free people! | Earthlings
"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." -- A. de Saint-Exupery
Offline
why does it provide and replace itself? That's not necessary, and probably wrong/confusing. I doubt it conflicts with anything.
Also, that description is HUGE. Try shortening it down a bit.
To find makedepends, you'd probably need to look at the app's documentation.
Offline
Thanks Cerebral, I admit I was a bit confused by those two entries you mentioned. As for the app's documentation, there is only one README file which doesn't explain anything. In fact I had to look into the Gentoo ebuild they provided in order to understand how to compile it successfully...
So, so far I'm at this point:
# Contributor: Emmanuele Massimi <finferflu@gmail.com>
pkgname=ratmen
pkgver=2.2.2
pkgrel=1
pkgdesc="Display a simple X menu consisting of user defined entries."
arch=('i686')
url="http://ratpoison.antidesktop.net/cgi-bin/wiki/ratmen"
license=('GPL')
depends=(perl)
makedepends=()
conflicts=()
install=
source=(http://www.update.uu.se/~zrajm/programs/ratmen/$pkgname-$pkgver.tar.gz)
md5sums=('0091cb16db87951b9e19a9ee4b4cd08c')
build() {
cd "$startdir/src/$pkgname-$pkgver"
pod2man ./ratmen.c > ratmen.1
make || return 1
make PREFIX="$startdir/pkg" install
}
Last edited by finferflu (2007-10-16 15:28:00)
Have you Syued today?
Free music for free people! | Earthlings
"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." -- A. de Saint-Exupery
Offline
Hrm, interesting - mind posting a screenshot?
Offline
makedepends=()
conflicts=()install=
those lines are not needed and should be removed if u dont use them
There shouldn't be any reason to learn more editor types than emacs or vi -- mg (1)
[You learn that sarcasm does not often work well in international forums. That is why we avoid it. -- ewaller (arch linux forum moderator)
Offline
@ phrakture
There you go, this is a menu I have made up with a simple sh script, so that I could invoke it with a ratpoison keybinding:
This is the script, by the way:
#!/bin/sh
ratmen -c -d## firefox##firefox pidgin##pidgin thunar##thunar gpicview##gpicview vlc##vlc beepmp##beep-media-player inkscape##inkscape gimp##gimp
@ dolby
Ok, thank you. What is the "install" entry for, anyway? I couldn't find it on the wiki.
Do you think I am able to add it to AUR at this stage?
# Contributor: Emmanuele Massimi <finferflu@gmail.com>
pkgname=ratmen
pkgver=2.2.2
pkgrel=1
pkgdesc="Display a simple X menu consisting of user defined entries."
arch=('i686')
url="http://ratpoison.antidesktop.net/cgi-bin/wiki/ratmen"
license=('GPL')
depends=(perl)
source=(http://www.update.uu.se/~zrajm/programs/ratmen/$pkgname-$pkgver.tar.gz)
md5sums=('0091cb16db87951b9e19a9ee4b4cd08c')
build() {
cd "$startdir/src/$pkgname-$pkgver"
pod2man ./ratmen.c > ratmen.1
make || return 1
make PREFIX="$startdir/pkg" install
}
Last edited by finferflu (2007-10-16 20:24:25)
Have you Syued today?
Free music for free people! | Earthlings
"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." -- A. de Saint-Exupery
Offline
Ok, thank you. What is the "install" entry for, anyway? I couldn't find it on the wiki.
its for when u want to exec something or make an action pre or/and post installation and so on of the package. eg a simple one would be this
Last edited by dolby (2007-10-16 21:37:18)
There shouldn't be any reason to learn more editor types than emacs or vi -- mg (1)
[You learn that sarcasm does not often work well in international forums. That is why we avoid it. -- ewaller (arch linux forum moderator)
Offline
Thanks dolby
I have uploaded the PKGBUILD on AUR, since nobody seemed worried: http://aur.archlinux.org/packages.php?d … 1&ID=13347
Have you Syued today?
Free music for free people! | Earthlings
"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." -- A. de Saint-Exupery
Offline
Ahh.. I'm worried.
Actually, that's not true - mildly curious would be more accurate. When you built this, did you notice where it was installed to? To be more specific, your PREFIX is not quite right, as it installed the executable to /bin, and the man page to /man, instead of /usr/bin and /usr/man respectively.
I'd also suggest using namcap to check the package, as you have a missing dependency.
Offline
Thanks tomk, so, should I change PREFIX to $startdir/pkg/usr?
also, what is namcap? I guess I should find out by myself
Have you Syued today?
Free music for free people! | Earthlings
"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." -- A. de Saint-Exupery
Offline
Ok, now everything is alright, thanks for suggesting me namcap
# Contributor: Emmanuele Massimi <finferflu@gmail.com>
pkgname=ratmen
pkgver=2.2.2
pkgrel=1
pkgdesc="Display a simple X menu consisting of user defined entries."
arch=('i686')
url="http://ratpoison.antidesktop.net/cgi-bin/wiki/ratmen"
license=('GPL')
depends=('libx11-xcb')
source=(http://www.update.uu.se/~zrajm/programs/ratmen/$pkgname-$pkgver.tar.gz)
md5sums=('0091cb16db87951b9e19a9ee4b4cd08c')
build() {
cd "$startdir/src/$pkgname-$pkgver"
pod2man ./ratmen.c > ratmen.1
make || return 1
make PREFIX="$startdir/pkg/usr" install
}
Have you Syued today?
Free music for free people! | Earthlings
"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." -- A. de Saint-Exupery
Offline
so... is it a perl app? namcap doesn't quite properly detect perl or python deps, afaik. If namcap told you perl wasn't a dep, but you KNOW it's a perl app, then add 'perl' as a dep.
Offline
Owww! It tricked me. I thought it wasn't needed because perl is part of the core repos, so I thought it was also part of the base system... see how far my logic goes?
Let me re-update it now...
# Contributor: Emmanuele Massimi <finferflu@gmail.com>
pkgname=ratmen
pkgver=2.2.2
pkgrel=1
pkgdesc="Display a simple X menu consisting of user defined entries."
arch=('i686')
url="http://ratpoison.antidesktop.net/cgi-bin/wiki/ratmen"
license=('GPL')
depends=('perl' 'libx11-xcb')
source=(http://www.update.uu.se/~zrajm/programs/ratmen/$pkgname-$pkgver.tar.gz)
md5sums=('0091cb16db87951b9e19a9ee4b4cd08c')
build() {
cd "$startdir/src/$pkgname-$pkgver"
pod2man ./ratmen.c > ratmen.1
make || return 1
make PREFIX="$startdir/pkg/usr" install
}
Last edited by finferflu (2007-10-17 20:57:15)
Have you Syued today?
Free music for free people! | Earthlings
"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." -- A. de Saint-Exupery
Offline
Owww! It tricked me. I thought it wasn't needed because perl is part of the core repos, so I thought it was also part of the base system... see how far my logic goes?
Even if a dependency is part of the core repo, it's a good idea to specify it anyway as a dependency for self-documentation purposes, and as not to screw up the users who might not have all of the core packages installed. It's not the norm, but there are quite a few people out there who trim down all the packages they don't think they need, even if they are in core.
Offline
Thanks, elasticdog
I think that posting my first PKGBUILD here has been an excellent idea, I'm learning lots of new things.
One more reason to love Arch
Have you Syued today?
Free music for free people! | Earthlings
"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." -- A. de Saint-Exupery
Offline