author: kx <kx@radix.pro> 2023-04-06 10:37:20 +0300
committer: kx <kx@radix.pro> 2023-04-06 10:37:20 +0300
commit: b8d9de0a8bff1b815a7f84df279cb608fe2e962b
parent: cbda8cd8fcffd037f28be2d043a05bef12db485a
Commit Summary:
Diffstat:
1 file changed, 57 insertions, 0 deletions
diff --git a/X.org/driver/xf86-input-wacom/Makefile b/X.org/driver/xf86-input-wacom/Makefile
new file mode 100644
index 0000000..005fd83
--- /dev/null
+++ b/X.org/driver/xf86-input-wacom/Makefile
@@ -0,0 +1,73 @@
+#
+# Project Home:
+# ============
+# https://github.com/linuxwacom/xf86-input-wacom
+#
+# GitHub:
+# ======
+# git clone https://github.com/linuxwacom/xf86-input-wacom.git
+#
+
+url = https://github.com/linuxwacom
+
+repo_name = xf86-input-wacom
+pkg_name = xf86-input-wacom
+
+#
+# List of tags to be extracted (git rev-list -n 1 xf86-input-wacom-1.1.0):
+# =======================================================================
+# hash | tag
+# ----------------------------------------+-----
+revisions = f2df07587e5ff89a6c5b2246bc468211c31cf43a:1.1.0
+
+
+git_repo = .git_clone
+
+suffix = tar.xz
+
+versions = $(foreach tag, $(revisions), $(shell echo $(tag) | cut -f 2 -d ':'))
+
+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 revision in $(revisions) ; do \
+ hash=`echo $$revision | cut -f 1 -d ':'` ; \
+ version=`echo $$revision | cut -f 2 -d ':'` ; \
+ if [ ! -f $(pkg_name)-$$version.$(suffix) ]; then \
+ echo -e "\n======= Creating '$(pkg_name)-$$version.$(suffix)' snapshot =======" ; \
+ ( cd $(repo_name) && \
+ git archive --format=tar --prefix=$(pkg_name)-$$version/ $$hash | \
+ xz >../$(pkg_name)-$$version.$(suffix) ) ; \
+ fi ; \
+ tar xJf $(pkg_name)-$$version.$(suffix) ; \
+ ( cd $(pkg_name)-$$version ; ./autogen.sh ; make distclean ; rm -rf autom4te.cache .github .gitignore .editorconfig *~ ) ; \
+ tar cJf $(pkg_name)-$$version.$(suffix) $(pkg_name)-$$version ; \
+ rm -rf $(pkg_name)-$$version ; \
+ 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)