[dietlibc] makefile: added target to fetch the github patch
ensc
ensc at fedoraproject.org
Sat Mar 31 14:04:58 UTC 2012
commit 2ed074850186d436b065d0581b1e1ca58ae17fcf
Author: Enrico Scholz <enrico.scholz at informatik.tu-chemnitz.de>
Date: Sat Mar 31 16:01:11 2012 +0200
makefile: added target to fetch the github patch
Makefile | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/Makefile b/Makefile
index c64dfb6..b274c60 100644
--- a/Makefile
+++ b/Makefile
@@ -2,11 +2,25 @@ MAKEFILE_COMMON = $(HOME)/.fedora/common.mk
-include $(MAKEFILE_COMMON)
CVS ?= cvs
+GIT ?= git
TAR ?= tar
+GZIP ?= gzip
CVS_BASEVER = 0.33
CVS_DATE := $(shell date +'%Y%m%d' -d '-1 day')
+GIT_URL = git://github.com/ensc/dietlibc.git
+GIT_DIFF_OPTS = --summary --stat --patch
+GIT_BRANCH_OLD = CVS
+GIT_BRANCH_NEW = master
_cvs_suffix = ${CVS_BASEVER}.${CVS_DATE}
cvs-sources:
cd ${DESTDIR} . && $(CVS) -d :pserver:cvs at cvs.fefe.de:/cvs -z9 export -D${CVS_DATE} -d dietlibc-${_cvs_suffix} dietlibc
cd ${DESTDIR} . && $(TAR) cJf dietlibc-${_cvs_suffix}.tar.xz dietlibc-${_cvs_suffix} --owner root --group root
+
+git-patch:
+ cd ${DESTDIR} . && $(GIT) clone --mirror $(GIT_URL) dietlibc.git
+ cd ${DESTDIR} . && cd dietlibc.git && { \
+ ref=`git ls-remote . refs/heads/$(GIT_BRANCH_NEW) | cut -f 1` && \
+ $(GIT) diff $(GIT_DIFF_OPTS) $(GIT_BRANCH_OLD)..$(GIT_BRANCH_NEW) > diff && \
+ $(GZIP) -c < diff > ../dietlibc-github-$$ref.patch.gz ; }
+ cd ${DESTDIR} . && rm -rf dietlibc.git
More information about the scm-commits
mailing list