post-install/post-remove are now reasonably complete.

This commit is contained in:
Wouter R
2013-05-14 15:09:56 +02:00
parent 9789fdc0c3
commit ce11cd8c1d
5 changed files with 64 additions and 41 deletions
+14 -2
View File
@@ -3,6 +3,16 @@
##############################################
include $(TOPDIR)/rules.mk
#NOTE: this hack is required to get files included inside a define block, see this link:
#http://stackoverflow.com/questions/3524726/how-to-make-eval-shell-work-in-gnu-make
#The '¤' character must not appear in included scripts.
define newline
endef
IncludeWithNewlines = $(subst ¤,$(newline),$(shell cat $1 | tr '\n' '¤'))
# Name and release number of this package
PKG_NAME:=wifibox
PKG_VERSION:=0.1.0
@@ -101,9 +111,11 @@ endif
endef
define Package/wifibox/postinst
#!/bin/sh
touch /.postinst-was-here
$(call IncludeWithNewlines,post-install.sh)
endef
define Package/wifibox/postrm
$(call IncludeWithNewlines,post-remove.sh)
endef
$(eval $(call BuildPackage,wifibox))