diff options
author | kx <kx@radix.pro> | 2023-05-31 23:43:13 +0300 |
---|---|---|
committer | kx <kx@radix.pro> | 2023-05-31 23:43:13 +0300 |
commit | d688523c6f3b3e3eafaf515aefff0bd2894a3bd0 (patch) | |
tree | 6510260998d11c8a59485b3cbbdc9c907f53f0f9 /packages | |
parent | 8cdc7f865b12dde48c02f42777c24ec2e4d58eae (diff) | |
download | sources-d688523c6f3b3e3eafaf515aefff0bd2894a3bd0.tar.xz |
dev: ccache-4.8.1
Diffstat (limited to 'packages')
-rw-r--r-- | packages/d/Makefile | 3 | ||||
-rw-r--r-- | packages/d/ccache/Makefile | 63 |
2 files changed, 65 insertions, 1 deletions
diff --git a/packages/d/Makefile b/packages/d/Makefile index ba26143..5c86183 100644 --- a/packages/d/Makefile +++ b/packages/d/Makefile @@ -4,7 +4,8 @@ # $ tree -fid . # -SUBDIRS := check \ +SUBDIRS := ccache \ + check \ cmake \ flex \ git \ diff --git a/packages/d/ccache/Makefile b/packages/d/ccache/Makefile new file mode 100644 index 0000000..f056b02 --- /dev/null +++ b/packages/d/ccache/Makefile @@ -0,0 +1,63 @@ +# +# Project Home: +# ============ +# https://ccache.dev +# +# GitHub: +# ====== +# https://github.com/ccache/ccache +# +# Clone: +# ===== +# git clone https://github.com/ccache/ccache.git +# + +url = https://github.com/ccache + +repo_name = ccache +pkg_name = ccache +suffix = tar.xz + +versions = 4.8.1 + +git_repo = .git_clone +tarballs = $(addsuffix .tar.xz, $(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 version in $(versions) ; do \ + tag=v`echo $$version` ; \ + 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/ $$tag | \ + xz >../$(pkg_name)-$$version.$(suffix) ) ; \ + fi ; \ + done + +$(sha1s): %.tar.xz.sha1sum : %.tar.xz + @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) |