e92a04953904b429c63c1f791c453370b25955a4
[packages.git] / net / gpsd / Makefile
1 #
2 # Copyright (C) 2006,2009 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.39
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:=3db437196a6840c252fca99b6c19d4d0
17
18 PKG_FIXUP:=libtool-ucxx
19
20 PKG_BUILD_DEPENDS=libncurses
21
22 include $(INCLUDE_DIR)/package.mk
23
24 define Package/gpsd
25   SECTION:=net
26   CATEGORY:=Network
27   DEPENDS:=+libpthread +uclibcxx
28   TITLE:=An interface daemon for GPS receivers
29   URL:=http://gpsd.berlios.de/
30 endef
31
32 CONFIGURE_ARGS += \
33         --disable-dbus \
34         --disable-tsip \
35         --disable-fv18 \
36         --disable-tripmate \
37         --disable-earthmate \
38         --disable-itrax \
39         --disable-navcom \
40         --disable-ubx \
41         --disable-evermore \
42         --disable-ntrip \
43         --without-x \
44
45 CONFIGURE_VARS += \
46         CXXFLAGS="$$$$CXXFLAGS -fno-builtin -fno-rtti -nostdinc++"  \
47         CPPFLAGS="$$$$CPPFLAGS -I$(STAGING_DIR)/usr/include/uClibc++ -I$(LINUX_DIR)/include" \
48         LDFLAGS="$$$$LDFLAGS" \
49         LIBS="-nodefaultlibs -luClibc++ -lm -lgcc" \
50
51 define Build/Compile
52         $(MAKE) -C $(PKG_BUILD_DIR) \
53                 DESTDIR="$(PKG_INSTALL_DIR)" \
54                 all install
55 endef
56
57 define Build/InstallDev
58         $(INSTALL_DIR) $(1)/usr/include
59         $(CP) $(PKG_INSTALL_DIR)/usr/include/gps.h $(1)/usr/include/
60         $(INSTALL_DIR) $(1)/usr/lib
61         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgps.{a,so*} $(1)/usr/lib/
62 endef
63
64 define Package/gpsd/install
65         $(INSTALL_DIR) $(1)/usr/lib
66         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgps.so.* $(1)/usr/lib/
67         $(INSTALL_DIR) $(1)/usr/sbin
68         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/gpsd $(1)/usr/sbin/
69 endef
70
71 $(eval $(call BuildPackage,gpsd))