summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2016-04-23 22:47:40 -0700
committerMichael Forney <mforney@mforney.org>2016-04-23 22:47:40 -0700
commita4d1777beea410e56bdf39e2e075797a8b0580f0 (patch)
tree6f96b490d31938420210bfe12ed72502df714098
parent39c4754056d2bbdf041cd71c7ca1b61023c701f4 (diff)
Add some scripts to help fetch non-git packages
-rw-r--r--core/bzip2/.gitignore2
l---------core/bzip2/fetch.rc1
-rw-r--r--core/bzip2/sha2561
-rw-r--r--core/bzip2/url2
-rw-r--r--core/mdocml/.gitignore2
-rw-r--r--core/mdocml/sha2561
-rw-r--r--core/mdocml/url2
-rw-r--r--core/openbsd/.gitignore3
l---------core/openbsd/fetch.rc1
-rw-r--r--core/openbsd/sha2562
-rw-r--r--core/openbsd/url5
-rw-r--r--core/perp/.gitignore4
l---------core/perp/fetch.rc1
-rw-r--r--core/perp/sha2561
-rw-r--r--core/perp/url2
-rwxr-xr-xutil/fetch-curl.rc35
16 files changed, 59 insertions, 6 deletions
diff --git a/core/bzip2/.gitignore b/core/bzip2/.gitignore
new file mode 100644
index 00000000..fc553f38
--- /dev/null
+++ b/core/bzip2/.gitignore
@@ -0,0 +1,2 @@
+/bzip2-1.0.6.tar.gz
+/src
diff --git a/core/bzip2/fetch.rc b/core/bzip2/fetch.rc
new file mode 120000
index 00000000..221da00d
--- /dev/null
+++ b/core/bzip2/fetch.rc
@@ -0,0 +1 @@
+../../util/fetch-curl.rc \ No newline at end of file
diff --git a/core/bzip2/sha256 b/core/bzip2/sha256
new file mode 100644
index 00000000..45eb8e18
--- /dev/null
+++ b/core/bzip2/sha256
@@ -0,0 +1 @@
+a2848f34fcd5d6cf47def00461fcb528a0484d8edef8208d6d2e2909dc61d9cd bzip2-1.0.6.tar.gz
diff --git a/core/bzip2/url b/core/bzip2/url
index ff92030f..9648ced9 100644
--- a/core/bzip2/url
+++ b/core/bzip2/url
@@ -1 +1 @@
-http://www.bzip.org/1.0.6/bzip2-1.0.6.tar.gz
+url = "http://www.bzip.org/1.0.6/bzip2-1.0.6.tar.gz"
diff --git a/core/mdocml/.gitignore b/core/mdocml/.gitignore
new file mode 100644
index 00000000..4ed69605
--- /dev/null
+++ b/core/mdocml/.gitignore
@@ -0,0 +1,2 @@
+/mdocml-1.13.3.tar.gz
+/src
diff --git a/core/mdocml/sha256 b/core/mdocml/sha256
new file mode 100644
index 00000000..93e9d07a
--- /dev/null
+++ b/core/mdocml/sha256
@@ -0,0 +1 @@
+23ccab4800d50bf4c327979af5d4aa1a6a2dc490789cb67c4c3ac1bd40b8cad8 mdocml-1.13.3.tar.gz
diff --git a/core/mdocml/url b/core/mdocml/url
index 4315a1c8..2950bda8 100644
--- a/core/mdocml/url
+++ b/core/mdocml/url
@@ -1 +1 @@
-http://mdocml.bsd.lv/snapshots/mdocml-1.13.3.tar.gz
+url = "http://mdocml.bsd.lv/snapshots/mdocml-1.13.3.tar.gz"
diff --git a/core/openbsd/.gitignore b/core/openbsd/.gitignore
new file mode 100644
index 00000000..3abe5d25
--- /dev/null
+++ b/core/openbsd/.gitignore
@@ -0,0 +1,3 @@
+/src
+/src.tar.gz
+/sys.tar.gz
diff --git a/core/openbsd/fetch.rc b/core/openbsd/fetch.rc
new file mode 120000
index 00000000..221da00d
--- /dev/null
+++ b/core/openbsd/fetch.rc
@@ -0,0 +1 @@
+../../util/fetch-curl.rc \ No newline at end of file
diff --git a/core/openbsd/sha256 b/core/openbsd/sha256
new file mode 100644
index 00000000..e052ef12
--- /dev/null
+++ b/core/openbsd/sha256
@@ -0,0 +1,2 @@
+0e2c07bbfb3e173be1715da3d70ba16a246e151d66a56251ee4cf416c507deb8 src.tar.gz
+868775750a405c252d1ba78df69d6ebb101ccb26e776d5407a087ec030970baa sys.tar.gz
diff --git a/core/openbsd/url b/core/openbsd/url
index 29ccce73..841dafd0 100644
--- a/core/openbsd/url
+++ b/core/openbsd/url
@@ -1,2 +1,3 @@
-http://mirrors.sonic.net/pub/OpenBSD/5.9/src.tar.gz
-http://mirrors.sonic.net/pub/OpenBSD/5.9/sys.tar.gz
+url = "http://mirrors.sonic.net/pub/OpenBSD/5.9/src.tar.gz"
+-O
+url = "http://mirrors.sonic.net/pub/OpenBSD/5.9/sys.tar.gz"
diff --git a/core/perp/.gitignore b/core/perp/.gitignore
index 29394683..d550babc 100644
--- a/core/perp/.gitignore
+++ b/core/perp/.gitignore
@@ -1 +1,3 @@
-tools.ninja
+/perp-2.07.tar.gz
+/src
+/tools.ninja
diff --git a/core/perp/fetch.rc b/core/perp/fetch.rc
new file mode 120000
index 00000000..221da00d
--- /dev/null
+++ b/core/perp/fetch.rc
@@ -0,0 +1 @@
+../../util/fetch-curl.rc \ No newline at end of file
diff --git a/core/perp/sha256 b/core/perp/sha256
new file mode 100644
index 00000000..943750d5
--- /dev/null
+++ b/core/perp/sha256
@@ -0,0 +1 @@
+1222fe31c16014d8b2a78416f93ba9f8c31eddbc381adc9021fa5d9764475815 perp-2.07.tar.gz
diff --git a/core/perp/url b/core/perp/url
index 2078b738..0eff1363 100644
--- a/core/perp/url
+++ b/core/perp/url
@@ -1 +1 @@
-http://b0llix.net/perp/distfiles/perp-2.07.tar.gz
+url = "http://b0llix.net/perp/distfiles/perp-2.07.tar.gz"
diff --git a/util/fetch-curl.rc b/util/fetch-curl.rc
new file mode 100755
index 00000000..ee7eed6b
--- /dev/null
+++ b/util/fetch-curl.rc
@@ -0,0 +1,35 @@
+#!/bin/rc
+
+flag e +
+
+ifs='
+'
+
+cd `{dirname $0}
+
+if([ -d src ]) rm -rf src
+
+if(! sha256sum -c sha256 >[2]/dev/null) {
+ curl -L -O -K url
+ sha256sum -c sha256
+}
+
+for(archive in `{awk '{print $2}' sha256}) {
+ switch($archive) {
+ case *.gz
+ tool=zcat
+ case *.bz2
+ tool=bzcat
+ case *.xz
+ tool=xzcat
+ case *
+ tool=()
+ }
+ if(! ~ $#tool 0) $tool $archive | pax -r -s '/^\.\|[^\/]*/src/'
+}
+
+if([ -d patch ]) {
+ if(! dir=`{git rev-parse --show-prefix}^src >[2]/dev/null) dir=src
+ git apply -v --directory $dir patch/*
+}
+status=()