+config ALFRED_NEEDS_libgps
+ bool
config PACKAGE_ALFRED_VIS
bool "enable vis server for alfred"
depends on PACKAGE_alfred
default y
-
+config PACKAGE_ALFRED_GPSD
+ bool "enable gpsd service for alfred"
+ depends on PACKAGE_alfred
+ select ALFRED_NEEDS_libgps
+ default n
# The latest alfred git hash in PKG_REV can be obtained from http://git.open-mesh.org/alfred.git
#
PKG_NAME:=alfred
-PKG_VERSION:=2013.3.0
+PKG_VERSION:=2013.4.0
PKG_RELEASE:=0
-PKG_MD5SUM:=018ef6262cdd11e900af31d71a864b13
+PKG_MD5SUM:=3891697e127b1037cfc9349fd96e9993
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://downloads.open-mesh.org/batman/releases/batman-adv-$(PKG_VERSION)
SECTION:=net
CATEGORY:=Network
TITLE:=A.L.F.R.E.D. - Almighty Lightweight Fact Remote Exchange Daemon
- DEPENDS:= +libc +IPV6:kmod-ipv6 +librt
+ DEPENDS:= +libc +IPV6:kmod-ipv6 +librt \
+ +ALFRED_NEEDS_libgps:libgps
endef
define Package/alfred/description
endef
MAKE_ALFRED_FLAGS=\
- CONFIG_ALFRED_VIS=$(if $(CONFIG_PACKAGE_ALFRED_VIS),y,n)
+ CONFIG_ALFRED_VIS=$(if $(CONFIG_PACKAGE_ALFRED_VIS),y,n) \
+ CONFIG_ALFRED_GPSD=$(if $(CONFIG_PACKAGE_ALFRED_GPSD),y,n)
TARGET_CFLAGS += -ffunction-sections -fdata-sections -flto
TARGET_LDFLAGS += -Wl,--gc-sections -fuse-linker-plugin
define Package/alfred/install
$(INSTALL_DIR) $(1)/usr/sbin
cp -fpR $(PKG_BUILD_DIR)/alfred $(1)/usr/sbin/
- [ "x$(CONFIG_PACKAGE_ALFRED_VIS)" == "xy" ] && cp -fpR $(PKG_BUILD_DIR)/vis/vis $(1)/usr/sbin/ ; true
+ [ "x$(CONFIG_PACKAGE_ALFRED_VIS)" == "xy" ] && cp -fpR $(PKG_BUILD_DIR)/vis/batadv-vis $(1)/usr/sbin/ ; true
+ [ "x$(CONFIG_PACKAGE_ALFRED_GPSD)" == "xy" ] && cp -fpR $(PKG_BUILD_DIR)/vis/alfred-gpsd $(1)/usr/sbin/ ; true
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/alfred.init $(1)/etc/init.d/alfred
$(INSTALL_DIR) $(1)/etc/config
--- /dev/null
+From dbaaf2b294af120e42a0e95644640b128044a568 Mon Sep 17 00:00:00 2001
+From: Simon Wunderlich <sw@simonwunderlich.de>
+Date: Wed, 23 Oct 2013 01:17:36 +0200
+Subject: [PATCH] alfred-gpsd: add -lm to linker flags for libgps
+
+Appearently applications using libgps must link -lm themselves. A patch
+was submitted [1] to change this unusual behaviour upstream, but was
+never applied. Therefore link to -lm to alfred-gpsd too as this should
+not hurt anyway.
+
+[1] https://lists.berlios.de/pipermail/gpsd-dev/2011-August/009451.html
+
+Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
+---
+ gpsd/Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/gpsd/Makefile b/gpsd/Makefile
+index 9b21652..92e690f 100644
+--- a/gpsd/Makefile
++++ b/gpsd/Makefile
+@@ -49,7 +49,7 @@ ifeq ($(origin LIBGPS_CFLAGS) $(origin LIBGPS_LDLIBS), undefined undefined)
+ $(error No $(LIBGPS_NAME) development libraries found!)
+ endif
+ LIBGPS_CFLAGS += $(shell $(PKG_CONFIG) --cflags $(LIBGPS_NAME))
+- LIBGPS_LDLIBS += $(shell $(PKG_CONFIG) --libs $(LIBGPS_NAME))
++ LIBGPS_LDLIBS += $(shell $(PKG_CONFIG) --libs $(LIBGPS_NAME)) -lm
+ endif
+ CFLAGS += $(LIBGPS_CFLAGS)
+ LDLIBS += $(LIBGPS_LDLIBS)
+--
+1.7.10.4
+