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:
Diffstat:
4 files changed, 187 insertions, 0 deletions
diff --git a/packages/l/unidata/Makefile b/packages/l/unidata/Makefile
new file mode 100644
index 0000000..4ad25d4
--- /dev/null
+++ b/packages/l/unidata/Makefile
@@ -0,0 +1,26 @@
+
+#
+# Following command helps to cheate SUBDIRS list:
+# $ tree -fid .
+#
+
+SUBDIRS := netcdf-c \
+ netcdf-cxx \
+ netcdf-fortran
+
+
+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/l/unidata/netcdf-c/Makefile b/packages/l/unidata/netcdf-c/Makefile
new file mode 100644
index 0000000..85dffec
--- /dev/null
+++ b/packages/l/unidata/netcdf-c/Makefile
@@ -0,0 +1,71 @@
+# Project Home:
+# ============
+# https://www.unidata.ucar.edu
+#
+# GitHub:
+# ======
+# https://github.com/Unidata/netcdf-c
+#
+# Downloads:
+# =========
+# https://downloads.unidata.ucar.edu/netcdf
+# ftp://ftp.unidata.ucar.edu/pub/netcdf
+#
+
+url = https://github.com/Unidata
+
+repo_name = netcdf-c
+
+#
+# List of tags to be extracted:
+# ============================
+# hash | tag
+# ----------------------------------------+-----
+revisions = d56c50491692659e3769750d44398ddd9c84d05e:4.9.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/l/unidata/netcdf-cxx/Makefile b/packages/l/unidata/netcdf-cxx/Makefile
new file mode 100644
index 0000000..52737d0
--- /dev/null
+++ b/packages/l/unidata/netcdf-cxx/Makefile
@@ -0,0 +1,71 @@
+# Project Home:
+# ============
+# https://www.unidata.ucar.edu
+#
+# GitHub:
+# ======
+# https://github.com/Unidata/netcdf-cxx4
+#
+# Downloads:
+# =========
+# https://downloads.unidata.ucar.edu/netcdf
+# ftp://ftp.unidata.ucar.edu/pub/netcdf
+#
+
+url = https://github.com/Unidata
+
+repo_name = netcdf-cxx4
+
+#
+# List of tags to be extracted:
+# ============================
+# hash | tag
+# ----------------------------------------+-----
+revisions = f8882188267488ef801691e69ad072e3eb217ad8:4.3.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 ; \
+ 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/l/unidata/netcdf-fortran/Makefile b/packages/l/unidata/netcdf-fortran/Makefile
new file mode 100644
index 0000000..b5732ea
--- /dev/null
+++ b/packages/l/unidata/netcdf-fortran/Makefile
@@ -0,0 +1,71 @@
+# Project Home:
+# ============
+# https://www.unidata.ucar.edu
+#
+# GitHub:
+# ======
+# https://github.com/Unidata/netcdf-fortran
+#
+# Downloads:
+# =========
+# https://downloads.unidata.ucar.edu/netcdf
+# ftp://ftp.unidata.ucar.edu/pub/netcdf
+#
+
+url = https://github.com/Unidata
+
+repo_name = netcdf-fortran
+
+#
+# List of tags to be extracted:
+# ============================
+# hash | tag
+# ----------------------------------------+-----
+revisions = f722fc0c7f1091098a575beb2c2e5dbb23ffb644:4.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)