diff options
-rw-r--r-- | KDE/Makefile | 1 | ||||
-rw-r--r-- | KDE/office/Makefile | 24 | ||||
-rw-r--r-- | KDE/office/ghostwriter/Makefile | 62 |
3 files changed, 87 insertions, 0 deletions
diff --git a/KDE/Makefile b/KDE/Makefile index a758b1c..903d4db 100644 --- a/KDE/Makefile +++ b/KDE/Makefile @@ -11,6 +11,7 @@ SUBDIRS := accessibility \ graphics \ multimedia \ network \ + office \ pim \ plasma \ system diff --git a/KDE/office/Makefile b/KDE/office/Makefile new file mode 100644 index 0000000..835cb96 --- /dev/null +++ b/KDE/office/Makefile @@ -0,0 +1,24 @@ + +# +# Following command helps to cheate SUBDIRS list: +# $ tree -fid . +# + +SUBDIRS := ghostwriter + + +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/KDE/office/ghostwriter/Makefile b/KDE/office/ghostwriter/Makefile new file mode 100644 index 0000000..239d444 --- /dev/null +++ b/KDE/office/ghostwriter/Makefile @@ -0,0 +1,62 @@ +# +# Project Home: +# ============ +# https://invent.kde.org +# +# Clone: +# ===== +# git clone https://invent.kde.org/office/ghostwriter.git +# + +url = https://invent.kde.org/office + +repo_name = ghostwriter +pkg_name = ghostwriter +suffix = tar.xz + +versions = 23.08.3 + +# List of tags to be extracted: +TAGS = $(addprefix v, $(versions)) + +git_repo = .git_clone +tarballs = $(addsuffix .tar.xz, $(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=v`echo $$version` ; \ + if [ ! -f $(repo_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) ) ; \ + fi ; \ + done + +$(sha1s): %.tar.xz.sha1sum : %.tar.xz + @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) |