Browse Source

- minisatip: rework build

master
vanhofen 3 years ago
parent
commit
d865692dd0
  1. 33
      package/minisatip/minisatip.mk
  2. 22
      package/minisatip/patches/0001-change-bootid-path.patch

33
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)

22
package/minisatip/patches/0001-change-bootid-path.patch

@ -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);
Loading…
Cancel
Save