Skip to content

Commit de02ec9

Browse files
authored
Update Makefile
1 parent 42b42c2 commit de02ec9

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

luci-app-peditxos/Makefile

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ include $(TOPDIR)/feeds/luci/luci.mk
77
# --- Package Information ---
88
PKG_NAME:=luci-app-peditxos
99
PKG_VERSION:=66
10-
PKG_RELEASE:=2
10+
PKG_RELEASE:=4
1111
PKG_MAINTAINER:=PeDitX <telegram: @PeDitX>
1212

1313
# --- LuCI Configuration ---
@@ -51,9 +51,19 @@ define Package/luci-app-peditxos/install
5151
$(INSTALL_BIN) ./root/usr/bin/peditx_runner.sh $(1)/usr/bin/
5252
endef
5353

54-
# By removing the 'define Package/.../postinst' and 'prerm' blocks,
55-
# the build system will automatically pick up the scripts from the 'control/' directory.
56-
# This is the standard and correct way.
54+
# --- *** FIX: Correctly package post-install and pre-removal scripts *** ---
55+
# This tells the build system to include the scripts in the correct way.
56+
# The postinst script will be run once by uci-defaults and then removed.
57+
define Package/luci-app-peditxos/postinst
58+
$(INSTALL_DIR) $(1)/etc/uci-defaults
59+
$(INSTALL_BIN) ./control/postinst $(1)/etc/uci-defaults/99-luci-app-peditxos
60+
endef
61+
62+
# The prerm script is placed in the control archive to be run before removal.
63+
define Package/luci-app-peditxos/prerm
64+
$(INSTALL_BIN) ./control/prerm $(1)/prerm
65+
endef
66+
5767

5868
# --- Finalize Package ---
5969
$(eval $(call BuildPackage,$(PKG_NAME)))

0 commit comments

Comments
 (0)