summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbuild6
-rw-r--r--source.mk18
2 files changed, 24 insertions, 0 deletions
diff --git a/build b/build
index afadb90..bdbbafe 100755
--- a/build
+++ b/build
@@ -120,3 +120,9 @@ clean-locales:
clean: clean-libc clean-locales
rm -f configure build
rm -Rf *.data
+
+# POSIX.1-2008:
+# If the pathname does not begin with a '/' it shall be treated as relative to
+# the current working directory of the process, not relative to the directory
+# containing the makefile.
+include ../source.mk
diff --git a/source.mk b/source.mk
new file mode 100644
index 0000000..35964b5
--- /dev/null
+++ b/source.mk
@@ -0,0 +1,18 @@
+UPSTREAM_SVN_BRANCH = eglibc-$$(printf '%s\n' '$(OPK_SOURCE_VERSION_UPSTREAM)' \
+ | sed 's/^\([0-9][0-9]*\)\.\([0-9][0-9]*\)~.*$$/\1_\2/')
+UPSTREAM_SVN_URI = svn://svn.eglibc.org/branches/$(UPSTREAM_SVN_BRANCH)
+UPSTREAM_SVN_REV = $$(printf '%s\n' '$(OPK_SOURCE_VERSION_UPSTREAM)' | \
+ sed 's/^[0-9][0-9]*\.[0-9][0-9]*~r\([0-9][0-9]*\).*$$/\1/')
+SOURCE = eglibc-$(OPK_SOURCE_VERSION_UPSTREAM)
+SOURCE_ARCHIVE = ../$(SOURCE).orig.tar.bz2
+
+$(SOURCE):
+ svn export -r "$(UPSTREAM_SVN_REV)" "$(UPSTREAM_SVN_URI)" \
+ 'eglibc-$(OPK_SOURCE_VERSION_UPSTREAM)'
+ rm -Rf '$(SOURCE)/libc/manual'
+
+$(SOURCE_ARCHIVE): $(SOURCE)
+ tar -cjf '$(SOURCE_ARCHIVE)' '$(SOURCE)'
+ rm -Rf '$(SOURCE)'
+
+source: $(SOURCE_ARCHIVE)