[aur-general] New package: hubflow-git

Xyne xyne at archlinux.ca
Sat Mar 23 02:34:37 EDT 2013


On 2013-03-22 20:52 +0000
Mateusz Loskot wrote:

>Hi,
>
>I have submitted hubflow-git package:
>
>https://aur.archlinux.org/packages/hubflow-git/
>
>I'd appreciate any comments and reviews.
>
>This package relies on fix in added to hubflow after my bug report:
>https://github.com/datasift/gitflow/issues/32
>So, if anyone wants to create hubflow package for current released
>version, (s)he may need to patch it manually.
>
>Best regards,
>--
>Mateusz Loskot, http://mateusz.loskot.net


Instead of "if [ -d $... ]" use "if [[ -d $... ]]" to avoid word expansion.

Quote all path variables ("$srcdir" or "${srcdir}", etc.) to avoid word
expansion. You can include curly brackets if you like but they serve no purpose
in your PKGBUILD. They are only useful for separating variables from
surrounding text (e.g. "${foo}bar") or for performing string operations (e.g.
"${foo:3}"). They are not equivalent to quotes, which is how many users seem to
use them. For example:

  bar='haha hoho'
  for foo in ${bar}; do echo $foo; done

will echo

  haha
  hoho

whereas 

  bar='haha hoho'
  for foo in "$bar"; do echo $foo; done

(or ...in "${bar}";) will echo

  haha hoho


Remove the "|| return 1" statements. These are deprecated because makepkg sets
the "-e" option ("set -e") and will therefore exit automatically if any errors
are encountered.

Instead of
  mkdir -p ${pkgdir}/usr/share/licenses/${pkgname}
  cp ${srcdir}/${_gitname}/LICENSE ${pkgdir}/usr/share/licenses/$pkgname/

use
  install -Dm644 "${srcdir}/${_gitname}/LICENSE"
"${pkgdir}/usr/share/licenses/$pkgname/LICENSE"

or
  install -Dm644 "$srcdir/$_gitname/LICENSE" \
    "$pkgdir/usr/share/licenses/$pkgname/LICENSE"

Always use "install" instead of of combinations of "mkdir", "mv", "cp" and
"chmod" whenever possible.

The PKGBUILD does not seem to include any binary or architecture-specific
files, so you should change the "arch" array to "arch=('any')".

Regards,
Xyne


More information about the aur-general mailing list