app=libunique
version=1.1.6
build=1sml
homepage="https://wiki.gnome.org/Attic/LibUnique"
download="https://download.gnome.org/sources/libunique/1.1/libunique-1.1.6.tar.bz2"
desc="a library for writing single instance applications"
requires="gtk2 graphite2"

build() {
  mkandenterbuilddir
  rm -rf $app-$version

  tar xf $srcdir/$app-$version.tar.?z*
  cd $app-$version 
  fixbuilddirpermissions

  applypatch $srcdir/libunique-1.1.6-G_CONST_RETURN.patch

  CFLAGS="$CFLAGS -Wno-deprecated-declarations" \
  CXXFLAGS="$CFLAGS" \
  ./configure \
    --prefix="" \
    --sysconfdir=/etc \
    --enable-dbus=yes \
    --with-x \
    --enable-debug=no \
    --disable-dependency-tracking \
    --disable-maintainer-flags \
    --enable-static=no \
    $builddist

  make
  make install DESTDIR=$pkg 

  cp COPYING $pkgdocs/

  mkfinalpkg
}

sha512sums="
82893e1d51a553b3c1413498e48a3a132e2c05779b4442c3732b5429d698e133741615657432a3d05c82a05c79bb59acc13df500bb08010212155db5e4ee6bde  libunique-1.1.6.tar.bz2
b1df46be67911e2ddc8cb99f0dbf785121e1c4818f1327c03047d577a3ba2a845166c138873b4f5fde35682831cd099a88e28586db9b3db516facc851723bd7b  libunique-1.1.6-G_CONST_RETURN.patch
"
