# $NetBSD$
# begun from Makefile for kicq, hence the buncha #ed stuff
# will clean it up over time

DISTNAME=		kxicq2-0.7.6
CATEGORIES=		chat kde
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE:=kxicq/}

MAINTAINER=		hclsmith@yahoo.ca
HOMEPAGE=		http://kxicq.org
COMMENT=		KDE2 ICQ client

#BUILD_DEPENDS+=	${LOCALBASE}/bin/autoconf:../../devel/autoconf
DEPENDS+=		kdelibs>=2:../../x11/kdelibs2

USE_X11BASE= yes
USE_GMAKE= yes
LTCONFIG_OVERRIDE= ${WRKSRC}/admin
USE_LIBTOOL= yes
GNU_CONFIGURE= yes

CONFIGURE_ARGS+=\
	--with-qt-dir=${X11BASE}/qt2\
	--with-extra-includes=${LOCALBASE}/include\
	--with-extra-libs=${LOCALBASE}/lib\
#	--datadir=${KDEBASEDIR}/share/kde\
#	--with-icq-includes=${LOCALBASE}/include\
#	--with-icq-libs=${LOCALBASE}/lib\

# this works but doesn't get ${prefix} into the Makefiles
#CONFIGURE_ENV+=\
#	kde_appsdir=\$${prefix}/share/kde/applnk\
#	kde_datadir=\$${prefix}/share/kde/apps\
#	kde_locale=\$${prefix}/share/kde/locale

# this might be better placed in configure,
# where it could check the necessity
#LDFLAGS=-Wl,-R\$${qt_libraries} -L\$${qt_libraries}

#fixme: can do better
post-install:
	cd ${prefix}/share;\
	${RM} -rf kde/apps/kxicq;\
	${MV} apps/kxicq kde/apps;\
	${MV} applnk/Internet/kxicq2.desktop kde/applnk/Internet

.include "../../mk/bsd.pkg.mk"

#eof
