# $FreeWRT$
#-
# This file is part of the FreeWRT project. FreeWRT is copyrighted
# material, please see the LICENCE file in the top-level directory
# or at http://www.freewrt.org/licence for details.

include ${TOPDIR}/rules.mk

PKG_NAME:=		gpsd
PKG_VERSION:=		2.30
PKG_RELEASE:=		2
PKG_MD5SUM:=		dde177174878e8ae6db15f8010da46dd
MASTER_SITES:=		http://download.berlios.de/gpsd/

include ${TOPDIR}/mk/package.mk

$(eval $(call PKG_template,GPSD,gpsd,${PKG_VERSION}-${PKG_RELEASE},${ARCH}))

TCXXFLAGS+=		-fno-builtin -fno-rtti -nostdinc++
TLDFLAGS+=		-luClibc++ -lc -lm -nodefaultlibs
CONFIGURE_STYLE=	gnu
CONFIGURE_ARGS+=	--without-x
BUILD_STYLE=		auto
INSTALL_STYLE=		auto
XAKE_FLAGS=		CXXLINK="\$$(LINK)"

post-install:
	${INSTALL_DIR} ${IDIR_GPSD}/usr/lib
	${CP} ${WRKINST}/usr/lib/libgps.so.* ${IDIR_GPSD}/usr/lib/
	${INSTALL_DIR} ${IDIR_GPSD}/usr/sbin
	${INSTALL_BIN} ${WRKINST}/usr/sbin/gpsd ${IDIR_GPSD}/usr/sbin/

include ${TOPDIR}/mk/pkg-bottom.mk
