[packages] tor-alpha: update to 0.2.2.22-alpha, add archive mirror
[openwrt/svn-archive/archive.git] / net / gpsd / Makefile
index 9e808a9ea7a82fa03df5f20feb3bd7a025827db4..12606c93d8314885893e2f02bf0cc65d0baa247c 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2006-2010 OpenWrt.org
+# Copyright (C) 2006-2011 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,15 +8,16 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=gpsd
-PKG_VERSION:=2.90
-PKG_RELEASE:=1
+PKG_VERSION:=2.94
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://download.berlios.de/gpsd/
-PKG_MD5SUM:=a23c728b8734c542d559c485857238d2
+PKG_MD5SUM:=ce70bcd707ac1df861d4c72f503c09d1
 
-PKG_FIXUP:=libtool-ucxx
 PKG_INSTALL:=1
+PKG_FIXUP:=libtool
+PKG_REMOVE_FILES:=aclocal.m4 ltmain.sh
 
 PKG_BUILD_DEPENDS:=libncurses
 
@@ -25,7 +26,7 @@ include $(INCLUDE_DIR)/package.mk
 define Package/gpsd
   SECTION:=net
   CATEGORY:=Network
-  DEPENDS:=+libpthread +uclibcxx
+  DEPENDS:=+libpthread +libusb-1.0
   TITLE:=An interface daemon for GPS receivers
   URL:=http://gpsd.berlios.de/
 endef
@@ -41,25 +42,29 @@ CONFIGURE_ARGS += \
         --disable-ubx \
         --disable-evermore \
         --disable-ntrip \
+       --disable-libgpsmm \
         --without-x \
 
-CONFIGURE_VARS += \
-       CXXFLAGS="$$$$CXXFLAGS -fno-builtin -fno-rtti -nostdinc++"  \
-       CPPFLAGS="$$$$CPPFLAGS -I$(STAGING_DIR)/usr/include/uClibc++ -I$(LINUX_DIR)/include" \
-       LDFLAGS="$$$$LDFLAGS -L$(STAGING_DIR)/usr/lib" \
-       LIBS="-nodefaultlibs -luClibc++ -lm $(LIBGCC_S)" \
-       CC="$(TARGET_CC)" CXX="$(TARGET_CXX)" \
+EXTRA_CFLAGS:=-I$(STAGING_DIR)/usr/include/libusb-1.0
+
+EXTRA_LDFLAGS:=-lusb-1.0
 
 define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/include
        $(CP) $(PKG_INSTALL_DIR)/usr/include/gps.h $(1)/usr/include/
        $(INSTALL_DIR) $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgps.{a,so*} $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgps*.{a,so*} $(1)/usr/lib/
 endef
 
 define Package/gpsd/install
+       $(INSTALL_DIR) $(1)/etc/config
+       $(INSTALL_CONF) ./files/gpsd.config $(1)/etc/config/gpsd
+       $(INSTALL_DIR) $(1)/etc/init.d
+       $(INSTALL_BIN) ./files/gpsd.init $(1)/etc/init.d/gpsd
+       $(INSTALL_DIR) $(1)/etc/hotplug.d/usb
+       $(INSTALL_DATA) ./files/gpsd.hotplug $(1)/etc/hotplug.d/usb/20-gpsd
        $(INSTALL_DIR) $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgps.so.* $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgps*.so* $(1)/usr/lib/
        $(INSTALL_DIR) $(1)/usr/sbin
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/gpsd $(1)/usr/sbin/
 endef