Could someone please help me update this PKGBUILD?
This PKGBUILD is pretty out of date, pulling in version 2460 from SVN when the latest is 6053. I've gotten 6053 to successfully compile on my machine via:
./autogen
make
sudo make install
with some dependencies, of course (which I can add). This is, of course, much different than the installation steps the pkgbuild in the AUR takes.
Now, I've been tinkering with the PKGBUILD file, trying to get it up to date, but I think I've gotten it all wrong. I've updated this before but not to this extent. Would it be as simple as the following?
build() {
cd "$srcdir"
if [ -d $_svnmod/.svn ]; then
(cd $_svnmod && svn up -r $pkgver)
else
svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod
fi
msg "SVN checkout done or server timeout"
msg "Starting make..."
rm -rf "$srcdir/$_svnmod-build"
cp -r "$srcdir/$_svnmod" "$srcdir/$_svnmod-build"
cd "$srcdir/$_svnmod-build"
# Make problems can sometimes be fixed by replacing g95 with gfortran
./autogen.sh
make
package() {
cd "$srcdir/$_svnmod-build"
sudo make install
About this post
- Posted
- Archived
- Score
- 1 · 100% up
- Kind
- Text
- ID
- 41tsk9
16 comments
this pkgbuild should have a pkgver() function to update $pkgver automaticly.
https://wiki.archlinux.org/index.php/VCS_package_guidelines#The_pkgver.28.29_function
and you should use the source variable to handle all the svn stuff.
https://wiki.archlinux.org/index.php/VCS_package_guidelines#VCS_sources
Just a though. Shouldn't you just change the pkgver for the last revision? I didn't try but it was the first thing I would do before getting further into the PKGBUILD.
Yup, looks like updating $pkgver should pull the latest revision with no other changes.
Apart from that I'm a bit surprised that it doesn't use 'make DESTDIR="$pkgdir" install' for packaging. It shouldn't need sudo too.
That's what I originally did, but the owner of this code changed so much that it no longer builds that way.
What errors do you get when making the revision change?
Well the program no longer compiles when I do it that way. I compile it manually by running ./autogen.sh, make and sudo make install.
I was assuming that I could emulate that in the pkgbuild but I'm not sure.
What thoisil said, also I'm pretty sure that "$srcdir" and "$pkgdir" should be in quotes
or use the ${some_variable} syntaxso that it works when your pkgbuild is in a path that contains spaces.There are simply multiple ways the build system allows to build and install the package. With python setup.py is one way, but it's a bit nonstandard. If there is a Makefile I'd prefer it and in this case there is. I'm currently waiting for something to compile, so I threw this together:
https://gist.github.com/ChristophHaag/b2b3dded3573b23b2d5c
They also removed the gcc-fortran option, so it probably requires some dependency but I didn't look it up.
${some_variable}doesn't help with spaces.TIL
Please also x-post to the AUR issues forum, always good advice there.