You are not logged in.
Hello, I wanted to use a different PKGBUILD file with mkaurball, like you can with makepkg by giving it a "-p" argument. I tried a similar
$ mkaurball -p PKGBUILD.otherHowever it doesn't appear to be supported, so I patched it so that it works. Is this the right place to suggest a patch ?
Here it is:
--- /usr/bin/mkaurball 2014-05-28 06:04:25.000000000 +0100
+++ mkaurball 2014-06-27 14:30:42.000000000 +0100
@@ -191,14 +191,16 @@
' -a <file> package <file> as .AURINFO' \
' -e edit .AURINFO before repackaging' \
' -f pass the --force flag to makepkg' \
+ ' -p <file> use <file> as PKGBUILD' \
' -h display this help message and exit'
}
mkaurball() {
local tarball_basename= tarball_fullname= tmpdir=
- if ! . ./PKGBUILD; then
- die 'Unable to source %s/PKGBUILD' "$PWD"
+ pkgbuild=${pkgbuild:-PKGBUILD}
+ if ! . ./${pkgbuild}; then
+ die 'Unable to source %s/%s' "$PWD" "${pkgbuild}"
fi
if ! makepkg "${makepkg_args[@]}"; then
@@ -239,7 +241,7 @@
fi
}
-while getopts ':a:efh' flag; do
+while getopts ':a:efp:h' flag; do
case $flag in
a)
srcinfo_path=$OPTARG
@@ -250,6 +252,10 @@
f)
makepkg_args+=('--force')
;;
+ p)
+ makepkg_args+=("-p$OPTARG")
+ pkgbuild=$OPTARG
+ ;;
h)
usage
exit 0If I should post this elsewhere, please let me know. Hopefully this patch can be considered to enhance the "mkaurball" tool ?
Offline
Offline
The generated file is still called PKGBUILD, I've tested it and it works. I have just set you a pull request https://github.com/falconindy/pkgbuild- … on/pull/11.
I can explain what I am doing... I have a git repo for a package that I maintain that contains the stuff for the package plus extra supporting stuff for my use only (e.g. notes and so-on). In that repo are two PKGBUILD files : PKGBUILD (the normal one), which builds blah package and PKGBUILD.git, which builds a blah-git package.
With the patch, I can use "mkaurball" to build both "blah" and "blah-git" packages with both PKGBUILDS being in the same directory in my repo.
Does that make sense ?
(to avoid confusion and double posts, let's talk on GitHub...)
Last edited by starfry (2014-06-27 15:22:40)
Offline