git » gspell.git » main » tree

[main] / PKGBUILD

# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
# Contributor: Jan de Groot <jgc@archlinux.org>

pkgname=gspell
pkgver=1.12.2
pkgrel=3
pkgdesc="Spell-checking library for GTK applications"
url="https://gitlab.gnome.org/GNOME/gspell"
arch=(x86_64 'armv7h')
license=(LGPL)
depends=(
  enchant
  glib2
  gtk3
  icu
)
makedepends=(
  autoconf-archive
  git
  gobject-introspection
  gtk-doc
  vala
)
_commit=cbb3ae2e21234eae84e1f827bf1f27fdd0e32299  # tags/1.12.2^0
source=("git+https://gitlab.gnome.org/GNOME/gspell.git#commit=$_commit")
b2sums=('SKIP')

pkgver() {
  cd gspell
  git describe --tags | sed 's/[^-]*-g/r&/;s/-/+/g'
}

prepare() {
  cd gspell
  NOCONFIGURE=1 ./autogen.sh
}

build() {
  local configure_options=(
    --prefix=/usr
    --sysconfdir=/etc
    --localstatedir=/var
    --enable-gtk-doc
  )

  cd gspell
  ./configure "${configure_options[@]}"
  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
  make
}

package(){
  depends+=(
    libenchant-2.so
    libgtk-3.so
    libg{lib,object,io}-2.0.so
    libicuuc.so
    libpango-1.0.so
  )
  provides+=("libgspell-${pkgver%%.*}.so")

  cd gspell
  make DESTDIR="$pkgdir" install
}

# vim:set sw=2 sts=-1 et: