Yeah, this downloader package is quite simple, and they can also be a time sink to really get working right. I'm not keen on spending so much time on them, since I'd rather spend time improving 100% free software.
Your idea makes sense, I'd take it a bit further (untested): diff --git a/for-postinst/Makefile b/for-postinst/Makefile index 5f6df96..53171d7 100644 --- a/for-postinst/Makefile +++ b/for-postinst/Makefile @@ -29,13 +29,14 @@ install: all exit 1 ; \ fi -$(UNPACK_DIR)/source.properties: $(DL_DIR)/$(PKG_SOURCE) +$(UNPACK_DIR)/source.properties: $(DL_DIR)/$(PKG_SOURCE)-stamp cd $(DL_DIR) && unzip -ou $(PKG_SOURCE) -$(DL_DIR)/$(PKG_SOURCE): +$(DL_DIR)/$(PKG_SOURCE)-stamp: $(DL_DIR)/$(PKG_SOURCE) cd $(DL_DIR) && \ su nobody -s /bin/sh -c "wget --continue $(PKG_SOURCE_URL)" - sha1sum -c $(PKG_SOURCE).sha1 + sha1sum -c $(PKG_SOURCE).sha1 || rm $(PKG_SOURCE) + touch $(PKG_SOURCE).checked clean: -rm -rf -- $(UNPACK_DIR)
diff --git a/for-postinst/Makefile b/for-postinst/Makefile index 5f6df96..53171d7 100644 --- a/for-postinst/Makefile +++ b/for-postinst/Makefile @@ -29,13 +29,14 @@ install: all exit 1 ; \ fi -$(UNPACK_DIR)/source.properties: $(DL_DIR)/$(PKG_SOURCE) +$(UNPACK_DIR)/source.properties: $(DL_DIR)/$(PKG_SOURCE)-stamp cd $(DL_DIR) && unzip -ou $(PKG_SOURCE) -$(DL_DIR)/$(PKG_SOURCE): +$(DL_DIR)/$(PKG_SOURCE)-stamp: $(DL_DIR)/$(PKG_SOURCE) cd $(DL_DIR) && \ su nobody -s /bin/sh -c "wget --continue $(PKG_SOURCE_URL)" - sha1sum -c $(PKG_SOURCE).sha1 + sha1sum -c $(PKG_SOURCE).sha1 || rm $(PKG_SOURCE) + touch $(PKG_SOURCE).checked clean: -rm -rf -- $(UNPACK_DIR)