packages: use OPENWRT_GIT to point at the main openwrt git repo
[openwrt/openwrt.git] / package / utils / ugps / Makefile
1 #
2 # Copyright (C) 2014 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:=ugps
11 PKG_VERSION:=2015-08-17
12 PKG_RELEASE=$(PKG_SOURCE_VERSION)
13
14 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
15 PKG_SOURCE_URL=$(OPENWRT_GIT)/project/ugps.git
16 PKG_SOURCE_PROTO:=git
17 PKG_SOURCE_VERSION:=971e6703eb9bed936cc62cd335105bd2acca14ef
18 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.bz2
19
20 PKG_MAINTAINER:=John Crispin <blogic@openwrt.org>
21 PKG_LICENSE:=GPL-2.0+
22
23 include $(INCLUDE_DIR)/package.mk
24 include $(INCLUDE_DIR)/cmake.mk
25
26 define Package/ugps
27 SECTION:=utils
28 CATEGORY:=Utilities
29 TITLE:=OpenWrt GPS Daemon
30 DEPENDS:=+libubox +libubus
31 endef
32
33 TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include
34
35 ifneq ($(CONFIG_USE_GLIBC),)
36 TARGET_CFLAGS += -D_DEFAULT_SOURCE
37 endif
38
39 define Package/ugps/conffiles
40 /etc/config/gps
41 endef
42
43 define Package/ugps/install
44 $(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/init.d $(1)/etc/config
45 $(INSTALL_BIN) $(PKG_BUILD_DIR)/ugps $(1)/usr/sbin/
46 $(INSTALL_BIN) ./files/ugps.init $(1)/etc/init.d/ugps
47 $(INSTALL_CONF) ./files/gps.config $(1)/etc/config/gps
48 endef
49
50 $(eval $(call BuildPackage,ugps))