diff options
author | BrLi | 2021-10-26 17:10:22 +0800 |
---|---|---|
committer | BrLi | 2021-10-26 17:10:22 +0800 |
commit | c0842918f0392004b2a38a0b00bf1ebbb67265e6 (patch) | |
tree | 556d8bf7bd80845fb2d7602a230626b541172845 | |
parent | be3535b27ca24384d6598c98730b6449b428812e (diff) | |
download | aur-c0842918f0392004b2a38a0b00bf1ebbb67265e6.tar.gz |
fresh pandoc patch, remove hard depends on pandoc
-rw-r--r-- | .SRCINFO | 10 | ||||
-rw-r--r-- | 0001-Do-not-download-pandoc.patch | 27 | ||||
-rw-r--r-- | PKGBUILD | 22 |
3 files changed, 33 insertions, 26 deletions
@@ -1,7 +1,7 @@ pkgbase = zettlr pkgdesc = A markdown editor for writing academic texts and taking notes pkgver = 2.0.1 - pkgrel = 2 + pkgrel = 3 url = https://www.zettlr.com arch = x86_64 license = GPL @@ -9,17 +9,17 @@ pkgbase = zettlr makedepends = git makedepends = yarn depends = electron - depends = pandoc + depends = nodejs>=14.0.0 optdepends = pandoc: For exporting to various format optdepends = texlive-bin: For Latex support optdepends = ttf-lato: Display output in a more comfortable way options = !strip source = zettlr-2.0.1.tar.gz::https://github.com/Zettlr/Zettlr/archive/v2.0.1.tar.gz source = 0001-Do-not-download-pandoc.patch - source = locales-2.0.1-2.zip::https://github.com/citation-style-language/locales/archive/0cc3885f6100e26ac6c6d103efa6f3d7195fd21b.zip - source = chicago-author-date-2.0.1-2.csl::https://github.com/citation-style-language/styles/raw/3a6a0a7bc1410075c606e51cab45877cc76f1f69/chicago-author-date.csl + source = locales-2.0.1-3.zip::https://github.com/citation-style-language/locales/archive/0cc3885f6100e26ac6c6d103efa6f3d7195fd21b.zip + source = chicago-author-date-2.0.1-3.csl::https://github.com/citation-style-language/styles/raw/3a6a0a7bc1410075c606e51cab45877cc76f1f69/chicago-author-date.csl sha256sums = 281747d7f123164f94f5878fb98ae48616a902e5be2cfdea2bfe3d859253463d - sha256sums = 97d1e620226324a1b7e5571ca800286a62f17e3729b08383918be81b64530287 + sha256sums = a0fe981dade0ce52be190d8e8a2fd7f6c05c32c7d44d96c63f6f494460d483ef sha256sums = 9b3e987aefb10da8b2baadd06e751e978ea23dc7b6297802cbda0ec6806744e2 sha256sums = 1455e57b314fd13ba155f4ab93f061e3e6393c13cd0f16380adb9d73614f7930 diff --git a/0001-Do-not-download-pandoc.patch b/0001-Do-not-download-pandoc.patch index 960d70131914..471d14b34396 100644 --- a/0001-Do-not-download-pandoc.patch +++ b/0001-Do-not-download-pandoc.patch @@ -1,29 +1,34 @@ -From f4eba18c684a952f916816b7a005744a4fb1418f Mon Sep 17 00:00:00 2001 +From 134b69946ba94932aed157a724202fab10eeb585 Mon Sep 17 00:00:00 2001 From: BrLi <brli@chakralinux.org> -Date: Mon, 26 Apr 2021 14:38:31 +0800 -Subject: [PATCH 2/2] Do-not-download-pandoc +Date: Tue, 26 Oct 2021 17:01:05 +0800 +Subject: [PATCH] Do not download pandoc +- The downloading of extra binary from internet during building is not desired +- To ease possible error, we deal the file installation and faking from + PKGBUILD instead of upstream build system. --- - forge.config.js | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) + forge.config.js | 7 ++----- + 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/forge.config.js b/forge.config.js -index 4cfe7b2a..8010d8e6 100644 +index 232aca3d..a57a5826 100644 --- a/forge.config.js +++ b/forge.config.js -@@ -102,10 +102,10 @@ module.exports = { +@@ -82,12 +82,9 @@ module.exports = { try { await fs.lstat(path.join(__dirname, `./resources/pandoc-${platform}-${arch}`)) } catch (err) { - await downloadPandoc(platform, arch) + console.log('\nSkip pandoc executable download on Arch') } - +- - await fs.copyFile(path.join(__dirname, `./resources/pandoc-${platform}-${arch}`), path.join(__dirname, './resources/pandoc')) +- +- forgeConfig.packagerConfig.extraResource.push(path.join(__dirname, './resources/pandoc')) + console.log('\nDo not copy pandoc executable, is taking cared of via PKGBUILD') - - forgeConfig.packagerConfig.extraResource.push('./resources/pandoc') } else { + // If someone is building this on an unsupported platform, drop a warning. + console.log(`\nBuilding for an unsupported platform/arch-combination ${targetPlatform}/${targetArch} - not bundling Pandoc.`) -- -2.31.1 +2.33.1 @@ -1,18 +1,18 @@ # Maintainer: BrLi <brli at chakralinux dot org> # Maintainer: Caleb Maclennan <caleb@alerque.com> -# Decide whether to install pandoc binary +# Decide whether to include pandoc binary into zettlr package # Default to false, the application will use Arch's pandoc _bundle_pandoc=false pkgname=zettlr pkgver=2.0.1 -pkgrel=2 +pkgrel=3 pkgdesc="A markdown editor for writing academic texts and taking notes" arch=('x86_64') url='https://www.zettlr.com' license=('GPL' 'custom') # Noted that the icon and name are copyrighted -depends=(electron) +depends=(electron 'nodejs>=14.0.0') makedepends=(git yarn) optdepends=('pandoc: For exporting to various format' 'texlive-bin: For Latex support' @@ -27,15 +27,13 @@ source=("${pkgname}-${pkgver}.tar.gz::https://github.com/Zettlr/Zettlr/archive/v "locales-${pkgver}-${pkgrel}.zip::https://github.com/citation-style-language/locales/archive/${_csl_locale_commit}.zip" "chicago-author-date-${pkgver}-${pkgrel}.csl::https://github.com/citation-style-language/styles/raw/${_csl_style_commit}/chicago-author-date.csl") sha256sums=('281747d7f123164f94f5878fb98ae48616a902e5be2cfdea2bfe3d859253463d' - '97d1e620226324a1b7e5571ca800286a62f17e3729b08383918be81b64530287' + 'a0fe981dade0ce52be190d8e8a2fd7f6c05c32c7d44d96c63f6f494460d483ef' '9b3e987aefb10da8b2baadd06e751e978ea23dc7b6297802cbda0ec6806744e2' '1455e57b314fd13ba155f4ab93f061e3e6393c13cd0f16380adb9d73614f7930') if ${_bundle_pandoc} ; then - # pandoc binary + # pandoc binary source source+=("https://github.com/jgm/pandoc/releases/download/${_pandoc_binary_ver}/pandoc-${_pandoc_binary_ver}-linux-amd64.tar.gz") sha256sums+=('1a0548b15255b1c11722f3d4e12fc7a652edf8c9a329a8458f1e765517aec1be') -else - depends+=(pandoc) fi prepare() { @@ -51,9 +49,11 @@ prepare() { if ${_bundle_pandoc} ; then # Put pandoc binary in place - cp "${srcdir}/pandoc-${_pandoc_binary_ver}/bin/pandoc" resources/pandoc + cp "${srcdir}/pandoc-${_pandoc_binary_ver}/bin/pandoc" resources/pandoc-linux-x64 + ln -sf pandoc-linux-x64 resources/pandoc else - # Fake pandoc + # Using Arch's pandoc, need to fake a link + ln -sf /usr/bin/pandoc resources/pandoc-linux-x64 ln -sf /usr/bin/pandoc resources/pandoc fi } @@ -74,12 +74,14 @@ build() { # Remove references to $srcdir find renderer -type f -name 'index.js.map' -exec sed -i "s,${srcdir}/Zettlr,/usr/lib/${pkgname},g" {} + - # Remove resources for other OSs + # Remove resources for other OSs and leftovers cd "${srcdir}/Zettlr-${pkgver}/resources" rm -rfv NSIS rm -rfv icons/dmg rm -rfv icons/*icns rm -rfv icons/*.ico + rm -rfv screenshots + rm -r .gitignore # Remove fonts cd "${srcdir}/Zettlr-${pkgver}/static" |