lockfile-progs: cleanup install/uninstall
authorPeter Korsgaard <jacmet@sunsite.dk>
Wed, 29 Sep 2010 20:40:31 +0000 (22:40 +0200)
committerPeter Korsgaard <jacmet@sunsite.dk>
Wed, 29 Sep 2010 20:40:31 +0000 (22:40 +0200)
Install/uninstall all programs (including mail-*), and use install -D
to copy to target.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
package/lockfile-progs/lockfile-progs.mk

index c7b55652aa9d471021e0f5527aaa71d85191b329..f8d8ceeca1c9b4b7c09a44ae2063156e96a5e2a2 100644 (file)
@@ -7,16 +7,25 @@ LOCKFILE_PROGS_VERSION = 0.1.15
 LOCKFILE_PROGS_SOURCE = lockfile-progs_$(LOCKFILE_PROGS_VERSION).tar.gz
 LOCKFILE_PROGS_SITE = $(BR2_DEBIAN_MIRROR)/debian/pool/main/l/lockfile-progs/
 
+LOCKFILE_BINS = \
+       $(addprefix lockfile-,check create remove touch) \
+       $(addprefix mail-,lock touchlock unlock)
+
 define LOCKFILE_PROGS_BUILD_CMDS
        $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D)
 endef
 
 define LOCKFILE_PROGS_INSTALL_TARGET_CMDS
-       cp -a $(@D)/bin/lockfile* $(TARGET_DIR)/usr/bin
+       for i in $(LOCKFILE_BINS); do \
+               install -D -m 755 $(@D)/bin/$$i $(TARGET_DIR)/usr/bin/$$i; \
+       done
+endef
+
+define LOCKFILE_PROGS_UNINSTALL_TARGET_CMDS
+       rm -f $(addprefix $(TARGET_DIR)/usr/bin/,$(LOCKFILE_BINS))
 endef
 
 define LOCKFILE_PROGS_CLEAN_CMDS
-       -rm -f $(TARGET_DIR)/usr/bin/lockfile-*
        -$(MAKE) -C $(@D) clean
 endef