author: kx <kx@radix.pro> 2023-04-06 20:43:54 +0300
committer: kx <kx@radix.pro> 2023-04-06 20:43:54 +0300
commit: 210fa86eda7822356cd0950e597fb4721e227fe9
parent: 9344bb002ddcfcea1e0587df1af22ee91f6c1e88
Commit Summary:
Diffstat:
3 files changed, 51 insertions, 1 deletion
diff --git a/packages/Makefile b/packages/Makefile
index 78fd6c0..f8176af 100644
--- a/packages/Makefile
+++ b/packages/Makefile
@@ -4,7 +4,8 @@
# $ tree -fid .
#
-SUBDIRS := d
+SUBDIRS := d \
+ y
all-recursive downloads_clean-recursive:
diff --git a/packages/y/Makefile b/packages/y/Makefile
new file mode 100644
index 0000000..b0d3812
--- /dev/null
+++ b/packages/y/Makefile
@@ -0,0 +1,24 @@
+
+#
+# Following command helps to cheate SUBDIRS list:
+# $ tree -fid .
+#
+
+SUBDIRS := bsd-games
+
+
+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/y/bsd-games/Makefile b/packages/y/bsd-games/Makefile
new file mode 100644
index 0000000..2729256
--- /dev/null
+++ b/packages/y/bsd-games/Makefile
@@ -0,0 +1,43 @@
+#
+# Downloads:
+# =========
+# https://ibiblio.org/pub/linux/games
+#
+
+url = https://ibiblio.org/pub/linux/games
+
+versions = 2.17
+pkgname = bsd-games
+suffix = tar.gz
+
+tarballs = $(addsuffix .$(suffix), $(addprefix $(pkgname)-, $(versions)))
+sha1s = $(addsuffix .sha1sum, $(tarballs))
+descriptions = $(addsuffix .lsm, $(addprefix $(pkgname)-, $(versions)))
+
+files = $(descriptions)
+
+all: $(tarballs) $(files) $(sha1s)
+
+.PHONY: downloads_clean
+
+
+$(tarballs):
+ @echo -e "\n======= Downloading source tarballs =======\n"
+ @for tarball in $(tarballs) ; do \
+ wget -N $(url)/$$tarball ; \
+ done
+
+$(files): $(tarballs)
+ @echo -e "\n======= Downloading patch and description =======\n"
+ @for file in $(files) ; do \
+ wget -N $(url)/$$file ; \
+ done
+
+$(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 $(tarballs) $(files) $(sha1s)