packages: add missing conffiles define
[openwrt/svn-archive/archive.git] / net / gpsd / Makefile
index 15f5281..edf40fd 100644 (file)
@@ -1,71 +1,78 @@
 #
-# Copyright (C) 2006 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.
 #
-# $Id$
 
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=gpsd
-PKG_VERSION:=2.30
-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:=dde177174878e8ae6db15f8010da46dd
-PKG_CAT:=zcat
+PKG_MD5SUM:=ce70bcd707ac1df861d4c72f503c09d1
 
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
-PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
+PKG_INSTALL:=1
+PKG_FIXUP:=libtool
+PKG_REMOVE_FILES:=aclocal.m4 ltmain.sh
 
-PKG_BUILDDEP=libncurses libnotimpl
+PKG_BUILD_DEPENDS:=libncurses
 
 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
 
-define Build/Configure
-       $(call Build/Configure/Default, \
-               --without-x \
-               , \
-               CXXFLAGS="$$$$CXXFLAGS -fno-builtin -fno-rtti -nostdinc++"  \
-               LIBS="-nodefaultlibs -luClibc++ -lnotimpl -lm -lc" \
-        )
-endef
+CONFIGURE_CMD =./autogen.sh
 
-define Build/Compile
-       $(MAKE) -C $(PKG_BUILD_DIR) \
-               CXXLINK="\$$$$(LINK)" \
-               DESTDIR="$(PKG_INSTALL_DIR)" \
-               all install
-endef
+CONFIGURE_ARGS += \
+        --disable-dbus \
+        --disable-tsip \
+        --disable-fv18 \
+        --disable-tripmate \
+        --disable-earthmate \
+        --disable-itrax \
+        --disable-navcom \
+        --disable-ubx \
+        --disable-evermore \
+        --disable-ntrip \
+       --disable-libgpsmm \
+        --without-x \
+
+EXTRA_CFLAGS:=-I$(STAGING_DIR)/usr/include/libusb-1.0
+
+EXTRA_LDFLAGS:=-lusb-1.0
 
 define Build/InstallDev
-       mkdir -p $(STAGING_DIR)/usr/include
-       $(CP) $(PKG_INSTALL_DIR)/usr/include/gps{,d}.h $(STAGING_DIR)/usr/include/
-       $(CP) $(PKG_INSTALL_DIR)/usr/include/libgpsmm.h $(STAGING_DIR)/usr/include/
-       mkdir -p $(STAGING_DIR)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgps.{a,so*} $(STAGING_DIR)/usr/lib/
+       $(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/
 endef
 
-define Build/UninstallDev
-       rm -rf  $(STAGING_DIR)/usr/include/gps{,d}.h \
-               $(STAGING_DIR)/usr/include/libgpsmm.h \
-               $(STAGING_DIR)/usr/lib/libgps.{a,so*} 
+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/
+       $(INSTALL_DIR) $(1)/usr/sbin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/gpsd $(1)/usr/sbin/
 endef
 
-define Package/gpsd/install
-       install -d -m0755 $(1)/usr/lib
-       install -m0755 $(PKG_INSTALL_DIR)/usr/lib/libgps.so.* $(1)/usr/lib/
-       install -d -m0755 $(1)/usr/sbin
-       install -m0755 $(PKG_INSTALL_DIR)/usr/sbin/gpsd $(1)/usr/sbin/
+define Package/gpsd/conffiles
+/etc/config/gpsd
 endef
 
 $(eval $(call BuildPackage,gpsd))