[aur-general] RFC: PKGBUILD for nixnote2-git [Take 3]

Tom Hale tom at hale.ee
Sun Oct 7 09:32:04 UTC 2018


Here's a version which builds from HEAD of the default branch.

Comments please.

-- 
Tom Hale

-------------- next part --------------
# Maintainer: Tom Hale <tom[noodle]hale[point]ee>
# Contributor: twa022 <twa022 at gmail dot com>

_pkgname=nixnote2
_repo_url="https://github.com/robert7/${_pkgname}.git"
pkgname=${_pkgname}-git
pkgver=v2.1.0.beta3.r95.g8f235769
pkgrel=1
pkgdesc="Evernote clone (formerly Nevernote) - git checkout"
url="https://github.com/robert7/nixnote2"
arch=(x86_64)
license=('GPL3')
depends=(hunspell java-runtime hicolor-icon-theme poppler-qt5 tidy qt5-webkit)
makedepends=(git)
provides=("nixnote=${pkgver%.r*}" "nixnote2=${pkgver%.r*}")
replaces=(nevernote nixnote nixnote-beta)
source=("${_pkgname}"::git+$_repo_url)
sha256sums=('SKIP')

set -o pipefail

pkgver() {
  cd "$srcdir/$_pkgname"
  git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
  echo "Building package: $_pkgname-$pkgver" >&2
  cd "$srcdir/$_pkgname"
  /usr/bin/qmake PREFIX=/usr
  make
  # Strip the binary to save 160MB of disk
  strip qmake-build-release/"$_pkgname"
}

package() {
  cd "$_pkgname"
  make INSTALL_ROOT="${pkgdir}" install
  install -Dm644 shortcuts.txt "${pkgdir}/usr/share/doc/$_pkgdir/shortcuts_sample.txt"
  install -Dm644 docs/{shortcuts-howto,CHANGELOG}.md "${pkgdir}/usr/share/doc/$_pkgdir/"
}


More information about the aur-general mailing list