You are not logged in.

#1 2013-05-15 19:27:14

kabads
Member
Registered: 2012-09-22
Posts: 139
Website

Creating new PKGBUILD - peer review - newbie alert

I've read most of the documentation about creating a new PKGBUILD and have created my own for foobillard.

The docs suggest posting the PKGBUILD here for feedback/criticism. How have I done for a first go? Anything I can do to improve? TIA

#Maintainer: Kabads <adam@monkeez.org>
pkgname=foobillard
pkgver=2.9
pkgrel=1
epoch=
pkgdesc="FooBillard is a billiards (pool) simulation under Linux/OpenGL. "
arch=('i686' 'x86_64')
url="http://foobillard.sourceforge.net"
license=('GPL')
groups=()
depends=()
makedepends=()
checkdepends=()
optdepends=()
provides=()
conflicts=()
replaces=()
backup=()
options=()
install=
changelog=
source=(http://downloads.sourceforge.net/foobillard/$pkgname-$pkgver.tar.gz)
noextract=()
md5sums=(b8b10d7d3ade07a9e0c497165beadbca) #generate with 'makepkg -g'

prepare() {
        cd "$srcdir/$pkgname-$pkgver"
}

build() {
        cd "$srcdir/$pkgname-$pkgver"
        ./configure --prefix=/usr
        make
}

Offline

#2 2013-05-15 19:35:21

bohoomil
Member
Registered: 2010-09-04
Posts: 2,376
Website

Re: Creating new PKGBUILD - peer review - newbie alert

Maybe now you can fill the template with some data? wink What dependencies are needed to build the package? What other packages does it depend on? Do you need to use 'epoch'? If not, remove the entry. Are other options (groups, optdepends, provides, etc) needed at all? If not -- remove them. Are you going to create a package or only build the source code (the package group is missing).


:: Registered Linux User No. 223384

:: github
:: infinality-bundle+fonts: good looking fonts made easy

Offline

#3 2013-05-15 19:35:31

karol
Archivist
Registered: 2009-05-06
Posts: 25,428

Re: Creating new PKGBUILD - peer review - newbie alert

For starters, I think you're missing the package() step, the one where 'make install' stuff.

Offline

#4 2013-05-15 19:39:01

kabads
Member
Registered: 2012-09-22
Posts: 139
Website

Re: Creating new PKGBUILD - peer review - newbie alert

My bad - my terminal wasn't open for the last two functions:

check() {
        cd "$srcdir/$pkgname-$pkgver"
        make -k check
}

package() {
        cd "$srcdir/$pkgname-$pkgver"
        make DESTDIR="$pkgdir/" install
}

Offline

#5 2013-05-15 19:46:11

karol
Archivist
Registered: 2009-05-06
Posts: 25,428

Re: Creating new PKGBUILD - peer review - newbie alert

You still need to fill in e.g. the makedependencies and dependencies i.e. the packages you have to have installed to build and run foobillard.
Try looking at what's mentioned on the website of the package http://foobillard.sourceforge.net/ and build it in clean chroot.

Offline

#6 2013-05-15 19:52:05

Raynman
Member
Registered: 2011-10-22
Posts: 1,094

Re: Creating new PKGBUILD - peer review - newbie alert

Your prepare() function does nothing, so you can remove that too.

Offline

#7 2013-05-15 20:21:55

graysky
Member
From: /run/user/1000
Registered: 2008-12-01
Posts: 8,528
Website

Re: Creating new PKGBUILD - peer review - newbie alert

Unrelated to the question of your PKGBUILD but...

% pacman -Ss foobillard
extra/foobillard++ 3.42beta-4
    An OpenGL billiard game

I looked but did not see a clear requirement of dependencies from upstream (based on the contents of the source).  Look at the Arch package I mentioned or failing that, you will have to take to google.  Ubuntu, Debian, and Gentoo all offer packages for it.  Start there.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#8 2013-05-15 20:29:41

karol
Archivist
Registered: 2009-05-06
Posts: 25,428

Re: Creating new PKGBUILD - peer review - newbie alert

foobillard++ is a different package.

http://arm.konnichi.com/search/index.ph … ommunity=1 has foobillard 3 (as I've already mentioned in OP's previous thread) and the dependencies mentioned for that package are similar to the ones mentioned on the website.

Offline

#9 2013-05-15 20:32:41

kabads
Member
Registered: 2012-09-22
Posts: 139
Website

Re: Creating new PKGBUILD - peer review - newbie alert

Thanks - will get on to it - if these things are done, is this suitable for submission to aur?

Offline

#10 2013-05-15 20:36:00

graysky
Member
From: /run/user/1000
Registered: 2008-12-01
Posts: 8,528
Website

Re: Creating new PKGBUILD - peer review - newbie alert

@kabads - Not as-is... you need to figure out the deps and makedeps.  Make sure you can build it in a clean chroot before submitting.

https://wiki.archlinux.org/index.php/De … ean_Chroot


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#11 2013-05-15 20:36:01

karol
Archivist
Registered: 2009-05-06
Posts: 25,428

Re: Creating new PKGBUILD - peer review - newbie alert

If it builds and installs - sure.
I think you should post the final PKGBUILD here, so we can test it before you upload it to the AUR.

Offline

#12 2013-05-16 05:43:38

kabads
Member
Registered: 2012-09-22
Posts: 139
Website

Re: Creating new PKGBUILD - peer review - newbie alert

Thanks - not sure of make dependencies - it built with the base-devel package and without very little invervention from me.

Here's the edited PKGBUILD - if someone could try it for me that would be good.

http://pastebin.com/kSz6tEhX

Thanks

Offline

#13 2013-05-16 06:16:44

Scimmia
Bug Wrangler
Registered: 2012-09-01
Posts: 4,978

Re: Creating new PKGBUILD - peer review - newbie alert

Doesn't build here. You forgot some deps at the very least, 'glu' 'libxaw' and 'libxi'. Even then, I'm getting undefined references to glCombiner* (a few dozen of them)

Also, you should not have the name of the package in the description. Get rid of "FooBillard is".

Edit, if you're able to make a package, run namcap on it. I'll help you track down missing deps.

Last edited by Scimmia (2013-05-16 06:21:36)

Offline

#14 2013-05-16 07:18:48

kabads
Member
Registered: 2012-09-22
Posts: 139
Website

Re: Creating new PKGBUILD - peer review - newbie alert

@Scimmia - thanks - the namcap looks really good. I'll include those.

Offline

#15 2013-05-16 08:36:26

graysky
Member
From: /run/user/1000
Registered: 2008-12-01
Posts: 8,528
Website

Re: Creating new PKGBUILD - peer review - newbie alert

You also wanna build it in a lean chroot.  See the link I posted.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#16 2013-05-16 11:19:46

karol
Archivist
Registered: 2009-05-06
Posts: 25,428

Re: Creating new PKGBUILD - peer review - newbie alert

Offline

Board footer

Powered by FluxBB