6eae5afbcf5bb7a76e9012b011909a967e03355a
[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_RELEASE:=3
12
13 PKG_SOURCE_URL=$(PROJECT_GIT)/project/ugps.git
14 PKG_SOURCE_PROTO:=git
15 PKG_SOURCE_DATE:=2019-06-25
16 PKG_SOURCE_VERSION:=cd7eabcd8c9d17dab3946002127a82ad2f9e68c2
17 PKG_MIRROR_HASH:=04a5bfa3a67f94d823911751ba4f0dbfd99a2264b393e1e81fdf0641b873d579
18
19 PKG_MAINTAINER:=John Crispin <john@phrozen.org>
20 PKG_LICENSE:=GPL-2.0+
21
22 include $(INCLUDE_DIR)/package.mk
23 include $(INCLUDE_DIR)/cmake.mk
24
25 define Package/ugps
26 SECTION:=utils
27 CATEGORY:=Utilities
28 TITLE:=OpenWrt GPS Daemon
29 DEPENDS:=+libubox +libubus
30 endef
31
32 TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include
33
34 ifneq ($(CONFIG_USE_GLIBC),)
35 TARGET_CFLAGS += -D_DEFAULT_SOURCE
36 endif
37
38 define Package/ugps/conffiles
39 /etc/config/gps
40 endef
41
42 define Package/ugps/install
43 $(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/init.d $(1)/etc/config
44 $(INSTALL_BIN) $(PKG_BUILD_DIR)/ugps $(1)/usr/sbin/
45 $(INSTALL_BIN) ./files/ugps.init $(1)/etc/init.d/ugps
46 $(INSTALL_CONF) ./files/gps.config $(1)/etc/config/gps
47 endef
48
49 $(eval $(call BuildPackage,ugps))