summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkx <kx@radix.pro>2024-01-10 15:08:39 +0300
committerkx <kx@radix.pro>2024-01-10 15:08:39 +0300
commite5e57eb92111b616b48410e71b091eeb8df79c88 (patch)
treedf00d47982bf6d28dfc81866e7ad0da2f82a4b1a
parenta31a5f6317157904d7d6f3c3bd3ea4ca113ad94b (diff)
downloadsources-e5e57eb92111b616b48410e71b091eeb8df79c88.tar.xz
xmltoman-0.6
-rw-r--r--packages/a/Makefile1
-rw-r--r--packages/a/xmltoman/Makefile59
2 files changed, 60 insertions, 0 deletions
diff --git a/packages/a/Makefile b/packages/a/Makefile
index 5c2246e..82c9bc9 100644
--- a/packages/a/Makefile
+++ b/packages/a/Makefile
@@ -168,6 +168,7 @@ SUBDIRS := CLooG \
util-linux \
vim \
xfs \
+ xmltoman \
xz \
ziptool \
zoo \
diff --git a/packages/a/xmltoman/Makefile b/packages/a/xmltoman/Makefile
new file mode 100644
index 0000000..450d924
--- /dev/null
+++ b/packages/a/xmltoman/Makefile
@@ -0,0 +1,59 @@
+#
+# Project Home:
+# ============
+# https://github.com/atsb/xmltoman
+#
+# Clone:
+# =====
+# git clone https://github.com/atsb/xmltoman.git
+#
+
+url = https://github.com/atsb
+
+repo_name = xmltoman
+pkg_name = xmltoman
+suffix = tar.xz
+
+versions = 0.6
+
+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=`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)