InstallDev should be using (1) and not (STAGING_DIR)
[openwrt/svn-archive/archive.git] / net / gpsd / Makefile
1 #
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=gpsd
12 PKG_VERSION:=2.29
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://download.berlios.de/gpsd/
17 PKG_MD5SUM:=3ff80db0e7d906457e5a7a1b04fcb4ec
18
19 PKG_BUILD_DEPENDS=libncurses libnotimpl
20
21 include $(INCLUDE_DIR)/package.mk
22
23 define Package/gpsd
24 SECTION:=net
25 CATEGORY:=Network
26 DEPENDS:=+libpthread +uclibcxx
27 TITLE:=An interface daemon for GPS receivers
28 URL:=http://gpsd.berlios.de/
29 endef
30
31 CONFIGURE_ARGS += \
32 --without-x \
33
34 CONFIGURE_VARS += \
35 CPPFLAGS="$$$$CPPFLAGS -I$(STAGING_DIR)/usr/include/uClic++" \
36 CXXFLAGS="$$$$CXXFLAGS -fno-builtin -fno-rtti -nostdinc++" \
37 LIBS="-nodefaultlibs -luClibc++ -lnotimpl" \
38
39 define Build/Compile
40 $(MAKE) -C $(PKG_BUILD_DIR) \
41 CXXLINK="\$$$$(LINK)" \
42 DESTDIR="$(PKG_INSTALL_DIR)" \
43 all install
44 endef
45
46 define Build/InstallDev
47 mkdir -p $(1)/usr/include
48 $(CP) $(PKG_INSTALL_DIR)/usr/include/gps{,d}.h $(1)/usr/include/
49 $(CP) $(PKG_INSTALL_DIR)/usr/include/libgpsmm.h $(1)/usr/include/
50 mkdir -p $(1)/usr/lib
51 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgps.{a,so*} $(1)/usr/lib/
52 endef
53
54 define Build/UninstallDev
55 rm -rf $(STAGING_DIR)/usr/include/gps{,d}.h \
56 $(STAGING_DIR)/usr/include/libgpsmm.h \
57 $(STAGING_DIR)/usr/lib/libgps.{a,so*}
58 endef
59
60 define Package/gpsd/install
61 $(INSTALL_DIR) $(1)/usr/lib
62 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libgps.so.* $(1)/usr/lib/
63 $(INSTALL_DIR) $(1)/usr/sbin
64 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/gpsd $(1)/usr/sbin/
65 endef
66
67 $(eval $(call BuildPackage,gpsd))