ugps: add conffiles section, fix config file perms
[openwrt/staging/yousong.git] / package / utils / ugps / Makefile
index c1bc7cdd01af5607e436c74bdcb8522c74e7de31..b724f6189d1782a7295fe2edefe1e6208b619d14 100644 (file)
@@ -32,11 +32,19 @@ endef
 
 TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include
 
+ifneq ($(CONFIG_USE_GLIBC),)
+  TARGET_CFLAGS += -D_DEFAULT_SOURCE
+endif
+
+define Package/ugps/conffiles
+/etc/config/gps
+endef
+
 define Package/ugps/install
        $(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/init.d $(1)/etc/config
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/ugps $(1)/usr/sbin/
        $(INSTALL_BIN) ./files/ugps.init $(1)/etc/init.d/ugps
-       $(INSTALL_BIN) ./files/gps.config $(1)/etc/config/gps
+       $(INSTALL_CONF) ./files/gps.config $(1)/etc/config/gps
 endef
 
 $(eval $(call BuildPackage,ugps))