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_ARCHIVE): svn export -r "$(UPSTREAM_SVN_REV)" "$(UPSTREAM_SVN_URI)" \ 'eglibc-$(OPK_SOURCE_VERSION_UPSTREAM)' for file in '$(SOURCE)/libc/manual/'*; do \ case "$${file}" in \ '$(SOURCE)/libc/manual/Makefile') \ ;; \ *) \ rm -Rf "$${file}"; \ ;; \ esac; \ done tar -cjf '$(SOURCE_ARCHIVE)' '$(SOURCE)' rm -Rf src mv '$(SOURCE)' src source: $(SOURCE_ARCHIVE)