packages: add missing conffiles define
[openwrt/svn-archive/archive.git] / net / gpsd / Makefile
index 9e808a9..edf40fd 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:=4
 
 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,11 +26,13 @@ include $(INCLUDE_DIR)/package.mk
 define Package/gpsd
   SECTION:=net
   CATEGORY:=Network
-  DEPENDS:=+libpthread +uclibcxx
+  DEPENDS:=+libpthread +librt +libusb-1.0
   TITLE:=An interface daemon for GPS receivers
   URL:=http://gpsd.berlios.de/
 endef
 
+CONFIGURE_CMD =./autogen.sh
+
 CONFIGURE_ARGS += \
         --disable-dbus \
         --disable-tsip \
@@ -41,27 +44,35 @@ 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
 
+define Package/gpsd/conffiles
+/etc/config/gpsd
+endef
+
 $(eval $(call BuildPackage,gpsd))