From d865692dd028e0a8d2412b7528568afba855f659 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Fri, 13 May 2022 20:25:34 +0200 Subject: [PATCH] - minisatip: rework build --- package/minisatip/minisatip.mk | 33 +++++++++++++------ .../patches/0001-change-bootid-path.patch | 22 ------------- 2 files changed, 23 insertions(+), 32 deletions(-) delete mode 100644 package/minisatip/patches/0001-change-bootid-path.patch diff --git a/package/minisatip/minisatip.mk b/package/minisatip/minisatip.mk index 36663888..9f33b439 100644 --- a/package/minisatip/minisatip.mk +++ b/package/minisatip/minisatip.mk @@ -18,20 +18,33 @@ MINISATIP_CONF_OPTS = \ --enable-static \ --disable-netcv -minisatip: $(MINISATIP_DEPENDENCIES) | $(TARGET_DIR) - $(REMOVE)/$(PKG_DIR) - $(GET_GIT_SOURCE) $(PKG_SITE)/$(PKG_SOURCE) $(DL_DIR)/$(PKG_SOURCE) - $(CPDIR)/$(PKG_SOURCE) - $(CHDIR)/$(PKG_DIR); \ - $(CONFIGURE); \ - $(TARGET_CONFIGURE_ENV) \ - $(MAKE) +define MINISATIP_INSTALL $(INSTALL_EXEC) -D $(PKG_BUILD_DIR)/minisatip $(TARGET_bindir)/minisatip $(INSTALL) -d $(TARGET_datadir)/minisatip $(INSTALL_COPY) $(PKG_BUILD_DIR)/html $(TARGET_datadir)/minisatip +endef +MINISATIP_PRE_FOLLOWUP_HOOKS += MINISATIP_INSTALL + +define MINISATIP_INSTALL_DEFAULTS $(INSTALL) -d $(TARGET_sysconfdir)/default echo 'MINISATIP_OPTS="-x 9090 -t -o /tmp/camd.socket"' > $(TARGET_sysconfdir)/default/minisatip +endef +MINISATIP_TARGET_FINALIZE_HOOKS += MINISATIP_INSTALL_DEFAULTS + +define MINISATIP_INSTALL_INIT_SCRIPT $(INSTALL_EXEC) -D $(PKG_FILES_DIR)/minisatip.init $(TARGET_sysconfdir)/init.d/minisatip $(UPDATE-RC.D) minisatip defaults 75 25 - $(REMOVE)/$(PKG_DIR) - $(TOUCH) +endef +MINISATIP_TARGET_FINALIZE_HOOKS += MINISATIP_INSTALL_INIT_SCRIPT + +minisatip: | $(TARGET_DIR) + $(call DEPENDENCIES) + $(call DOWNLOAD,$($(PKG)_SOURCE)) + $(call STARTUP) + $(call EXTRACT,$(BUILD_DIR)) + $(call APPLY_PATCHES,$(PKG_PATCHES_DIR)) + $(CHDIR)/$($(PKG)_DIR); \ + $(CONFIGURE); \ + $(TARGET_CONFIGURE_ENV) \ + $(MAKE) + $(call TARGET_FOLLOWUP) diff --git a/package/minisatip/patches/0001-change-bootid-path.patch b/package/minisatip/patches/0001-change-bootid-path.patch deleted file mode 100644 index 4e1ff67d..00000000 --- a/package/minisatip/patches/0001-change-bootid-path.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/src/minisatip.c b/src/minisatip.c -index 626cd27..1eee479 100644 ---- a/src/minisatip.c -+++ b/src/minisatip.c -@@ -1863,7 +1863,7 @@ int main(int argc, char *argv[]) { - int readBootID() { - int did = 0; - opts.bootid = 0; -- FILE *f = fopen("bootid", "rt"); -+ FILE *f = fopen("/tmp/bootid", "rt"); - __attribute__((unused)) int rv; - if (f) { - rv = fscanf(f, "%d %d", &opts.bootid, &did); -@@ -1874,7 +1874,7 @@ int readBootID() { - opts.bootid++; - if (opts.device_id < 1) - opts.device_id = 1; -- f = fopen("bootid", "wt"); -+ f = fopen("/tmp/bootid", "wt"); - if (f) { - fprintf(f, "%d %d", opts.bootid, opts.device_id); - fclose(f);