[packages] gpsd: update to 3.6
[packages.git] / net / gpsd / Makefile
1 #
2 # Copyright (C) 2006-2012 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=gpsd
11 PKG_VERSION:=3.6
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://download-mirror.savannah.gnu.org/releases/gpsd
16 PKG_MD5SUM:=064a5ad75593f8c3ea3fe85010647832
17
18 PKG_BUILD_DEPENDS:=libncurses libusb-1.0
19
20 include $(INCLUDE_DIR)/package.mk
21 include $(INCLUDE_DIR)/scons.mk
22
23 define Package/gpsd/Default
24   DEPENDS:=+librt
25   URL:=http://catb.org/gpsd/
26 endef
27
28 define Package/gpsd/Default/description
29   gpsd is a userland daemon acting as a translator between GPS and AIS receivers
30   and their clients. gpsd listens on port 2947 for clients requesting
31   position/time/velocity information.  The receivers are expected to generate
32   position information in a well-known format -- as NMEA-0183 sentences, SiRF
33   binary, Rockwell binary, Garmin binary format, or other vendor binary
34   protocols.  gpsd takes this information from the GPS and translates it into
35   something uniform and easier to understand for clients.
36 endef
37
38 define Package/gpsd
39   $(call Package/gpsd/Default)
40   SECTION:=net
41   CATEGORY:=Network
42   DEPENDS+= +libgps +libgpsd
43   TITLE:=An interface daemon for GPS receivers
44 endef
45
46 define Package/gpsd/conffiles
47 /etc/config/gpsd
48 endef
49
50 define Package/gpsd/description
51   $(call Package/gpsd/Default/description)
52   This package contains the GPS daemon.
53 endef
54
55 define Package/gpsd-clients
56   $(call Package/gpsd/Default)
57   SECTION:=net
58   CATEGORY:=Network
59   DEPENDS+= +libgps +libgpsd +libncurses
60   TITLE:=GPS tools and clients
61 endef
62
63 define Package/gpsd-clients/description
64   $(call Package/gpsd/Default/description)
65   This package contains auxiliary tools and example clients for monitoring and
66   testing the GPS daemon.
67 endef
68
69 define Package/libgps
70   $(call Package/gpsd/Default)
71   SECTION:=libs
72   CATEGORY:=Libraries
73   DEPENDS+= +libcap
74   TITLE:=C service library for communicating with the GPS daemon
75 endef
76
77 define Package/libgps/description
78   $(call Package/gpsd/Default/description)
79   This package contains the libgps library.
80 endef
81
82 define Package/libgpsd
83   $(call Package/gpsd/Default)
84   SECTION:=libs
85   CATEGORY:=Libraries
86   DEPENDS+= +libcap +libusb-1.0
87   TITLE:=C service library for GPS applications
88 endef
89
90 define Package/libgpsd/description
91   $(call Package/gpsd/Default/description)
92   This package contains the libgpsd library.
93 endef
94
95 SCONS_OPTIONS += \
96         dbus_export=no \
97         tsip=no \
98         fv18=no \
99         tripmate=no \
100         earthmate=no \
101         itrax=no \
102         navcom=no \
103         ubx=no \
104         evermore=no \
105         ntrip=no \
106         libgpsmm=no \
107         libQgpsmm=no \
108         bluez=no \
109         strip=no \
110         python=no \
111         implicit_link=no \
112         chrpath=no
113
114 define Build/InstallDev
115         $(INSTALL_DIR) $(1)/usr/include
116         $(CP) $(PKG_INSTALL_DIR)/usr/include/gps.h $(1)/usr/include/
117         $(INSTALL_DIR) $(1)/usr/lib
118         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgps*.so* $(1)/usr/lib/
119         $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
120         $(CP) \
121                 $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libgps*.pc \
122                 $(1)/usr/lib/pkgconfig/
123 endef
124
125 define Package/gpsd/install
126         $(INSTALL_DIR) $(1)/etc/config
127         $(INSTALL_CONF) ./files/gpsd.config $(1)/etc/config/gpsd
128         $(INSTALL_DIR) $(1)/etc/init.d
129         $(INSTALL_BIN) ./files/gpsd.init $(1)/etc/init.d/gpsd
130         $(INSTALL_DIR) $(1)/etc/hotplug.d/usb
131         $(INSTALL_DATA) ./files/gpsd.hotplug $(1)/etc/hotplug.d/usb/20-gpsd
132         $(INSTALL_DIR) $(1)/usr/sbin
133         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/gpsd $(1)/usr/sbin/
134 endef
135
136 define Package/gpsd-clients/install
137         $(INSTALL_DIR) $(1)/usr/bin
138         $(INSTALL_BIN) \
139                 $(PKG_INSTALL_DIR)/usr/bin/cgps \
140                 $(PKG_INSTALL_DIR)/usr/bin/gps{ctl,decode,mon,pipe} \
141                 $(PKG_INSTALL_DIR)/usr/bin/gpxlogger \
142                 $(PKG_INSTALL_DIR)/usr/bin/lcdgps \
143                 $(1)/usr/bin/
144 endef
145
146 define Package/libgps/install
147         $(INSTALL_DIR) $(1)/usr/lib
148         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgps.so.* $(1)/usr/lib/
149 endef
150
151 define Package/libgpsd/install
152         $(INSTALL_DIR) $(1)/usr/lib
153         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgpsd.so.* $(1)/usr/lib/
154 endef
155
156 $(eval $(call BuildPackage,gpsd))
157 $(eval $(call BuildPackage,gpsd-clients))
158 $(eval $(call BuildPackage,libgps))
159 $(eval $(call BuildPackage,libgpsd))