aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToni Uhlig <matzeton@googlemail.com>2019-09-14 09:13:26 +0200
committerToni Uhlig <matzeton@googlemail.com>2019-09-14 14:52:51 +0200
commit294fed056604808fe562d061ecd034a71a90cb67 (patch)
tree70408ca72f387b141931d8be3564bd41b38ba298
parentd3b32a62c271d8be2f95b5962aa1015f24ddd849 (diff)
wipe: add new package
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
-rw-r--r--utils/wipe/Makefile42
-rw-r--r--utils/wipe/patches/001-ignore_git_version_hash_and_fix_release_version.patch30
2 files changed, 72 insertions, 0 deletions
diff --git a/utils/wipe/Makefile b/utils/wipe/Makefile
new file mode 100644
index 000000000..84053d314
--- /dev/null
+++ b/utils/wipe/Makefile
@@ -0,0 +1,42 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=wipe
+PKG_VERSION:=0.24
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/berke/$(PKG_NAME)/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=aefb4403333562f9af5e3e03ecbba4b124e98788c688662240f9b04d80bfdb2f
+
+PKG_MAINTAINER:=Toni Uhlig <matzeton@googlemail.com>
+PKG_LICENSE:=GPL-2.0-only
+
+PKG_BUILD_PARALLEL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/wipe
+ SECTION:=utils
+ CATEGORY:=Utilities
+ TITLE:=securely erase files
+ URL:=http://lambda-diode.com/software/wipe/
+endef
+
+define Package/wipe/description
+ wipe is a little command for securely erasing files from magnetic media.
+endef
+
+define Build/Compile
+ $(MAKE) -C $(PKG_BUILD_DIR) linux \
+ CC_LINUX="$(TARGET_CC)" \
+ CFLAGS="$(TARGET_CFLAGS)" \
+ LDFLAGS="$(TARGET_LDFLAGS)" \
+ CPPFLAGS="$(TARGET_CPPFLAGS)"
+endef
+
+define Package/wipe/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/wipe $(1)/usr/bin/
+endef
+
+$(eval $(call BuildPackage,wipe))
diff --git a/utils/wipe/patches/001-ignore_git_version_hash_and_fix_release_version.patch b/utils/wipe/patches/001-ignore_git_version_hash_and_fix_release_version.patch
new file mode 100644
index 000000000..945d63e9a
--- /dev/null
+++ b/utils/wipe/patches/001-ignore_git_version_hash_and_fix_release_version.patch
@@ -0,0 +1,30 @@
+diff --git a/Makefile b/Makefile
+index 5757ae3..20d52ce 100644
+--- a/Makefile
++++ b/Makefile
+@@ -157,11 +157,7 @@ wipe.o : wipe.c random.h misc.h version.h
+ $(CC) $(CCO) $(CCOC) wipe.c -o wipe.o
+
+ version.h: always
+- if which git >/dev/null 2>&1 ; then \
+- git rev-list --max-count=1 HEAD | sed -e 's/^/#define WIPE_GIT "/' -e 's/$$/"/' >version.h ; \
+- else \
+- echo '#define WIPE_GIT "(unknown, compiled without git)"' >version.h ; \
+- fi
++ echo '#define WIPE_GIT "(unknown, compiled without git)"' >version.h ; \
+
+ random.o : random.c misc.h md5.h
+ $(CC) $(CCO) $(CCOC) random.c -o random.o
+diff --git a/wipe.c b/wipe.c
+index 5a215e8..5a4f2ad 100644
+--- a/wipe.c
++++ b/wipe.c
+@@ -24,7 +24,7 @@
+
+ /*** defines */
+
+-#define WIPE_VERSION "0.23"
++#define WIPE_VERSION "0.24"
+ #define WIPE_DATE "2016-11-03"
+
+ /* exit codes */