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 23:18:24 +0300 committer: kx <kx@radix.pro> 2023-04-09 23:18:24 +0300 commit: 8b7e76c7ad2445c0920e9d056728f7b6baaa0c43 parent: 3dd1914515dc5c714451bc4148f0abb51672ed06
Commit Summary:
network packages
Diffstat:
5 files changed, 221 insertions, 0 deletions
diff --git a/packages/n/maxmind/Makefile b/packages/n/maxmind/Makefile
new file mode 100644
index 0000000..f3a07b2
--- /dev/null
+++ b/packages/n/maxmind/Makefile
@@ -0,0 +1,28 @@
+
+#
+# Following command helps to cheate SUBDIRS list:
+# $ tree -fid .
+#
+
+SUBDIRS := geoip-api-c  \
+           geoip-db     \
+           geoipupdate  \
+           libmaxminddb
+
+
+
+all-recursive downloads_clean-recursive:
+	@set fnord $(MAKEFLAGS); amf=$$2; \
+	target=`echo $@ | sed s/-recursive//`; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  echo "Making $$target in $$subdir"; \
+	  local_target="$$target"; \
+	  (cd $$subdir && $(MAKE) $$fnord $$local_target) \
+	   || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+	done; test -z "$$fail"
+
+all: all-recursive
+
+downloads_clean: downloads_clean-recursive
+
+.PHONY: all-recursive downloads_clean-recursive all downloads_clean
diff --git a/packages/n/maxmind/geoip-api-c/Makefile b/packages/n/maxmind/geoip-api-c/Makefile
new file mode 100644
index 0000000..198686d
--- /dev/null
+++ b/packages/n/maxmind/geoip-api-c/Makefile
@@ -0,0 +1,68 @@
+#
+# Project Home:
+# ============
+# https://github.com/maxmind
+#
+# GitHub:
+# ======
+# https://github.com/maxmind/geoip-api-c
+#
+#
+
+url         = https://github.com/maxmind
+
+repo_name  = geoip-api-c
+
+#
+# List of tags to be extracted:
+# ============================
+#                                               hash | tag
+#            ----------------------------------------+-----
+revisions  = 4b526e7331ca1d692b74a0509ddcc725622ed31a:1.16.2
+
+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)
diff --git a/packages/n/maxmind/geoip-db/Makefile b/packages/n/maxmind/geoip-db/Makefile
new file mode 100644
index 0000000..2012218
--- /dev/null
+++ b/packages/n/maxmind/geoip-db/Makefile
@@ -0,0 +1,52 @@
+#
+# Project Home:
+# ============
+# https://mailfud.org/geoip-legacy/
+#
+
+url         = https://mailfud.org/geoip-legacy
+
+date        = $(shell date +'%Y%m%d')
+suffix      = tar.xz
+pkg_name    = geoip-db-$(date)
+package     = $(addsuffix .$(suffix), $(pkg_name))
+sha1s       = $(addsuffix .sha1sum, $(package))
+
+files       = GeoIP GeoIPv6 GeoIPCity GeoIPCityv6  GeoIPASNum GeoIPASNumv6 GeoIPISP GeoIPOrg
+tarballs    = $(addprefix $(pkg_name)/, $(addsuffix .dat.gz, $(files)))
+
+script      = $(pkg_name)/geoip_update.sh
+
+TARGETS = $(package) $(sha1s)
+
+all: $(TARGETS)
+
+.PHONY: downloads_clean
+
+$(tarballs):
+	@echo -e "\n======= Downloading source tarballs =======\n"
+	@mkdir -p $(pkg_name)
+	@( cd $(pkg_name) ; \
+	   for tarball in $(tarballs) ; do \
+	     wget -N $(url)/`basename $$tarball` ; \
+	   done ; \
+	 )
+
+$(script):
+	@( cd $(pkg_name) ; \
+	   wget -N $(url)/`basename $(script)` ; \
+	 )
+
+$(package): $(tarballs) $(script)
+	@echo -e "\n======= Create $(package) tarball =======\n"
+	@tar -cJvf $(package) $(pkg_name)/
+	@rm -rf $(pkg_name)/
+
+$(sha1s): %.$(suffix).sha1sum : %.$(suffix)
+	@for tarball in $< ; do \
+	  echo -e "\n======= Calculation the '$$tarball' sha1sum =======\n" ; \
+	  sha1sum --binary $$tarball > $$tarball.sha1sum ; \
+	done
+
+downloads_clean:
+	@rm -rf $(package) $(sha1s)
diff --git a/packages/n/maxmind/geoipupdate/Makefile b/packages/n/maxmind/geoipupdate/Makefile
new file mode 100644
index 0000000..8297074
--- /dev/null
+++ b/packages/n/maxmind/geoipupdate/Makefile
@@ -0,0 +1,69 @@
+#
+# Project Home:
+# ============
+# https://github.com/maxmind
+#
+# GitHub:
+# ======
+# https://github.com/maxmind/geoipupdate
+#
+#
+
+url         = https://github.com/maxmind
+
+repo_name  = geoipupdate
+
+#
+# List of tags to be extracted:
+# ============================
+#                                               hash | tag
+#            ----------------------------------------+-----
+revisions  = b2cdea6d8d8677b5992fa9c0dede04cceec54e3c:4.7.1
+revisions += 99916e483100666e627be6b10ba178b814e3fceb:4.8.0
+
+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)
diff --git a/packages/n/maxmind/libmaxminddb/Makefile b/packages/n/maxmind/libmaxminddb/Makefile
new file mode 100644
index 0000000..cea6eb3
--- /dev/null
+++ b/packages/n/maxmind/libmaxminddb/Makefile
@@ -0,0 +1,69 @@
+#
+# Project Home:
+# ============
+# https://github.com/maxmind
+#
+# GitHub:
+# ======
+# https://github.com/maxmind/libmaxminddb
+#
+#
+
+url         = https://github.com/maxmind
+
+repo_name  = libmaxminddb
+
+#
+# List of tags to be extracted:
+# ============================
+#                                               hash | tag
+#            ----------------------------------------+-----
+revisions  = d9a1a7f66918f7a8d518cfd1c120b9f73f489fc1:1.5.2
+revisions += 2d0e6b7360b88f645e67ffc5a709b2327d361ac3:1.6.0
+
+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)