diff options
Diffstat (limited to 'X.org/lib/libXcm/Makefile')
-rw-r--r-- | X.org/lib/libXcm/Makefile | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/X.org/lib/libXcm/Makefile b/X.org/lib/libXcm/Makefile new file mode 100644 index 0000000..b890510 --- /dev/null +++ b/X.org/lib/libXcm/Makefile @@ -0,0 +1,76 @@ +# +# Project Home: +# ============ +# http://www.oyranos.org/libxcm/index.html +# +# GitHub: +# ====== +# git clone https://github.com/oyranos-cms/oyranos.git +# +# Downloads: +# ========= +# https://github.com/oyranos-cms/oyranos/releases +# +# NOTE: +# ==== +# This is a full package contains libXcm. +# + +url = https://github.com/oyranos-cms + +repo_name = libxcm +pkg_name = libXcm + +# +# List of tags to be extracted: +# ============================ +# hash | tag +# ----------------------------------------+----- +revisions = 2530c38c841d46467ebce1b1f69d9a66fe59be90:0.5.4 + +git_repo = .git_clone + +suffix = tar.xz + +versions = $(foreach tag, $(revisions), $(shell echo $(tag) | cut -f 2 -d ':')) + +tarballs = $(addsuffix .$(suffix), $(addprefix $(pkg_name)-, $(versions))) +sha1s = $(addsuffix .sha1sum, $(tarballs)) + +TARGETS = repository_clean + +all: $(TARGETS) + +.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=$(pkg_name)-$$version/ $$hash | \ + xz >../$(pkg_name)-$$version.$(suffix) ) ; \ + fi ; \ + done + +$(sha1s): %.$(suffix).sha1sum : %.$(suffix) + @for tarball in $< ; do \ + 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) |