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-11 06:54:40 +0300 committer: kx <kx@radix.pro> 2023-04-11 06:54:40 +0300 commit: 19dc4c5d37a41a6fa8b1076b568191d0b61389c2 parent: 616e36d9e9e3e56af1ea2db055012b77863d09e6
Commit Summary:
applications
Diffstat:
1 file changed, 68 insertions, 0 deletions
diff --git a/packages/a/fakeroot/Makefile b/packages/a/fakeroot/Makefile
new file mode 100644
index 0000000..3d9ec65
--- /dev/null
+++ b/packages/a/fakeroot/Makefile
@@ -0,0 +1,81 @@
+#
+# FAKEROOT:
+#
+# Debian sources:
+#   https://sources.debian.org/src/fakeroot
+#
+# GitLab:
+#   https://salsa.debian.org/clint/fakeroot
+#
+# Clone:
+#   https://salsa.debian.org/clint/fakeroot.git
+#
+# Branch:
+#   upstream
+#
+# tags:
+#   upstream/1.26, ...
+#
+#
+# NOTE:
+#   This Makefile repacks source packages due to build required man pages.
+#   Rebuilding passes using po4a utility which should be installed in system.
+#
+
+url        = https://salsa.debian.org/clint
+
+repo_name  = fakeroot
+pkg_name   = fakeroot
+suffix     = tar.xz
+
+versions   = 1.25.2 1.26 1.29 1.30.1 1.31
+
+# List of tags to be extracted:
+TAGS       = $(addprefix upstream/, $(versions))
+
+git_repo   = .git_clone
+tarballs   = $(addsuffix .$(suffix), $(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=upstream/`echo $$version` ; \
+	  if [ ! -f $(pkg_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) ) ; \
+	    tar xJf $(pkg_name)-$$version.$(suffix) ; \
+	    ( cd $(pkg_name)-$$version/doc ; \
+	      echo -e "\n======= build required man pages for available languages =======" ; \
+	      po4a -k 0 --rm-backups --variable 'srcdir=../doc/' po4a/po4a.cfg ) ; \
+	    tar cJf $(pkg_name)-$$version.$(suffix) $(pkg_name)-$$version ; \
+	    rm -rf $(pkg_name)-$$version ; \
+	  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: $(defconfigs) $(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)