You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

145 lines
3.7 KiB

  1. #
  2. # Copyright (C) 2006-2015 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=gpsd
  9. PKG_VERSION:=3.16
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=@SAVANNAH/$(PKG_NAME)
  13. PKG_HASH:=03579af13a4d3fe0c5b79fa44b5f75c9f3cac6749357f1d99ce5d38c09bc2029
  14. PKG_MAINTAINER:=Pushpal Sidhu <psidhu.devel@gmail.com>
  15. PKG_LICENSE:=BSD-3-Clause
  16. PKG_LICENSE_FILES:=COPYING
  17. PKG_BUILD_DEPENDS:=libncurses libusb-1.0
  18. include $(INCLUDE_DIR)/package.mk
  19. include $(INCLUDE_DIR)/scons.mk
  20. define Package/gpsd/Default
  21. DEPENDS+= +libusb-1.0
  22. URL:=http://catb.org/gpsd/
  23. endef
  24. define Package/gpsd/Default/description
  25. gpsd is a userland daemon acting as a translator between GPS and AIS receivers
  26. and their clients. gpsd listens on port 2947 for clients requesting
  27. position/time/velocity information. The receivers are expected to generate
  28. position information in a well-known format -- as NMEA-0183 sentences, SiRF
  29. binary, Rockwell binary, Garmin binary format, or other vendor binary
  30. protocols. gpsd takes this information from the GPS and translates it into
  31. something uniform and easier to understand for clients.
  32. endef
  33. define Package/gpsd
  34. $(call Package/gpsd/Default)
  35. SECTION:=utils
  36. CATEGORY:=Utilities
  37. TITLE:=An interface daemon for GPS receivers
  38. endef
  39. define Package/gpsd/conffiles
  40. /etc/config/gpsd
  41. endef
  42. define Package/gpsd/description
  43. $(call Package/gpsd/Default/description)
  44. This package contains the GPS daemon.
  45. endef
  46. define Package/gpsd-clients
  47. $(call Package/gpsd/Default)
  48. SECTION:=utils
  49. CATEGORY:=Utilities
  50. DEPENDS+= +libncurses
  51. TITLE:=GPS tools and clients
  52. endef
  53. define Package/gpsd-clients/description
  54. $(call Package/gpsd/Default/description)
  55. This package contains auxiliary tools and example clients for monitoring and
  56. testing the GPS daemon.
  57. endef
  58. define Package/libgps
  59. $(call Package/gpsd/Default)
  60. SECTION:=libs
  61. CATEGORY:=Libraries
  62. TITLE:=C service library for communicating with the GPS daemon
  63. endef
  64. define Package/libgps/description
  65. $(call Package/gpsd/Default/description)
  66. This package contains the libgps library.
  67. endef
  68. SCONS_VARS += \
  69. LINKFLAGS="$(TARGET_LDFLAGS)"
  70. SCONS_OPTIONS += \
  71. dbus_export=no \
  72. tsip=no \
  73. fv18=no \
  74. tripmate=no \
  75. earthmate=no \
  76. itrax=no \
  77. navcom=no \
  78. ubx=no \
  79. evermore=no \
  80. ntrip=no \
  81. libgpsmm=no \
  82. libQgpsmm=no \
  83. bluez=no \
  84. nostrip=yes \
  85. python=no \
  86. implicit_link=no \
  87. chrpath=no \
  88. manbuild=no \
  89. target="$(TARGET_CROSS:-=)"
  90. define Build/InstallDev
  91. $(INSTALL_DIR) $(1)/usr/include
  92. $(CP) $(PKG_INSTALL_DIR)/usr/include/gps.h $(1)/usr/include/
  93. $(INSTALL_DIR) $(1)/usr/lib
  94. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgps*.so* $(1)/usr/lib/
  95. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  96. $(CP) \
  97. $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libgps*.pc \
  98. $(1)/usr/lib/pkgconfig/
  99. endef
  100. define Package/gpsd/install
  101. $(INSTALL_DIR) $(1)/etc/config
  102. $(INSTALL_CONF) ./files/gpsd.config $(1)/etc/config/gpsd
  103. $(INSTALL_DIR) $(1)/etc/init.d
  104. $(INSTALL_BIN) ./files/gpsd.init $(1)/etc/init.d/gpsd
  105. $(INSTALL_DIR) $(1)/usr/sbin
  106. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/gpsd $(1)/usr/sbin/
  107. endef
  108. define Package/gpsd-clients/install
  109. $(INSTALL_DIR) $(1)/usr/bin
  110. $(INSTALL_BIN) \
  111. $(PKG_INSTALL_DIR)/usr/bin/cgps \
  112. $(PKG_INSTALL_DIR)/usr/bin/gps{ctl,decode,mon,pipe} \
  113. $(PKG_INSTALL_DIR)/usr/bin/gpxlogger \
  114. $(PKG_INSTALL_DIR)/usr/bin/lcdgps \
  115. $(1)/usr/bin/
  116. endef
  117. define Package/libgps/install
  118. $(INSTALL_DIR) $(1)/usr/lib
  119. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgps.so.* $(1)/usr/lib/
  120. endef
  121. $(eval $(call BuildPackage,gpsd))
  122. $(eval $(call BuildPackage,gpsd-clients))
  123. $(eval $(call BuildPackage,libgps))