add <fso-gpsd> - a wrapper for the gps-part of the fso-frameworkd to create an interf...
authorMirko Vogt <mirko@openwrt.org>
Sat, 13 Jun 2009 13:52:21 +0000 (13:52 +0000)
committerMirko Vogt <mirko@openwrt.org>
Sat, 13 Jun 2009 13:52:21 +0000 (13:52 +0000)
SVN-Revision: 16431

phone/fso-gpsd/Makefile [new file with mode: 0644]
phone/fso-gpsd/files/fso-gpsd.init [new file with mode: 0644]

diff --git a/phone/fso-gpsd/Makefile b/phone/fso-gpsd/Makefile
new file mode 100644 (file)
index 0000000..226f723
--- /dev/null
@@ -0,0 +1,57 @@
+#
+# Copyright (C) 2006-2008 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+# $Id: Makefile 12228 2008-08-06 22:43:15Z nbd $
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=fso-gpsd
+PKG_VERSION:=20081211
+PKG_REV:=78fe48dffb923175bde9f0aabc3500a9264a57e0
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE_URL:=git://git.freesmartphone.org/fso-gpsd.git
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+PKG_SOURCE_VERSION:=$(PKG_REV)
+
+PKG_FIXUP = libtool
+
+include $(INCLUDE_DIR)/package.mk
+
+TARGET_CFLAGS += \
+       -I$(STAGING_DIR)/usr/lib/libintl/include \
+       -I$(STAGING_DIR)/usr/libiconv/include
+
+TARGET_LDFLAGS += \
+       -L$(STAGING_DIR)/usr/lib/libintl/lib/ \
+       -L$(STAGING_DIR)/usr/lib/libiconv/lib/
+
+define Package/fso-gpsd
+  SECTION:=phone
+  CATEGORY:=phone
+  TITLE:=FSO gps daemon
+  URL:=http://freesmartphone.org
+  DEPENDS:=fso-frameworkd
+endef
+
+define Build/Configure
+       ( cd $(PKG_BUILD_DIR); NOCONFIGURE=YES ./autogen.sh );
+       $(call Build/Configure/Default)
+endef
+
+define Build/Compile
+       DESTDIR="$(PKG_INSTALL_DIR)" $(MAKE) -C $(PKG_BUILD_DIR) install
+endef
+
+define Package/fso-gpsd/install
+       $(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/init.d
+       $(CP) $(PKG_INSTALL_DIR)/usr/sbin/fso-gpsd $(1)/usr/sbin/
+       $(CP) ./files/fso-gpsd.init $(1)/etc/init.d/fso-gpsd
+endef
+
+$(eval $(call BuildPackage,fso-gpsd))
diff --git a/phone/fso-gpsd/files/fso-gpsd.init b/phone/fso-gpsd/files/fso-gpsd.init
new file mode 100644 (file)
index 0000000..42c5abe
--- /dev/null
@@ -0,0 +1,11 @@
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006 OpenWrt.org
+START=85
+
+start() {
+       fso-gpsd
+}
+
+stop() {
+       killall fso-gpsd
+}