[aur-general] Proofreading request

Evan Teitelman teitelmanevan at gmail.com
Tue Aug 27 13:02:17 EDT 2013

On Mon, Aug 26, 2013 at 11:17:16PM +0200, Cl?ment Junca wrote:
> Could someone have a look at the attached package, please ? It's my first
> AUR package written from scratch.

I made some changes to your PKGBUILD file. Here they are:

# Maintainer: Clément Junca <cju.arch at gmail.com>

# Remove unused variables.
pkgdesc="A tarsnap script that performs and maintains a set of backups
as defined by a yaml configuration file"
depends=('tarsnap' 'python2-yaml')
# Note: The quotation marks are not necessary here but they are an impromptu
#  standard---probably for reasons of consistency.

pkgver() {
  cd $_gitname
  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
  # No need to reset the current working directory.

# Patch in the `prepare` function.
prepare() {
  # Use the full path.
  cd "$srcdir/$_gitname"
  # The `|| exit 1` part is not necessary. `makepkg` traps errors.
  # You make come across `|| return 1` on the AUR though. It used to
be necessary.
  patch -p1 -i ../feather.patch

# Note: Only the `package` function is mandatory.
package() {
  # Note: Use double quotation marks around `$pkgdir` and `$srcdir`.
  #  These variables store absolute paths. Some people have spaces or special
  #  characters in their build paths.
  cd "$srcdir/$_gitname"

  # Using `install` to create directories is common. I believe `makepkg` sets
  #  `umask` appropriately though so `makedir` should work.
  install -dm755 "$pkgdir/etc"
  install -dm755 "$pkgdir/usr/bin"
  install -dm755 "$pkgdir/usr/share/licenses/$pkgname"
  # Whitespace is nice.

  # The `-D` switch is not necessary here.
  install -m755 feather "$pkgdir/usr/bin/feather"
  install -m644 feather.yaml.dist "$pkgdir/etc/feather.yaml"
  # You should put LICENSE in the `source` array.
  install -m644 ../../LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"

# Modelines are an eyesore.
# I have this in my Vim configuration:
#   autocmd BufRead,BufNewFile, PKGBUILD setlocal tabstop=2
shiftwidth=2 expandtab
# vim:set ts=2 sw=2 et:

More information about the aur-general mailing list