Radix cross Linux 3pp sources

RcL sources – is a tree of Third Party and Radix source tarballs

343 Commits   0 Branches   0 Tags
author: kx <kx@radix.pro> 2023-04-09 03:24:10 +0300 committer: kx <kx@radix.pro> 2023-04-09 03:24:10 +0300 commit: 3dd1914515dc5c714451bc4148f0abb51672ed06 parent: c0eee091446a07e56576b7d855dd09f0da9968c8
Commit Summary:
libraries
Diffstat:
1 file changed, 62 insertions, 0 deletions
diff --git a/packages/l/libstrophe/Makefile b/packages/l/libstrophe/Makefile
new file mode 100644
index 0000000..09586fb
--- /dev/null
+++ b/packages/l/libstrophe/Makefile
@@ -0,0 +1,77 @@
+#
+# Project Home:
+# ============
+# http://strophe.im/libstrophe
+#
+# GitHub:
+# ======
+# https://github.com/strophe/libstrophe
+#
+# Clone:
+# =====
+# https://github.com/strophe/libstrophe.git
+#
+
+url        = https://github.com/strophe
+
+repo_name  = libstrophe
+
+#
+# List of tags to be extracted:
+# ============================
+#                                               hash | tag
+#            ----------------------------------------+-----
+revisions  = 9931ad4fa2aa7f204c608010eb2ebf84bcf7d542:0.9.1
+revisions += 4f915d75152003e5439e48dbc7e370bbad869a6d:0.9.3
+revisions += 2d5424bcff4e9d810b73444b02708f69743ff65d:0.10.1
+
+git_repo   = .git_clone
+
+suffix     = tar.xz
+
+versions   = $(foreach tag, $(revisions), $(shell echo $(tag) | cut -f 2 -d ':'))
+
+tarballs   = $(addsuffix .$(suffix), $(addprefix $(repo_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=$(repo_name)-$$version/ $$hash | \
+	      xz >../$(repo_name)-$$version.$(suffix) ) ; \
+	  fi ; \
+	  tar xJf $(repo_name)-$$version.$(suffix) ; \
+	  ( cd $(repo_name)-$$version ; ./bootstrap.sh ; rm -rf autom4te.cache .gitignore ) ; \
+	  tar cJf $(repo_name)-$$version.$(suffix) $(repo_name)-$$version ; \
+	  rm -rf $(repo_name)-$$version ; \
+	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)