summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbuild2
-rw-r--r--source.mk20
2 files changed, 22 insertions, 0 deletions
diff --git a/build b/build
index 89b8b93..2983157 100755
--- a/build
+++ b/build
@@ -1,5 +1,7 @@
#!/usr/bin/make -f
+include ../source.mk
+
build-ncurses:
oh-autoconfigure -B obj-ncurses -- \
--without-ada \
diff --git a/source.mk b/source.mk
new file mode 100644
index 0000000..e55a0d3
--- /dev/null
+++ b/source.mk
@@ -0,0 +1,20 @@
+upstream_version = $$(printf '%s\n' '$(OPK_SOURCE_VERSION_UPSTREAM)' | \
+ sed 's/~/-/')
+upstream_archive = ncurses-$(upstream_version).tgz
+upstream_url = ftp://invisible-island.net/ncurses/current/$(upstream_archive)
+source_archive = ../ncurses-$(OPK_SOURCE_VERSION_UPSTREAM).orig.tar.gz
+keys = F7E48EDB
+
+$(source_archive):
+ #wget "$(upstream_url)"
+ set -e; if gpg --version >/dev/null 2>&1; then \
+ wget "$(upstream_url).asc"; \
+ [ -e ../keyring.gpg ] || \
+ gpg --keyring ../keyring.gpg --no-default-keyring \
+ --recv-keys $(keys) || true; \
+ gpg --verify --keyring ../keyring.gpg \
+ "$(upstream_archive).asc"; \
+ fi
+ mv "$(upstream_archive)" '$(source_archive)'
+
+source: $(source_archive)