From 9e59a3ffc887e393a34080db2cd2f9cbfbd0cce3 Mon Sep 17 00:00:00 2001 From: Daniel Weschke Date: Thu, 11 Mar 2021 20:55:55 +0100 Subject: [PATCH] fix install script for Arch Linux --- ...brary-linking-for-arcolinux-PKGBUILD.patch | 11 +++++ scripts/install.sh | 41 +++++++++++-------- 2 files changed, 35 insertions(+), 17 deletions(-) create mode 100644 scripts/fix-pymupdf-library-linking-for-arcolinux-PKGBUILD.patch diff --git a/scripts/fix-pymupdf-library-linking-for-arcolinux-PKGBUILD.patch b/scripts/fix-pymupdf-library-linking-for-arcolinux-PKGBUILD.patch new file mode 100644 index 00000000..8305e720 --- /dev/null +++ b/scripts/fix-pymupdf-library-linking-for-arcolinux-PKGBUILD.patch @@ -0,0 +1,11 @@ +diff --unified --recursive --text python-pymupdf.orig/PKGBUILD python-pymupdf.new/PKGBUILD +--- python-pymupdf.orig/PKGBUILD 2021-03-11 19:46:08.778738089 +0100 ++++ python-pymupdf.new/PKGBUILD 2021-03-11 19:55:19.992557839 +0100 +@@ -18,6 +18,7 @@ + + prepare() { + cd "${_name}-${pkgver}" ++ patch --forward --strip=1 --input="${HOME}/.config/emacs/scripts/fix-pymupdf-library-linking-for-arcolinux.patch" + } + + build() { diff --git a/scripts/install.sh b/scripts/install.sh index 763a8d49..5839d7f3 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -20,15 +20,17 @@ # INTERNAL distro=$(lsb_release -is) +if test $distro = "ArcoLinux"; then distro=Arch; fi # echo $distro +echo "install" case $distro in - "Arch") + Arch) echo "Arch found" echo "Emacs installation" - yay -Syu --needed emacs-git \ - yay -S ttf-inconsolata ttf-opensans noto-fonts-cjk \ - yay -S aspell aspell-de aspell-en \ + yay -Syu --needed --answerclean y --answerdiff n emacs-git \ + ttf-inconsolata ttf-opensans noto-fonts-cjk \ + aspell aspell-de aspell-en \ hunspell hunspell-de hunspell-en_US \ languagetool \ biber bibtex2html texlive-bibtexextra texlive-core \ @@ -43,16 +45,10 @@ case $distro in python-feedparser python-dbus python-pyinotify python-markdown \ python-grip filebrowser-bin python-epc mupdf \ ditaa plantuml r - # TODO: python-pymupdf - # PGKBUILD with patch - # yay --editmenu -S python-pymupdf - # prepare() { - # cd "${_name}-${pkgver}" - # patch --forward --strip=1 --input="${HOME}/.config/emacs/scripts/fix-pymupdf-library-linking-for-arcolinux.patch" - # } + # workaround for python-pymupdf see below ;; - "Debian") + Debian) echo "Debian found" echo "Emacs installation" sudo apt-get update @@ -104,12 +100,9 @@ case $distro in ;; esac - - +echo "config" case $distro in Arch|Debian) - echo "Emacs configuration" - folder="${HOME}/.config/emacs" mkdir -p $folder echo "git clone" @@ -123,7 +116,21 @@ case $distro in ;; esac -# TODO: texmf +echo "post install" +case $distro in + Arch) + # workaround for python-pymupdf + folder="${HOME}/.cache/yay/python-pymupdf.custom" + rm -rf "$folder" + mkdir -p "$folder" + cd "$folder" + git clone https://aur.archlinux.org/python-pymupdf.git . + # same as, but will create a folder same as package: yay -G python-pymupdf + patch --forward --strip=1 --input="${HOME}/.config/emacs/scripts/fix-pymupdf-library-linking-for-arcolinux-PKGBUILD.patch" + # yay -S --mflags "-p PKGBUILD" --answerclean y --answerdiff n python-pymupdf + makepkg -si + ;; +esac #