You are not logged in.
Howdy,
I've tried everything and I can't get the pkgver() function to work. This is what I'm using (got it from the wiki):
pkgver() {
cd "$SRCDEST/lcsgame"
svnversion | tr -d [A-z]
}
Here's the PKGBUILD
pkgname=lcs-svn
pkgver() {
cd "$SRCDEST/lcsgame"
svnversion | tr -d [A-z]
}
pkgrel=1
pkgdesc="A satirical console-based political role-playing/strategy game in which you recruit a team of Elite Liberal radicals and try to save the United States from a descent into Arch-Conservatism."
arch=('i686' 'x86_64')
url="http://sourceforge.net/projects/lcsgame/"
license=('GPL2')
depends=('ncurses')
makedepends=('autoconf' 'subversion')
provides=('lcs')
conflicts=('lcs')
replaces=('lcs')
options=('!strip' '!buildflags' '!makeflags')
source=('lcsgame::svn+http://svn.code.sf.net/p/lcsgame/code/trunk')
md5sums=('SKIP')
build() {
cd "${srcdir}/lcsgame"
./bootstrap
./configure --prefix=/usr
make
}
package() {
cd "${srcdir}/lcsgame"
make install DESTDIR="${pkgdir}"
}
Edit: Here's the namcap report, which I forgot lol
Error: error: invalid package file
Error: PKGBUILD is not a valid PKGBUILD
Last edited by fr0z3d (2013-04-24 01:35:43)
Offline
the pkgver() function updates the pkgver= variable. You don't have that variable.
Offline
For the initial declaration of the variable, just use:
pkgver=0
And then include the function before build() {
Offline
Don't use $SRCDEST. Just "cd lcsgame"
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
the pkgver() function updates the pkgver= variable. You don't have that variable.
Oops, I knew it'd be something like this! lol.
Thank you!
Offline
Don't use $SRCDEST. Just "cd lcsgame"
I disagree with that. IMO, it's always better to cd to an absolute path at the beginning of a function so you know for sure where you are.
Offline
Trilby wrote:Don't use $SRCDEST. Just "cd lcsgame"
I disagree with that. IMO, it's always better to cd to an absolute path at the beginning of a function so you know for sure where you are.
I like using the full path too...
Edit: but $SRCDEST is wrong in pkgver()...
Offline
Trilby wrote:Don't use $SRCDEST. Just "cd lcsgame"
I disagree with that. IMO, it's always better to cd to an absolute path at the beginning of a function so you know for sure where you are.
In that case, he should use $srcdir instead of $SRCDEST
Offline
Scimmia wrote:Trilby wrote:Don't use $SRCDEST. Just "cd lcsgame"
I disagree with that. IMO, it's always better to cd to an absolute path at the beginning of a function so you know for sure where you are.
In that case, he should use $srcdir instead of $SRCDEST
That won't work until pacman 4.1.1. Right now, the source in $srcdir is an svn export, so it has no version control info.
Offline