Makefile 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  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_MD5SUM:=68691b5de4c94f82ec4062b042b5eb63
  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:=+librt +libncurses
  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:=net
  36. CATEGORY:=Network
  37. DEPENDS+= +libgps +libusb-1.0
  38. TITLE:=An interface daemon for GPS receivers
  39. endef
  40. define Package/gpsd/conffiles
  41. /etc/config/gpsd
  42. endef
  43. define Package/gpsd/description
  44. $(call Package/gpsd/Default/description)
  45. This package contains the GPS daemon.
  46. endef
  47. define Package/gpsd-clients
  48. $(call Package/gpsd/Default)
  49. SECTION:=net
  50. CATEGORY:=Network
  51. DEPENDS+= +libgps +libncurses +libusb-1.0
  52. TITLE:=GPS tools and clients
  53. endef
  54. define Package/gpsd-clients/description
  55. $(call Package/gpsd/Default/description)
  56. This package contains auxiliary tools and example clients for monitoring and
  57. testing the GPS daemon.
  58. endef
  59. define Package/libgps
  60. $(call Package/gpsd/Default)
  61. SECTION:=libs
  62. CATEGORY:=Libraries
  63. DEPENDS+= +libcap
  64. TITLE:=C service library for communicating with the GPS daemon
  65. endef
  66. define Package/libgps/description
  67. $(call Package/gpsd/Default/description)
  68. This package contains the libgps library.
  69. endef
  70. SCONS_VARS += \
  71. LINKFLAGS="$(TARGET_LDFLAGS)"
  72. SCONS_OPTIONS += \
  73. dbus_export=no \
  74. tsip=no \
  75. fv18=no \
  76. tripmate=no \
  77. earthmate=no \
  78. itrax=no \
  79. navcom=no \
  80. ubx=no \
  81. evermore=no \
  82. ntrip=no \
  83. libgpsmm=no \
  84. libQgpsmm=no \
  85. bluez=no \
  86. nostrip=yes \
  87. python=no \
  88. implicit_link=no \
  89. chrpath=no \
  90. target="$(TARGET_CROSS:-=)"
  91. define Build/InstallDev
  92. $(INSTALL_DIR) $(1)/usr/include
  93. $(CP) $(PKG_INSTALL_DIR)/usr/include/gps.h $(1)/usr/include/
  94. $(INSTALL_DIR) $(1)/usr/lib
  95. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgps*.so* $(1)/usr/lib/
  96. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  97. $(CP) \
  98. $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libgps*.pc \
  99. $(1)/usr/lib/pkgconfig/
  100. endef
  101. define Package/gpsd/install
  102. $(INSTALL_DIR) $(1)/etc/config
  103. $(INSTALL_CONF) ./files/gpsd.config $(1)/etc/config/gpsd
  104. $(INSTALL_DIR) $(1)/etc/init.d
  105. $(INSTALL_BIN) ./files/gpsd.init $(1)/etc/init.d/gpsd
  106. $(INSTALL_DIR) $(1)/usr/sbin
  107. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/gpsd $(1)/usr/sbin/
  108. endef
  109. define Package/gpsd-clients/install
  110. $(INSTALL_DIR) $(1)/usr/bin
  111. $(INSTALL_BIN) \
  112. $(PKG_INSTALL_DIR)/usr/bin/cgps \
  113. $(PKG_INSTALL_DIR)/usr/bin/gps{ctl,decode,mon,pipe} \
  114. $(PKG_INSTALL_DIR)/usr/bin/gpxlogger \
  115. $(PKG_INSTALL_DIR)/usr/bin/lcdgps \
  116. $(1)/usr/bin/
  117. endef
  118. define Package/libgps/install
  119. $(INSTALL_DIR) $(1)/usr/lib
  120. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgps.so.* $(1)/usr/lib/
  121. endef
  122. $(eval $(call BuildPackage,gpsd))
  123. $(eval $(call BuildPackage,gpsd-clients))
  124. $(eval $(call BuildPackage,libgps))