You are not logged in.
I'd like to set the pkgver to the latest revision number, so i tried the following:
.... beginning of pkgbuild.....
cd $startdir/src/
echo "Downloading latest revision from SVN server..."
svn co http://...../trunk $pkgname -q
#get the text "Latest revision number is xxxxx."
textver=$(svn co http://....../trunk $pkgname)
pkgver=${textver:20:6} #strip the text from the string and save the number in pkgver.
echo "Revision number is $pkgver..." #runs fine, the number xxxxx is shown :)
....continue compiling and stuff.....
So everything runs fine and the package is compiled, but after creating the .FILELIST the package is compressed with the following error:
tar: .... Cannot stat: No such file or directory a package is created with the name $pkgname but without extension of revision number.
So... is it possible to get the rivision number from the server (is local also possible, from the directory after downloading?) and create a proper number, so the package is compressed without errors and the package name will be $pkgname-$pkgver-1.tar.gz?
Thanks in advance, Xerverius
Offline
Are you sure the output (from compiling & stuff) is put in $startdir/pkg?
:: / my web presence
Offline
Are you sure the output (from compiling & stuff) is put in $startdir/pkg?
Yes, there is a package create in the directory (and the size is ok) but the name wrong, for example if you want to create the following package:
pkgname=xfdesktop
pkgver=15904 <==from the get revision number row, when i enter this by hand, nothing is going wrong!
pkgrel=1
i get the error: tar: 15904-1.tar.gz Cannot stat: No such file or directory
And the script continues and creates a package, removed the src/ en pkg/ dir and is done.
Offline
I dont think creating the pkgver on the fly inside the pkgbuild is such a good idea. Instead, use the value manually set in the pkgver to check out a version from svn. Then the builder of the package can just supply the version he wants checked out, and build it.
Note: "head" is also a viable version. Then the release just gets incremented with each new build.
"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍
Offline
If i use the following line everything is downloaded and converted at once:
pkgver=`LC_ALL=C svn export --force http://../$pkgname/trunk $pkgname | tail -n 1 | cut -d " " -f 3 | cut -d "." -f 1`
Offline
You can't use gensync on PKGBUILDS that are written like this. I use the following code to fix this:
# Correct the pkgver in our PKGBUILD - this allows correct gensync operation
# NOTE: pkgver variable must be declared with first 10 lines of PKGBUILD!
cd $startdir
old_pkgver=$pkgver
- pkgver=`date +%Y%m%d`
+ pkgver=`LC_ALL=C svn export --force http://../$pkgname/trunk $pkgname | tail -n 1 | cut -d " " -f 3 | cut -d "." -f 1`
sed -i "1,11 s|pkgver=$old_pkgver|pkgver=$pkgver|" ./PKGBUILD
Offline