dump1090: Update to version 3.7.1
authorRosen Penev <rosenp@gmail.com>
Tue, 30 Jul 2019 21:52:45 +0000 (14:52 -0700)
committerRosen Penev <rosenp@gmail.com>
Fri, 27 Sep 2019 20:07:18 +0000 (13:07 -0700)
Repository was moved.

Also cleaned up Makefile slightly.

Ran init script through shellcheck.

Added PKG_BUILD_PARALLEL for faster compilation.

Added several CFLAGS and LDFLAGS for smaller size.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
(cherry-picked from f3245e6c7dcd8e169fe67d7f3cd125a74b056627)

utils/dump1090/Makefile
utils/dump1090/files/dump1090.init

index 2758dc4d233d2435164c6b3c69f1fc33edcaeade..b52ae294bc99bb35481cc59c06a7e084ab0c4368 100644 (file)
@@ -8,21 +8,20 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=dump1090
-PKG_VERSION:=2017-06-01
+PKG_VERSION:=3.7.1
 PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/mutability/dump1090.git
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=b155fdb458c3241ab375d1f2b12fbb6a9f8a8a3a
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
-PKG_MIRROR_HASH:=bea40197bce22c837273848bc75d273c2688b131c11895685a35ee6c6242843a
-PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
+PKG_SOURCE_URL:=https://github.com/flightaware/dump1090
+PKG_SOURCE_VERSION:=v$(PKG_VERSION)
+PKG_MIRROR_HASH:=d7ed250d624eae2eec6c0a2dd410986f42230bf929dab67893ea3bf1cab8a203
 
-PKG_LICENSE:=GPL-2.0
+PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
+PKG_LICENSE:=GPL-2.0-or-later
 PKG_LICENSE_FILES:=COPYING LICENSE
 
 PKG_BUILD_DEPENDS:=libusb
+PKG_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -31,18 +30,18 @@ define Package/dump1090/Default
   CATEGORY:=Utilities
   TITLE:=Mode S decoder for the Realtek RTL2832U
   URL:=https://github.com/mutability/dump1090
-  DEPENDS:=+libpthread
 endef
 
 define Package/dump1090
   $(call Package/dump1090/Default)
   TITLE+= (dump1090)
-  DEPENDS+= +librtlsdr +uhttpd
+  DEPENDS+=+librtlsdr +uhttpd +libncurses
 endef
 
 define Package/view1090
   $(call Package/dump1090/Default)
   TITLE+= (view1090)
+  DEPENDS+=+libncurses
 endef
 
 define Package/dump1090/description
@@ -54,9 +53,13 @@ define Package/view1090/description
 endef
 
 MAKE_FLAGS += \
+       BLADERF=no \
        CFLAGS="$(TARGET_CFLAGS)" \
        UNAME="Linux"
 
+TARGET_CFLAGS += -ffunction-sections -fdata-sections -flto
+TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
+
 define Package/dump1090/install
        $(INSTALL_DIR) $(1)/etc/init.d
        $(INSTALL_BIN) files/dump1090.init $(1)/etc/init.d/dump1090
index d57a2e1988eaca0d18ab6a9843f559b069c382b4..89c3333224b81a83c22d06150197fed750a55593 100644 (file)
@@ -13,7 +13,9 @@ append_arg() {
        local val
 
        config_get val "$cfg" "$var"
-       [ -n "$val" -o -n "$def" ] && procd_append_param command $opt "${val:-$def}"
+       if [ -n "$val" ] || [ -n "$def" ]; then
+               procd_append_param command "$opt" "${val:-$def}"
+       fi
 }
 
 append_bool() {
@@ -82,7 +84,7 @@ start_instance() {
        append_arg "$cfg" html_dir "--html-dir"
        append_arg "$cfg" write_json "--write-json"
        config_get aux "$cfg" "write_json"
-       [ -n "$aux" ] && mkdir -p $aux
+       [ -n "$aux" ] && mkdir -p "$aux"
        append_arg "$cfg" write_json_every "--write-json-every"
        append_arg "$cfg" json_location_accuracy "--json-location-accuracy"
        append_bool "$cfg" oversample "--oversample"