You are not logged in.
This seems like it should not be a big problem, but I can't figure out how to fix it. I'm writing a PKGBUILD for a program called JAGS (http://calvin.iarc.fr/~martyn/software/jags/). When I use "pkgname = JAGS", the PKGBUILD works perfectly for my purposes, but in the spirit of providing public goods I thought I'd submit it to AUR, which requires the pkgname to be all lower caps. This little detail is causing me problems. (The non-working PKGBUILD is below, and becomes the working PKGBUILD if you switch out the pkgname.)
The source file online is called JAGS-1.0.3.tar.gz. Fine, so I added "$pkgname-$pkgver.tar.gz::" to the beginning of the source url. However, when this file is extracted, it takes the name of the original source file (JAGS in all caps), and then when the build function tries to cd $pkgname-$pkgver it gives errors.
How would you deal with this? Of course I can just change the cd command, but I prefer that the directory be consistent with the package name. Should I add the whole tarball to the noextract argument and include a different tar command in the build function?
pkgname=jags
pkgver=1.0.3
pkgrel=1
pkgdesc="Bayesian hierarchical models using Markov Chain Monte Carlo (MCMC) simulation"
arch=('x86_64')
url="http://calvin.iarc.fr/~martyn/software/jags/"
license=('GPL')
makedepends=('gcc-fortran')
source=($pkgname-$pkgver.tar.gz::http://calvin.iarc.fr/~martyn/software/jags/JAGS-1.0.3.tar.gz)
md5sums=('fa94031290e23d47e26affc571f76e38')
build () {
cd "$srcdir/$pkgname-$pkgver"
./configure --prefix=/usr
make
make DESTDIR="$pkgdir/" install
}
Offline
Change:
cd "$srcdir/$pkgname-$pkgver"
to:
cd "$srcdir/JAGS-$pkgver"
Edit: You may also avoid renaming the tarball on download since this doesn't serve any purpose.
Last edited by foutrelis (2009-11-26 16:56:11)
Offline
All right, I guess I'll just do that. I didn't know if there was some preference for consistency between pkgnames and file names.
Thanks for replying!
Offline