Commit d420d82f authored by Andrey V.Kosteltsev's avatar Andrey V.Kosteltsev

Unicode ICU moved to github

parent 062178d3
......@@ -7,43 +7,70 @@
# =================
# http://icu-project.org/apiref/icu4c
#
# Downloads:
# =========
# http://site.icu-project.org/download
# Clone:
# =====
# git clone https://github.com/unicode-org/icu.git
#
# http://downloads.sourceforge.net/project/icu/ICU4C/${VERSION}
url = https://github.com/unicode-org
repo_name = icu
#
# List of tags to be extracted:
# ============================
# hash | tag
# ----------------------------------------+-----
revisions = fd123bf023882f07bfacf51c39111be2f946d8f8:65.1
url = http://downloads.sourceforge.net/project/icu/ICU4C
git_repo = .git_clone
versions = 54.1 55.1 56.1 65.1
pkgname = icu4c
suffix = tar.bz2
suffix = tar.xz
tarballs = $(addsuffix .$(suffix), $(addprefix $(pkgname)-, $(versions)))
sha1s = $(addsuffix .sha1sum, $(tarballs))
versions = $(foreach tag, $(revisions), $(shell echo $(tag) | cut -f 2 -d ':'))
tarballs = $(addsuffix .$(suffix), $(addprefix $(repo_name)4c-, $(versions)))
sha1s = $(addsuffix .sha1sum, $(tarballs))
all: $(tarballs) $(sha1s)
TARGETS = repository_clean
.PHONY: downloads_clean
all: $(TARGETS)
$(tarballs):
@echo -e "\n======= Downloading source tarballs =======\n"
@for version in $(versions) ; do \
v=`echo $$version | sed 's/\./_/g'` ; \
wget -N $(url)/$$version/$(pkgname)-$$v-src.tgz ; \
tar xzf $(pkgname)-$$v-src.tgz ; \
mv icu $(pkgname)-$$version ; \
tar cjf $(pkgname)-$$version.$(suffix) $(pkgname)-$$version ; \
rm -rf $(pkgname)-$$version $(pkgname)-$$v-src.tgz ; \
.PHONY: downloads_clean repository_clean
$(git_repo):
@echo -e "\n======= Clone $(repo_name).git repository =======\n"
@rm -rf $(repo_name)
@git clone $(url)/$(repo_name).git $(repo_name)
@touch $@
$(tarballs): $(git_repo)
@for revision in $(revisions) ; do \
hash=`echo $$revision | cut -f 1 -d ':'` ; \
version=`echo $$revision | cut -f 2 -d ':'` ; \
if [ ! -f $(repo_name)-$$version.$(suffix) ]; then \
echo -e "\n======= Creating '$(repo_name)-$$version.$(suffix)' snapshot =======" ; \
( cd $(repo_name) && \
git archive --format=tar --prefix=$(repo_name)-$$version/ $$hash | \
xz >../$(repo_name)-$$version.$(suffix) ) ; \
fi ; \
tar xJf $(repo_name)-$$version.$(suffix) ; \
( cd $(repo_name)-$$version ; \
mv $(repo_name)4c $(repo_name)4c-$$version ; \
tar cJvf ../$(repo_name)4c-$$version.$(suffix) $(repo_name)4c-$$version ) ; \
rm -rf $(repo_name)-$$version $(repo_name)-$$version.$(suffix) ; \
done
$(sha1s): %.$(suffix).sha1sum : %.$(suffix)
@for tarball in $< ; do \
echo -e "\n======= Calculation the '$$tarball' sha1sum =======\n" ; \
echo -e "\n======= Calculation the '$$tarball' sha1sum =======" ; \
sha1sum --binary $$tarball > $$tarball.sha1sum ; \
done
repository_clean: $(sha1s)
@echo -e "\n======= Remove cloned $(repo_name).git repository =======\n"
@rm -rf $(git_repo) $(repo_name)
downloads_clean:
@rm -rf $(tarballs) $(sha1s)
@rm -rf $(git_repo) $(repo_name)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment