12606c93d8314885893e2f02bf0cc65d0baa247c
[openwrt/svn-archive/archive.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_VERSION:=2.94
12 PKG_RELEASE:=2
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://download.berlios.de/gpsd/
16 PKG_MD5SUM:=ce70bcd707ac1df861d4c72f503c09d1
17
18 PKG_INSTALL:=1
19 PKG_FIXUP:=libtool
20 PKG_REMOVE_FILES:=aclocal.m4 ltmain.sh
21
22 PKG_BUILD_DEPENDS:=libncurses
23
24 include $(INCLUDE_DIR)/package.mk
25
26 define Package/gpsd
27 SECTION:=net
28 CATEGORY:=Network
29 DEPENDS:=+libpthread +libusb-1.0
30 TITLE:=An interface daemon for GPS receivers
31 URL:=http://gpsd.berlios.de/
32 endef
33
34 CONFIGURE_ARGS += \
35 --disable-dbus \
36 --disable-tsip \
37 --disable-fv18 \
38 --disable-tripmate \
39 --disable-earthmate \
40 --disable-itrax \
41 --disable-navcom \
42 --disable-ubx \
43 --disable-evermore \
44 --disable-ntrip \
45 --disable-libgpsmm \
46 --without-x \
47
48 EXTRA_CFLAGS:=-I$(STAGING_DIR)/usr/include/libusb-1.0
49
50 EXTRA_LDFLAGS:=-lusb-1.0
51
52 define Build/InstallDev
53 $(INSTALL_DIR) $(1)/usr/include
54 $(CP) $(PKG_INSTALL_DIR)/usr/include/gps.h $(1)/usr/include/
55 $(INSTALL_DIR) $(1)/usr/lib
56 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgps*.{a,so*} $(1)/usr/lib/
57 endef
58
59 define Package/gpsd/install
60 $(INSTALL_DIR) $(1)/etc/config
61 $(INSTALL_CONF) ./files/gpsd.config $(1)/etc/config/gpsd
62 $(INSTALL_DIR) $(1)/etc/init.d
63 $(INSTALL_BIN) ./files/gpsd.init $(1)/etc/init.d/gpsd
64 $(INSTALL_DIR) $(1)/etc/hotplug.d/usb
65 $(INSTALL_DATA) ./files/gpsd.hotplug $(1)/etc/hotplug.d/usb/20-gpsd
66 $(INSTALL_DIR) $(1)/usr/lib
67 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgps*.so* $(1)/usr/lib/
68 $(INSTALL_DIR) $(1)/usr/sbin
69 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/gpsd $(1)/usr/sbin/
70 endef
71
72 $(eval $(call BuildPackage,gpsd))