diff options
author | Caleb Maclennan | 2021-01-07 17:03:06 +0300 |
---|---|---|
committer | Caleb Maclennan | 2021-01-07 17:18:40 +0300 |
commit | ad937c6090e31d04c8e5abd81a6db1b188a32eb7 (patch) | |
tree | ea9478b1758509e42827db16c8619f26057b5a8d /PKGBUILD | |
parent | 02d3d97774b28441e368d54d50992206772e2f7d (diff) | |
download | aur-ad937c6090e31d04c8e5abd81a6db1b188a32eb7.tar.gz |
Fix versioning of sources
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 57 |
1 files changed, 30 insertions, 27 deletions
@@ -2,7 +2,7 @@ pkgname=zettlr pkgver=1.8.4 -pkgrel=3 +pkgrel=4 pkgdesc="A markdown editor for writing academic texts and taking notes" arch=('x86_64') url='https://www.zettlr.com' @@ -13,15 +13,17 @@ optdepends=('pandoc: For exporting to various format' 'texlive-bin: For Latex support' 'ttf-lato: Display output in a more comfortable way') _csl_locale_commit=ecb8e70233e9a68e8b1dda4586061be8f8611a38 # Dec 11, 2020 +_csl_style_commit=a7899732910f5e69aae7799bf4e61505716c211b +_zh_tw_commit=60ef7ec4cb8ba0a6da924d89c60d6d39d1c8b729 # matches 1.8.4 options=(!strip) install=install -source=("${pkgname}-${pkgver}.tar.gz"::"https://github.com/Zettlr/Zettlr/archive/v${pkgver}.tar.gz" - pandoc-fix.patch +source=("$pkgname-$pkgver.tar.gz::https://github.com/Zettlr/Zettlr/archive/v$pkgver.tar.gz" + 'pandoc-fix.patch' # citation style - "https://github.com/citation-style-language/locales/archive/${_csl_locale_commit}.zip" - https://github.com/citation-style-language/styles/raw/master/chicago-author-date.csl + "locales-$pkgrel-$pkgver.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" # Chinese(Taiwan) translation - https://github.com/Brli/zetter-zh-TW/raw/master/zh-TW.json) + "zh-TW-$pkgver-$pkgrel.json::https://raw.githubusercontent.com/Brli/zettlr-zh-TW/$_zh_tw_commit/zh-TW.json") sha256sums=('da3ba36a98587e258bdb09700343b7a067ee4659aaef6b5021b16dd5b9d00400' '488f3c308e0cbdcc626d95798e07fa3489ea28a631e9fbdacb50e6fcf35c5d4c' '24503a6cd5b3651a7003353811ae82d3ed707ec8ff932d341668c2ad377434b6' @@ -29,36 +31,37 @@ sha256sums=('da3ba36a98587e258bdb09700343b7a067ee4659aaef6b5021b16dd5b9d00400' '9aef5eec4876aa180fa55cf3bc213a5cf68ab96567bc4021ba58a32fa0fa9f94') prepare() { - cd "${srcdir}/Zettlr-${pkgver}" + cd "Zettlr-$pkgver" # Manually add community translation - cp "${srcdir}/zh-TW.json" source/common/lang/ + cp "$srcdir/zh-TW-$pkgver-$pkgrel.json" source/common/lang/zh-TW.json # csl:refresh from package.json - cp $(find "${srcdir}/locales-${_csl_locale_commit}/" -name "*.xml") source/app/service-providers/assets/csl-locales/ - cp "${srcdir}/locales-${_csl_locale_commit}/locales.json" source/app/service-providers/assets/csl-locales/ - cp "${srcdir}/chicago-author-date.csl" source/app/service-providers/assets/csl-styles/ + find "$srcdir/locales-$_csl_locale_commit" -name "*.xml" \ + -exec cp {} source/app/service-providers/assets/csl-locales/ \; + cp "$srcdir/locales-$_csl_locale_commit/locales.json" source/app/service-providers/assets/csl-locales/ + cp "$srcdir/chicago-author-date-$pkgver-$pkgrel.csl" source/app/service-providers/assets/csl-styles/chicago-author-date.csl # fake Pandoc - patch -Np1 -i "${srcdir}/pandoc-fix.patch" + patch -Np1 -i "$srcdir/pandoc-fix.patch" ln -sf /dev/null resources/pandoc } build() { - cd "${srcdir}/Zettlr-${pkgver}" + cd "Zettlr-$pkgver" local NODE_ENV='' - yarn install --cache-folder "${srcdir}/cache" \ - --link-folder "${srcdir}/link" \ + yarn install --cache-folder "$srcdir/cache" \ + --link-folder "$srcdir/link" \ --ignore-scripts yarn reveal:build rm -rf node_modules/electron - yarn add -D electron@11.1.0 --cache-folder "${srcdir}/cache" --link-folder "${srcdir}/link" + yarn add -D electron@11.1.0 --cache-folder "$srcdir/cache" --link-folder "$srcdir/link" node node_modules/.bin/electron-forge package # Remove fonts - cd "${srcdir}/Zettlr-${pkgver}/.webpack" + cd "$srcdir/Zettlr-$pkgver/.webpack" find . -type d -name "fonts" -exec rm -rf {} + } @@ -77,29 +80,29 @@ build() { # } package() { - local _destdir=usr/lib/"${pkgname}" - install -dm755 "${pkgdir}/${_destdir}" + local _destdir=usr/lib/"$pkgname" + install -dm755 "$pkgdir/$_destdir" - cd "${srcdir}/Zettlr-${pkgver}" + cd "$srcdir/Zettlr-$pkgver" # Copy the generated electron project - cp -r --no-preserve=ownership --preserve=mode ./.webpack "${pkgdir}/${_destdir}/" - cp -r --no-preserve=ownership --preserve=mode ./package.json "${pkgdir}/${_destdir}/" + cp -r --no-preserve=ownership --preserve=mode ./.webpack "$pkgdir/$_destdir/" + cp -r --no-preserve=ownership --preserve=mode ./package.json "$pkgdir/$_destdir/" # Install start script to /usr/bin - install -Dm755 /dev/stdin "${pkgdir}/usr/bin/${pkgname}" <<END + install -Dm755 /dev/stdin "$pkgdir/usr/bin/$pkgname" <<END #!/bin/sh exec electron /${_destdir} "\$@" END # install icons of various sizes to hi-color theme for px in 16 24 32 48 64 96 128 256 512; do - install -Dm644 "${srcdir}/Zettlr-${pkgver}/resources/icons/png/${px}x${px}.png" \ - "${pkgdir}/usr/share/icons/hicolor/${px}x${px}/apps/${pkgname}.png" + install -Dm644 "$srcdir/Zettlr-$pkgver/resources/icons/png/${px}x$px.png" \ + "$pkgdir/usr/share/icons/hicolor/${px}x$px/apps/$pkgname.png" done # generate freedesktop entry files, aligned with description in package.json and forge.config.js - install -Dm644 /dev/stdin "${pkgdir}/usr/share/applications/${pkgname}.desktop" <<END + install -Dm644 /dev/stdin "$pkgdir/usr/share/applications/$pkgname.desktop" <<END [Desktop Entry] Name=Zettlr Comment=A powerful Markdown Editor with integrated tree view @@ -113,5 +116,5 @@ Categories=Office; END # license - install -Dm644 "${srcdir}/Zettlr-${pkgver}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" + install -Dm644 "$srcdir/Zettlr-$pkgver/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE" } |