summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2013-06-02 10:11:29 (EDT)
committer P. J. McDermott <pjm@nac.net>2013-06-02 10:11:29 (EDT)
commit5b483e83bc811d42c9eb0a0e38b45d4549df31bd (patch)
treec662f638f85f341d813c3a0342b86582a1bcee80
parent6592cd3deac19d31e1dd0f367c85d2f6ef9e5c1b (diff)
source.mk: New file.
-rwxr-xr-xbuild2
-rw-r--r--source.mk15
2 files changed, 17 insertions, 0 deletions
diff --git a/build b/build
index fa5b213..50741b6 100755
--- a/build
+++ b/build
@@ -1,5 +1,7 @@
#!/usr/bin/make -f
+include ../source.mk
+
build:
chmod a+x src/configure
oh-autoconfigure -- \
diff --git a/source.mk b/source.mk
new file mode 100644
index 0000000..a7a6fc5
--- /dev/null
+++ b/source.mk
@@ -0,0 +1,15 @@
+upstream_svn_branch = trunk
+upstream_svn_uri = http://opkg.googlecode.com/svn/$(upstream_svn_branch)/
+upstream_svn_rev = $$(printf '%s\n' '$(OPK_SOURCE_VERSION_UPSTREAM)' | \
+ sed 's/^.*~r\(.*\)$$/\1/')
+source = opkg-$(OPK_SOURCE_VERSION_UPSTREAM)
+source_archive = ../$(source).orig.tar.bz2
+
+$(source_archive):
+ svn export -r "$(upstream_svn_rev)" '$(upstream_svn_uri)' '$(source)'
+ cd '$(source)' && autoreconf -v -i && cd ..
+ tar -cjf '$(SOURCE_ARCHIVE)' '$(SOURCE)'
+ rm -Rf src
+ mv '$(SOURCE)' src
+
+source: $(source_archive)