07bc2c25447941ab793d4640180e10fb24f44ce7
[packages.git] / net / gpsd / Makefile
1 #
2 # Copyright (C) 2006-2011 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_REV:=ffcc14068ada0d565f237efa56c7cd723847ca04
12 PKG_VERSION:=3.5-20120414
13 #PKG_VERSION:=20110917
14 PKG_RELEASE:=5
15
16 #PKG_SOURCE_URL:=http://download-mirror.savannah.gnu.org/releases/gpsd/
17 #PKG_MD5SUM:=c01353459faa68834309109d4e868460
18
19 #PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
20 PKG_SOURCE_URL:=git://git.sv.gnu.org/gpsd.git
21 PKG_SOURCE_PROTO:=git
22 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
23 PKG_SOURCE_VERSION:=$(PKG_REV)
24 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
25
26 PKG_BUILD_DEPENDS:=libncurses
27
28 include $(INCLUDE_DIR)/package.mk
29 include $(INCLUDE_DIR)/scons.mk
30
31 define Package/gpsd/Default
32   DEPENDS:=+librt
33   URL:=http://catb.org/gpsd/
34 endef
35
36 define Package/gpsd/Default/description
37   gpsd is a userland daemon acting as a translator between GPS and AIS receivers
38   and their clients. gpsd listens on port 2947 for clients requesting
39   position/time/velocity information.  The receivers are expected to generate
40   position information in a well-known format -- as NMEA-0183 sentences, SiRF
41   binary, Rockwell binary, Garmin binary format, or other vendor binary
42   protocols.  gpsd takes this information from the GPS and translates it into
43   something uniform and easier to understand for clients.
44 endef
45
46 define Package/gpsd
47   $(call Package/gpsd/Default)
48   SECTION:=net
49   CATEGORY:=Network
50   DEPENDS+= +libgps +libgpsd
51   TITLE:=An interface daemon for GPS receivers
52 endef
53
54 define Package/gpsd/conffiles
55 /etc/config/gpsd
56 endef
57
58 define Package/gpsd/description
59   $(call Package/gpsd/Default/description)
60   This package contains the GPS daemon.
61 endef
62
63 define Package/cgps
64   $(call Package/gpsd/Default)
65   SECTION:=net
66   CATEGORY:=Network
67   DEPENDS+= +libgps +libncurses
68   TITLE:=Test client for gpsd
69 endef
70
71 define Package/cgps/description
72   $(call Package/gpsd/Default/description)
73   This package contains a GPS test client.
74 endef
75
76 define Package/libgps
77   $(call Package/gpsd/Default)
78   SECTION:=libs
79   CATEGORY:=Libraries
80   TITLE:=C service library for communicating with the GPS daemon
81 endef
82
83 define Package/libgps/description
84   $(call Package/gpsd/Default/description)
85   This package contains the libgps library.
86 endef
87
88 define Package/libgpsd
89   $(call Package/gpsd/Default)
90   SECTION:=libs
91   CATEGORY:=Libraries
92   TITLE:=C service library for GPS applications
93 endef
94
95 define Package/libgpsd/description
96   $(call Package/gpsd/Default/description)
97   This package contains the libgpsd library.
98 endef
99
100 SCONS_OPTIONS += \
101         dbus_export=no \
102         tsip=no \
103         fv18=no \
104         tripmate=no \
105         earthmate=no \
106         itrax=no \
107         navcom=no \
108         ubx=no \
109         evermore=no \
110         ntrip=no \
111         libgpsmm=no \
112         libQgpsmm=no \
113         bluez=no \
114         strip=no \
115         python=no \
116         usb=no \
117         implicit_link=no
118
119 define Build/InstallDev
120         $(INSTALL_DIR) $(1)/usr/include
121         $(CP) $(PKG_INSTALL_DIR)/usr/include/gps.h $(1)/usr/include/
122         $(INSTALL_DIR) $(1)/usr/lib
123         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgps*.so* $(1)/usr/lib/
124         $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
125         $(CP) \
126                 $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libgps*.pc \
127                 $(1)/usr/lib/pkgconfig/
128 endef
129
130 define Package/gpsd/install
131         $(INSTALL_DIR) $(1)/etc/config
132         $(INSTALL_CONF) ./files/gpsd.config $(1)/etc/config/gpsd
133         $(INSTALL_DIR) $(1)/etc/init.d
134         $(INSTALL_BIN) ./files/gpsd.init $(1)/etc/init.d/gpsd
135         $(INSTALL_DIR) $(1)/etc/hotplug.d/usb
136         $(INSTALL_DATA) ./files/gpsd.hotplug $(1)/etc/hotplug.d/usb/20-gpsd
137         $(INSTALL_DIR) $(1)/usr/sbin
138         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/gpsd $(1)/usr/sbin/
139 endef
140
141 define Package/cgps/install
142         $(INSTALL_DIR) $(1)/usr/bin
143         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/cgps $(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,cgps))
158 $(eval $(call BuildPackage,libgps))
159 $(eval $(call BuildPackage,libgpsd))