Sources

The Tree of Radix and Third Party Sources

1264 Commits   0 Branches   11 Tags
author: kx <kx@radix.pro> 2021-05-02 15:39:16 +0300 committer: kx <kx@radix.pro> 2021-05-02 15:39:16 +0300 commit: 000778e8ff5a4e8f5fc147949083c61486652e2c parent: 4afce54de3b8a8d5e676dd503ac22deca56ad280
Commit Summary:
freeradius-client-1.1.7
Diffstat:
2 files changed, 57 insertions, 0 deletions
diff --git a/packages/n/Makefile b/packages/n/Makefile
index e9384be..9eb3813 100644
--- a/packages/n/Makefile
+++ b/packages/n/Makefile
@@ -34,6 +34,7 @@ SUBDIRS := ModemManager           \
            ethtool                \
            fetchmail              \
            firmware               \
+           freeradius-client      \
            getmail                \
            gnupg                  \
            gnupg2                 \
diff --git a/packages/n/freeradius-client/Makefile b/packages/n/freeradius-client/Makefile
new file mode 100644
index 0000000..234ac96
--- /dev/null
+++ b/packages/n/freeradius-client/Makefile
@@ -0,0 +1,71 @@
+#
+# Project Home:
+# ============
+# https://github.com/FreeRADIUS/freeradius-client
+#
+# GitHub:
+# ======
+# https://github.com/FreeRADIUS/freeradius-client
+#
+# Clone:
+# =====
+# https://github.com/FreeRADIUS/freeradius-client.git
+#
+
+url        = https://github.com/FreeRADIUS
+
+repo_name  = freeradius-client
+
+#
+# List of tags to be extracted:
+# ============================
+#                                               hash | tag
+#            ----------------------------------------+-----
+revisions  = 932713f33a5334cfc5693d4c0a728bce25d11188:1.1.7
+
+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 ; \
+	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)