#!/usr/bin/make -f
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/autotools.mk
include /usr/share/cdbs/1/rules/simple-patchsys.mk

# LDFLAGS= 
DEB_TAR_SRCDIR:=wine-1.3.18
DEB_CONFIGURE_NORMAL_ARGS:=--prefix=/opt/wine --sysconfdir=/etc --disable-tests -C
DEB_OPT_FLAG_armel:=-O1 -fomit-frame-pointer -pipe -mcpu=cortex-a8 -mfloat-abi=softfp -mfpu=neon
DEB_OPT_FLAG_i386:=-O2 -pipe
DEB_OPT_FLAG:=$(DEB_OPT_FLAG_$(DEB_HOST_ARCH))
DEB_DESTDIR=$(CURDIR)/debian/tmp

# try 1, fix build on autobuilder
export LD_LIBRARY_PATH=$(DEB_DESTDIR)/opt/wine/lib

include /usr/share/cdbs/1/rules/tarball.mk

install/wine::
	install -d -m 755 -o root -g root $(DEB_DESTDIR)/usr/share/applications/hildon
	install -m 644 -o root -g root debian/winemine.desktop $(DEB_DESTDIR)/usr/share/applications/hildon
	ln -s /opt/wine/share/applications/wine.desktop $(DEB_DESTDIR)/usr/share/applications/hildon

