diff options
author | kx <kx@radix.pro> | 2024-01-13 10:28:08 +0300 |
---|---|---|
committer | kx <kx@radix.pro> | 2024-01-13 10:28:08 +0300 |
commit | c440f8f0463262e01c4cadc7ffbe91f3830375eb (patch) | |
tree | fc479c3e07877327e3b76133239184d99b28b834 /packages/l/sdl/sdl12-compat/Makefile | |
parent | b8623622b2408c0d6b57ec6cbec77ce029876f34 (diff) | |
download | sources-c440f8f0463262e01c4cadc7ffbe91f3830375eb.tar.xz |
sdl12-compat-1.2.68
Diffstat (limited to 'packages/l/sdl/sdl12-compat/Makefile')
-rw-r--r-- | packages/l/sdl/sdl12-compat/Makefile | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/packages/l/sdl/sdl12-compat/Makefile b/packages/l/sdl/sdl12-compat/Makefile new file mode 100644 index 0000000..b74aca7 --- /dev/null +++ b/packages/l/sdl/sdl12-compat/Makefile @@ -0,0 +1,62 @@ +# +# Project Home: +# ============ +# https://github.com/libsdl-org/sdl12-compat +# +# Clone: +# ===== +# git clone https://github.com/libsdl-org/sdl12-compat.git +# + +url = https://github.com/libsdl-org + +repo_name = sdl12-compat +pkg_name = sdl12-compat +suffix = tar.xz + +versions = 1.2.68 + +# List of tags to be extracted: +TAGS = $(addprefix release-, $(versions)) + +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=release-`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) |