Sources

The Tree of Radix and Third Party Sources

1388 Commits   0 Branches   11 Tags
author: kx <kx@radix.pro> 2021-10-01 13:21:04 +0300 committer: kx <kx@radix.pro> 2021-10-01 13:21:04 +0300 commit: 10418b231cfbb0e0a4ad7ccb5b406d372bceb331 parent: 1a182d5f9da94a4fbc0cab2df2eb71dd989bd53b
Commit Summary:
M2Crypto-0.38.0
Diffstat:
2 files changed, 52 insertions, 1 deletion
diff --git a/packages/d/python-modules/Makefile b/packages/d/python-modules/Makefile
index 084d14a..9ecf6cc 100644
--- a/packages/d/python-modules/Makefile
+++ b/packages/d/python-modules/Makefile
@@ -4,7 +4,8 @@
 # $ tree -fid .
 #
 
-SUBDIRS := pip        \
+SUBDIRS := m2crypto   \
+           pip        \
            setuptools \
            wheel
 
diff --git a/packages/d/python-modules/m2crypto/Makefile b/packages/d/python-modules/m2crypto/Makefile
new file mode 100644
index 0000000..6dd7705
--- /dev/null
+++ b/packages/d/python-modules/m2crypto/Makefile
@@ -0,0 +1,64 @@
+#
+# Project Home:
+# ============
+# https://gitlab.com/m2crypto/m2crypto
+#
+# Downloads:
+# =========
+# https://pypi.org/project/M2Crypto/#files
+#
+# GitLab:
+# ======
+# https://gitlab.com/m2crypto/m2crypto.git
+#
+
+url         = https://gitlab.com/m2crypto/m2crypto.git
+
+repo_name   = m2crypto
+
+versions    = 0.38.0
+suffix      = tar.gz
+
+TAGS        = $(versions)
+
+git_repo    = .git_clone
+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)
+	@touch $@
+
+
+$(tarballs): $(git_repo)
+	@for version in $(TAGS) ; do \
+	  tag=`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=$(repo_name)-$$version/ $$tag | \
+	      gzip >../$(repo_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)