[arch-multilib] common variables in PKGBUILD
Hi all, Some time ago I asked for your comments on my PKGBUILD for lib32-libgtkhtml. After some corrections I uploaded it to the AUR (http://aur.archlinux.org/packages.php?ID=40554). Some additional comments came in then and now I'm kinda stuck. You guys use common variables like _pkgbasename in your PKGBUILDs for the multilib repository. This seems to be against the AUR Packaging Standards (http://wiki.archlinux.org/index.php/Arch_Packaging_Standards) Quote: "Do not introduce new variables into your PKGBUILD build scripts, unless the package cannot be built without doing so, as these could possibly conflict with variables used in makepkg itself. If a new variable is absolutely required, prefix the variable name with an underscore" But... Using these common variables is a lot easier (and more elegant) especially if it comes to maintaining a PKGBUILD over the time. I'd vote for changing the wiki to a less harsh standard by allowing _any_ variable prefixed with an underscore. Sadly not even the AUR webinterface pays attention to variables right now. By using a source like _majorver=(`echo $pkgver | egrep -o '[0-9]+\.[0-9]*+'`) source=(http://ftp.gnome.org/pub/GNOME/sources/$_pkgbasename/$_majorver/$_pkgbasenam...) the source link on the AUR page of the Pakage breaks... Any comments/advices on that? Harvey -- Linux is like a wigwam: No Gates, no Windows and an Apache inside
Am 15.09.2010 09:54, schrieb Harvey:
Sadly not even the AUR webinterface pays attention to variables right now. By using a source like
_majorver=(`echo $pkgver | egrep -o '[0-9]+\.[0-9]*+'`)
source=(http://ftp.gnome.org/pub/GNOME/sources/$_pkgbasename/$_majorver/$_pkgbasenam...)
the source link on the AUR page of the Pakage breaks...
The AUR was never able to handle more complex PKGBUILDs, everything it parses (pkgname, pkgver, pkgrel, source, and so on) must be a string with no variable substitutions in it. The PKGBUILDs we use for binary packages are very often not AUR-compatible.
Thomas,
The AUR was never able to handle more complex PKGBUILDs, everything it parses (pkgname, pkgver, pkgrel, source, and so on) must be a string with no variable substitutions in it.
The PKGBUILDs we use for binary packages are very often not AUR-compatible.
But how should someone uploading to AUR handle this? Does the wiki still reflect the opinion of the developers? Harvey -- Linux is like a wigwam: No Gates, no Windows and an Apache inside
Am Wed, 15 Sep 2010 11:15:33 +0200 schrieb Harvey <harv@gmx.de>:
Sadly not even the AUR webinterface pays attention to variables right now. By using a source like
_majorver=(`echo $pkgver | egrep -o '[0-9]+\.[0-9]*+'`)
But how should someone uploading to AUR handle this?
Just don't use such complex variables and change $_majorver manually if this variable is really necessary and the major version has changed like you already need to do it with $pkgver. Heiko
participants (3)
-
Harvey
-
Heiko Baums
-
Thomas Bächler