# $Id: PKGBUILD 231193 2015-02-09 19:09:02Z eric $
# Maintainer: Eric Bélanger <eric@archlinux.org>

pkgname=bluefish
pkgver=2.2.7
pkgrel=1
pkgdesc="A powerful HTML editor for experienced web designers and programmers"
arch=('i686' 'x86_64')
url="http://bluefish.openoffice.nl/"
license=('GPL3')
depends=('gtk3' 'enchant' 'python2' 'desktop-file-utils')
makedepends=('gucharmap' 'intltool')
optdepends=('gucharmap: for using the charmap plugin')
install=bluefish.install
source=(http://www.bennewitz.com/bluefish/stable/source/bluefish-${pkgver}.tar.bz2{,.sig})
sha1sums=('132ec9e3b05d34c35c42beda640e726c81b948a9'
          'SKIP')
validpgpkeys=('58FD02766D031E832560A6A226073EFCDAC576E6')

prepare() {
  cd ${pkgname}-${pkgver}
  sed -i 's|/usr/bin/env python|/usr/bin/env python2|' \
    src/plugin_zencoding/zencoding/{,filters/,actions/}*.py \
    data/{cssmin.py,jsbeautify,jsmin.py,lorem-ipsum-generator}
}

build() {
  cd ${pkgname}-${pkgver}
  PYTHON=/usr/bin/python2 ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
    --enable-spell-check --disable-update-databases --disable-xml-catalog-update
  make
}

package() {
  cd ${pkgname}-${pkgver}
  make DESTDIR="${pkgdir}" install
}
