George Rawlinson pushed to branch main at Arch Linux / Packaging / Packages / 
difftastic


Commits:
f2a201ec by George Rawlinson at 2023-08-25T23:26:50+00:00
upgpkg: 0.51.1-3

* Fix version generation for documentation.

- - - - -


2 changed files:

- PKGBUILD
- + remove-makedepends-jq.patch


Changes:

=====================================
PKGBUILD
=====================================
@@ -6,15 +6,19 @@
 pkgname=difftastic
 pkgver=0.51.1
 _commit=8752af74d4fad7932b34076a1021dd654f1bee28
-pkgrel=2
+pkgrel=3
 pkgdesc='An experimental diff tool that compares files based on their syntax'
 arch=('x86_64')
 url='https://difftastic.wilfred.me.uk'
 license=('MIT')
 depends=('glibc' 'gcc-libs' 'shared-mime-info')
 makedepends=('cargo' 'git' 'mdbook')
-source=("git+https://github.com/Wilfred/difftastic.git#commit=$_commit";)
-b2sums=('SKIP')
+source=(
+  "git+https://github.com/Wilfred/difftastic.git#commit=$_commit";
+  'remove-makedepends-jq.patch'
+)
+b2sums=('SKIP'
+        
'467d5fc634b3f1d8fa7fe0c8de843e615b6bbfed340ad5d4167d6d5d374185bcb8d54f31f43995beb43966f8d49497956d4a30186ccb974b2cadc01357c9c2bc')
 
 pkgver() {
   cd "$pkgname"
@@ -27,6 +31,9 @@ prepare() {
 
   # download dependencies
   cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
+
+  # remove makedepends on jq
+  patch -p1 -i "$srcdir/remove-makedepends-jq.patch"
 }
 
 build() {
@@ -38,6 +45,7 @@ build() {
 
   # documentation
   cd manual
+  sed -i "s/DFT_VERSION_HERE/$pkgver/g" -i src/introduction.md
   mdbook build
 }
 


=====================================
remove-makedepends-jq.patch
=====================================
@@ -0,0 +1,17 @@
+--- a/manual/book.toml
++++ b/manual/book.toml
+@@ -14,6 +14,3 @@ git-repository-url = "https://github.com/wilfred/difftastic";
+ 
+ [output.html.playground]
+ copyable = false
+-
+-[preprocessor.replace-version-placeholder]
+-command = "./replace_version_placeholder.sh"
+--- a/manual/replace_version_placeholder.sh
++++ /dev/null
+@@ -1,5 +0,0 @@
+-#!/bin/bash
+-
+-DFT_VERSION=$(cargo read-manifest | jq -r .version)
+-
+-jq .[1] | jq '.sections[0].Chapter.content |= sub("DFT_VERSION_HERE"; 
"'$DFT_VERSION'")'



View it on GitLab: 
https://gitlab.archlinux.org/archlinux/packaging/packages/difftastic/-/commit/f2a201ec8622515412bd680b2aa2a39b95d1de17

-- 
View it on GitLab: 
https://gitlab.archlinux.org/archlinux/packaging/packages/difftastic/-/commit/f2a201ec8622515412bd680b2aa2a39b95d1de17
You're receiving this email because of your account on gitlab.archlinux.org.


Reply via email to