# Description: Unique is a library for writing single instance application
# URL: https://wiki.gnome.org/Attic/LibUnique
# Maintainer: Jose V Beneyto, sepen at crux dot nu
# Packager: Jose V Beneyto, sepen at crux dot nu
# Depends on: gtk xorg-libxdamage

name=libunique
version=1.1.6
release=4
source=(http://download.gnome.org/sources/$name/${version%.*}/$name-$version.tar.bz2 \
        G_CONST_RETURN.patch)

build() {
  cd $name-$version

  patch -p1 -i $SRC/G_CONST_RETURN.patch

  ./configure --prefix=/usr \
              --disable-dbus \
              --disable-static \
              --disable-debug \
              --with-x

  sed -i $(find . -type f -name Makefile) \
      -e 's|aclocal-1.11|aclocal|g' \
      -e 's|automake-1.11|automake|g'

  make
  make DESTDIR=$PKG install

  rm -rf $PKG/usr/share/gtk-doc
}
