Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] intermodal: update to 0.1.12.
@ 2022-01-16 12:39 jcgruenhage
  2022-01-17 12:58 ` [PR PATCH] [Updated] " jcgruenhage
                   ` (18 more replies)
  0 siblings, 19 replies; 20+ messages in thread
From: jcgruenhage @ 2022-01-16 12:39 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1740 bytes --]

There is a new pull request by jcgruenhage against master on the void-packages repository

https://github.com/jcgruenhage/void-packages intermodal-0.1.12_1
https://github.com/void-linux/void-packages/pull/35082

intermodal: update to 0.1.12.
#### Testing the changes
- I tested the changes in this PR: **YES**

#### tl;dr: computers are hard
So, the `imdl` package was a bit barebones so far, but I'm not quite sure what the correct way to fix this is. Intermodal does have really nice tooling for automatically generating additional artifacts (completions, man pages, other docs, etc) and does try to make packaging `imdl` easy, but sadly, this additional tooling is not really built with cross compilation in mind (afaict), and it requires access to the git history of the repository (for changelog generation). It would be possible to work around these limitations here, but it probably makes sense to instead think about how to improve this, approach upstream about it (they say "First off, thank you very much! If I can do anything to make packaging Intermodal easier, please don't hesistate to open an issue." in the repo upstream and provide a lot of useful info in the readme already), improve the situation upstream and then use the improved tooling in a package here.

I have still extended the package a tiny bit to ship shell completions, because this is the part that bugged me the most, and doing so was fairly straight forward using our vtargetrun helper. I've cargo-culted those bits from our rustup package, I hope this is the right way to go?

cc @casey (upstream) and @ThatNerdyPikachu (void contributor for this package)

A patch file from https://github.com/void-linux/void-packages/pull/35082.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-intermodal-0.1.12_1-35082.patch --]
[-- Type: text/x-diff, Size: 1385 bytes --]

From ff23327082901719324035bd78232bce430ab428 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20Christian=20Gr=C3=BCnhage?=
 <jan.christian@gruenhage.xyz>
Date: Sun, 16 Jan 2022 13:12:25 +0100
Subject: [PATCH] intermodal: update to 0.1.12.

---
 srcpkgs/intermodal/template | 20 ++++++++++++++++++--
 1 file changed, 18 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/intermodal/template b/srcpkgs/intermodal/template
index bb0e6148ad02..dd5366db135b 100644
--- a/srcpkgs/intermodal/template
+++ b/srcpkgs/intermodal/template
@@ -1,11 +1,27 @@
 # Template file for 'intermodal'
 pkgname=intermodal
-version=0.1.10
+version=0.1.12
 revision=1
 build_style=cargo
+build_helper=qemu
 short_desc="User-friendly and featureful command-line BitTorrent metainfo utility"
 maintainer="Pika <pika@lasagna.dev>"
 license="CC0-1.0"
 homepage="https://github.com/casey/intermodal"
 distfiles="https://github.com/casey/intermodal/archive/v${version}.tar.gz"
-checksum=8bb3e4f549e5c4446543babd741fec0cd7c42da4d49eca3e98c5f7611ad59618
+checksum=cd62894e519dc5aa0284a5f48aab86e1a45c3bc96b8a5481741adb6960d4751a
+
+post_build() {
+	IMDL="target/${RUST_TARGET}/release/imdl"
+	ln -sf "${IMDL}" imdl
+
+	for shell in zsh bash fish; do
+		vtargetrun ./imdl completions ${shell} >imdl.${shell}
+	done
+}
+
+post_install() {
+	for shell in zsh bash fish; do
+		vcompletion imdl.${shell} ${shell}
+	done
+}

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PR PATCH] [Updated] intermodal: update to 0.1.12.
  2022-01-16 12:39 [PR PATCH] intermodal: update to 0.1.12 jcgruenhage
@ 2022-01-17 12:58 ` jcgruenhage
  2022-01-18 13:20 ` [PR REVIEW] " ahesford
                   ` (17 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: jcgruenhage @ 2022-01-17 12:58 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1745 bytes --]

There is an updated pull request by jcgruenhage against master on the void-packages repository

https://github.com/jcgruenhage/void-packages intermodal-0.1.12_1
https://github.com/void-linux/void-packages/pull/35082

intermodal: update to 0.1.12.
#### Testing the changes
- I tested the changes in this PR: **YES**

#### tl;dr: computers are hard
So, the `imdl` package was a bit barebones so far, but I'm not quite sure what the correct way to fix this is. Intermodal does have really nice tooling for automatically generating additional artifacts (completions, man pages, other docs, etc) and does try to make packaging `imdl` easy, but sadly, this additional tooling is not really built with cross compilation in mind (afaict), and it requires access to the git history of the repository (for changelog generation). It would be possible to work around these limitations here, but it probably makes sense to instead think about how to improve this, approach upstream about it (they say "First off, thank you very much! If I can do anything to make packaging Intermodal easier, please don't hesistate to open an issue." in the repo upstream and provide a lot of useful info in the readme already), improve the situation upstream and then use the improved tooling in a package here.

I have still extended the package a tiny bit to ship shell completions, because this is the part that bugged me the most, and doing so was fairly straight forward using our vtargetrun helper. I've cargo-culted those bits from our rustup package, I hope this is the right way to go?

cc @casey (upstream) and @ThatNerdyPikachu (void contributor for this package)

A patch file from https://github.com/void-linux/void-packages/pull/35082.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-intermodal-0.1.12_1-35082.patch --]
[-- Type: text/x-diff, Size: 1523 bytes --]

From bad72590904ccc14f7ff4dc71cc44a79b1489465 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20Christian=20Gr=C3=BCnhage?=
 <jan.christian@gruenhage.xyz>
Date: Sun, 16 Jan 2022 13:12:25 +0100
Subject: [PATCH] intermodal: update to 0.1.12.

---
 srcpkgs/intermodal/template | 21 +++++++++++++++++++--
 1 file changed, 19 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/intermodal/template b/srcpkgs/intermodal/template
index bb0e6148ad02..6ef5e4796a77 100644
--- a/srcpkgs/intermodal/template
+++ b/srcpkgs/intermodal/template
@@ -1,11 +1,28 @@
 # Template file for 'intermodal'
 pkgname=intermodal
-version=0.1.10
+version=0.1.12
 revision=1
 build_style=cargo
+build_helper=qemu
+make_check_args="-- --skip subcommand::torrent::verify::tests::output_multiple --skip subcommand::torrent::verify::tests::output_color"
 short_desc="User-friendly and featureful command-line BitTorrent metainfo utility"
 maintainer="Pika <pika@lasagna.dev>"
 license="CC0-1.0"
 homepage="https://github.com/casey/intermodal"
 distfiles="https://github.com/casey/intermodal/archive/v${version}.tar.gz"
-checksum=8bb3e4f549e5c4446543babd741fec0cd7c42da4d49eca3e98c5f7611ad59618
+checksum=cd62894e519dc5aa0284a5f48aab86e1a45c3bc96b8a5481741adb6960d4751a
+
+post_build() {
+	IMDL="target/${RUST_TARGET}/release/imdl"
+	ln -sf "${IMDL}" imdl
+
+	for shell in zsh bash fish; do
+		vtargetrun ./imdl completions ${shell} >imdl.${shell}
+	done
+}
+
+post_install() {
+	for shell in zsh bash fish; do
+		vcompletion imdl.${shell} ${shell}
+	done
+}

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PR REVIEW] intermodal: update to 0.1.12.
  2022-01-16 12:39 [PR PATCH] intermodal: update to 0.1.12 jcgruenhage
  2022-01-17 12:58 ` [PR PATCH] [Updated] " jcgruenhage
@ 2022-01-18 13:20 ` ahesford
  2022-01-18 13:21 ` ahesford
                   ` (16 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: ahesford @ 2022-01-18 13:20 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 174 bytes --]

New review comment by ahesford on void-packages repository

https://github.com/void-linux/void-packages/pull/35082#discussion_r786751977

Comment:
The link is superfluous...

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PR REVIEW] intermodal: update to 0.1.12.
  2022-01-16 12:39 [PR PATCH] intermodal: update to 0.1.12 jcgruenhage
  2022-01-17 12:58 ` [PR PATCH] [Updated] " jcgruenhage
  2022-01-18 13:20 ` [PR REVIEW] " ahesford
@ 2022-01-18 13:21 ` ahesford
  2022-01-18 13:31 ` jcgruenhage
                   ` (15 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: ahesford @ 2022-01-18 13:21 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 194 bytes --]

New review comment by ahesford on void-packages repository

https://github.com/void-linux/void-packages/pull/35082#discussion_r786752227

Comment:
...because you can just run"$IMDL" right here.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PR REVIEW] intermodal: update to 0.1.12.
  2022-01-16 12:39 [PR PATCH] intermodal: update to 0.1.12 jcgruenhage
                   ` (2 preceding siblings ...)
  2022-01-18 13:21 ` ahesford
@ 2022-01-18 13:31 ` jcgruenhage
  2022-01-18 13:31 ` ahesford
                   ` (14 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: jcgruenhage @ 2022-01-18 13:31 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 262 bytes --]

New review comment by jcgruenhage on void-packages repository

https://github.com/void-linux/void-packages/pull/35082#discussion_r786760759

Comment:
cargo-culted from our rustup template, but yeah, seems a bit redundant to have both the variable *and* the link

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: intermodal: update to 0.1.12.
  2022-01-16 12:39 [PR PATCH] intermodal: update to 0.1.12 jcgruenhage
                   ` (3 preceding siblings ...)
  2022-01-18 13:31 ` jcgruenhage
@ 2022-01-18 13:31 ` ahesford
  2022-01-18 13:33 ` [PR PATCH] [Updated] " jcgruenhage
                   ` (13 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: ahesford @ 2022-01-18 13:31 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1293 bytes --]

New comment by ahesford on void-packages repository

https://github.com/void-linux/void-packages/pull/35082#issuecomment-1015415324

Comment:
Cloning the git repo is generally undesirable with xbps-src. The best fix from our perspective would be for upstream to include pre-generated docs in the release tarballs. This requires a bit of release engineering but shouldn't be too terrible and can be scripted for future releases.

In general, I think maintaining a separate changelog is good practice for several reasons:

1. It doesn't require repository history to review.
2. It provides an opportunity to add context to some more sophisticated changes.
3. Not all Git commits are worth inclusion in history. Changelogs should provide a good summary of substantive changes, not every minor tweak. (Does it really matter to others that you fixed a typo in one commit that you introduced in the preceding commit?)


For packages that require doc generation, we have sometimes used a hostmakedepends trick to get those docs in cross-compiled packages. For native packages, the docs are built as expected; for cross builds, the package itself is added to hostmakedepends. The docs can then be copied from the native package on the host to the $DESTDIR. Yes, this is a hack, but it works.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PR PATCH] [Updated] intermodal: update to 0.1.12.
  2022-01-16 12:39 [PR PATCH] intermodal: update to 0.1.12 jcgruenhage
                   ` (4 preceding siblings ...)
  2022-01-18 13:31 ` ahesford
@ 2022-01-18 13:33 ` jcgruenhage
  2022-01-18 13:42 ` jcgruenhage
                   ` (12 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: jcgruenhage @ 2022-01-18 13:33 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1745 bytes --]

There is an updated pull request by jcgruenhage against master on the void-packages repository

https://github.com/jcgruenhage/void-packages intermodal-0.1.12_1
https://github.com/void-linux/void-packages/pull/35082

intermodal: update to 0.1.12.
#### Testing the changes
- I tested the changes in this PR: **YES**

#### tl;dr: computers are hard
So, the `imdl` package was a bit barebones so far, but I'm not quite sure what the correct way to fix this is. Intermodal does have really nice tooling for automatically generating additional artifacts (completions, man pages, other docs, etc) and does try to make packaging `imdl` easy, but sadly, this additional tooling is not really built with cross compilation in mind (afaict), and it requires access to the git history of the repository (for changelog generation). It would be possible to work around these limitations here, but it probably makes sense to instead think about how to improve this, approach upstream about it (they say "First off, thank you very much! If I can do anything to make packaging Intermodal easier, please don't hesistate to open an issue." in the repo upstream and provide a lot of useful info in the readme already), improve the situation upstream and then use the improved tooling in a package here.

I have still extended the package a tiny bit to ship shell completions, because this is the part that bugged me the most, and doing so was fairly straight forward using our vtargetrun helper. I've cargo-culted those bits from our rustup package, I hope this is the right way to go?

cc @casey (upstream) and @ThatNerdyPikachu (void contributor for this package)

A patch file from https://github.com/void-linux/void-packages/pull/35082.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-intermodal-0.1.12_1-35082.patch --]
[-- Type: text/x-diff, Size: 1497 bytes --]

From ca99c1cb27a418746c2b19927eba3456481c874a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20Christian=20Gr=C3=BCnhage?=
 <jan.christian@gruenhage.xyz>
Date: Sun, 16 Jan 2022 13:12:25 +0100
Subject: [PATCH] intermodal: update to 0.1.12.

---
 srcpkgs/intermodal/template | 20 ++++++++++++++++++--
 1 file changed, 18 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/intermodal/template b/srcpkgs/intermodal/template
index bb0e6148ad02..f4180bd33998 100644
--- a/srcpkgs/intermodal/template
+++ b/srcpkgs/intermodal/template
@@ -1,11 +1,27 @@
 # Template file for 'intermodal'
 pkgname=intermodal
-version=0.1.10
+version=0.1.12
 revision=1
 build_style=cargo
+build_helper=qemu
+make_check_args="-- --skip subcommand::torrent::verify::tests::output_multiple --skip subcommand::torrent::verify::tests::output_color"
 short_desc="User-friendly and featureful command-line BitTorrent metainfo utility"
 maintainer="Pika <pika@lasagna.dev>"
 license="CC0-1.0"
 homepage="https://github.com/casey/intermodal"
 distfiles="https://github.com/casey/intermodal/archive/v${version}.tar.gz"
-checksum=8bb3e4f549e5c4446543babd741fec0cd7c42da4d49eca3e98c5f7611ad59618
+checksum=cd62894e519dc5aa0284a5f48aab86e1a45c3bc96b8a5481741adb6960d4751a
+
+post_build() {
+	IMDL="target/${RUST_TARGET}/release/imdl"
+
+	for shell in zsh bash fish; do
+		vtargetrun $IMDL completions ${shell} >imdl.${shell}
+	done
+}
+
+post_install() {
+	for shell in zsh bash fish; do
+		vcompletion imdl.${shell} ${shell}
+	done
+}

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: intermodal: update to 0.1.12.
  2022-01-16 12:39 [PR PATCH] intermodal: update to 0.1.12 jcgruenhage
                   ` (5 preceding siblings ...)
  2022-01-18 13:33 ` [PR PATCH] [Updated] " jcgruenhage
@ 2022-01-18 13:42 ` jcgruenhage
  2022-01-18 13:52 ` Johnnynator
                   ` (11 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: jcgruenhage @ 2022-01-18 13:42 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 705 bytes --]

New comment by jcgruenhage on void-packages repository

https://github.com/void-linux/void-packages/pull/35082#issuecomment-1015423834

Comment:
> For packages that require doc generation, we have sometimes used a hostmakedepends trick to get those docs in cross-compiled packages. For native packages, the docs are built as expected; for cross builds, the package itself is added to hostmakedepends. The docs can then be copied from the native package on the host to the $DESTDIR. Yes, this is a hack, but it works.

Are you able to link a package that does work like this? Just so that I can do some more cargo-culting, to get everything except the changelog generated using the upstream tooling.



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: intermodal: update to 0.1.12.
  2022-01-16 12:39 [PR PATCH] intermodal: update to 0.1.12 jcgruenhage
                   ` (6 preceding siblings ...)
  2022-01-18 13:42 ` jcgruenhage
@ 2022-01-18 13:52 ` Johnnynator
  2022-01-18 13:53 ` Johnnynator
                   ` (10 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: Johnnynator @ 2022-01-18 13:52 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 527 bytes --]

New comment by Johnnynator on void-packages repository

https://github.com/void-linux/void-packages/pull/35082#issuecomment-1015431742

Comment:
I don't know what might be a good example. What ahesford is suggesting is essentially to build the docs on your machine. cp it to `srcpkgs/intermodal/files/smth` and just do `vdoc "${FILESDIR}/smt"` in the template.
Ofcourse replace `smth` with whatever file(s) you have.

The downside of this, is that the generated docs have to be manually updated if the package gets updated.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: intermodal: update to 0.1.12.
  2022-01-16 12:39 [PR PATCH] intermodal: update to 0.1.12 jcgruenhage
                   ` (7 preceding siblings ...)
  2022-01-18 13:52 ` Johnnynator
@ 2022-01-18 13:53 ` Johnnynator
  2022-01-18 14:42 ` ahesford
                   ` (9 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: Johnnynator @ 2022-01-18 13:53 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 690 bytes --]

New comment by Johnnynator on void-packages repository

https://github.com/void-linux/void-packages/pull/35082#issuecomment-1015431742

Comment:
I don't know what might be a good example. 
You can build then docs on your machine. cp them to `srcpkgs/intermodal/files/smth` and just do `vdoc "${FILESDIR}/smt"` in the template.
Ofcourse replace `smth` with whatever file(s) you have.

The downside of this, is that the generated docs have to be manually updated if the package gets updated.

Alternative would be to do `hostmakedepends=intermodal` and add `vdoc /usr/share/intermodal/docs` which is imo ugly and results in the cross builders building the native package ever so often.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: intermodal: update to 0.1.12.
  2022-01-16 12:39 [PR PATCH] intermodal: update to 0.1.12 jcgruenhage
                   ` (8 preceding siblings ...)
  2022-01-18 13:53 ` Johnnynator
@ 2022-01-18 14:42 ` ahesford
  2022-01-18 14:49 ` jcgruenhage
                   ` (8 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: ahesford @ 2022-01-18 14:42 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 594 bytes --]

New comment by ahesford on void-packages repository

https://github.com/void-linux/void-packages/pull/35082#issuecomment-1015479061

Comment:
I think @ericonr did this for documentation in some package that I can't remember. A few other templates do this because the  build process requires native executables to generate other build products. `protobuf`, `gnubg` and `postfix` all pull in the native package with
```sh
if [ "$CROSS_BUILD" ]; then
    hostmakedepends+=" ${pkgname}"
fi
```
which would be sufficient to give you native documentation that you could copy in `post_install`.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: intermodal: update to 0.1.12.
  2022-01-16 12:39 [PR PATCH] intermodal: update to 0.1.12 jcgruenhage
                   ` (9 preceding siblings ...)
  2022-01-18 14:42 ` ahesford
@ 2022-01-18 14:49 ` jcgruenhage
  2022-01-18 15:17 ` ahesford
                   ` (7 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: jcgruenhage @ 2022-01-18 14:49 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 835 bytes --]

New comment by jcgruenhage on void-packages repository

https://github.com/void-linux/void-packages/pull/35082#issuecomment-1015486050

Comment:
I don't know which of the two alternatives I find worse tbh. Wasting time on building the native package a dozen times is shit, but having to manually rebuild docs is terrible as well. Having them distributed by upstream isn't much better either IMO, as they somewhat are compilation artifacts, and we should be able to build them ourselves...

As it's "just" compute time that I'd be wasting with the `hostmakedepends` variant and not human time, I'd go with that route for now (or rather, will do when I have time, busy with other stuff for now.

Afaict, that gives us everything except a changelog, so that'd be the highest priority to fix upstream IMO. Other opinions on this here?

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: intermodal: update to 0.1.12.
  2022-01-16 12:39 [PR PATCH] intermodal: update to 0.1.12 jcgruenhage
                   ` (10 preceding siblings ...)
  2022-01-18 14:49 ` jcgruenhage
@ 2022-01-18 15:17 ` ahesford
  2022-01-25 10:28 ` [PR PATCH] [Updated] " jcgruenhage
                   ` (6 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: ahesford @ 2022-01-18 15:17 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 571 bytes --]

New comment by ahesford on void-packages repository

https://github.com/void-linux/void-packages/pull/35082#issuecomment-1015513909

Comment:
The only "waste" here is because our build infrastructure doesn't properly handle dependency resolution. Eventually™ this problem will go away and I don't think we should be too aggressive in codifying the current limitations of the build infrastructure into templates. I recommend the `hostmakedepends` trick because I think it's less of a hassle than maintaining our own copies of files that will ultimately become outdated.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PR PATCH] [Updated] intermodal: update to 0.1.12.
  2022-01-16 12:39 [PR PATCH] intermodal: update to 0.1.12 jcgruenhage
                   ` (11 preceding siblings ...)
  2022-01-18 15:17 ` ahesford
@ 2022-01-25 10:28 ` jcgruenhage
  2022-01-25 10:30 ` jcgruenhage
                   ` (5 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: jcgruenhage @ 2022-01-25 10:28 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1745 bytes --]

There is an updated pull request by jcgruenhage against master on the void-packages repository

https://github.com/jcgruenhage/void-packages intermodal-0.1.12_1
https://github.com/void-linux/void-packages/pull/35082

intermodal: update to 0.1.12.
#### Testing the changes
- I tested the changes in this PR: **YES**

#### tl;dr: computers are hard
So, the `imdl` package was a bit barebones so far, but I'm not quite sure what the correct way to fix this is. Intermodal does have really nice tooling for automatically generating additional artifacts (completions, man pages, other docs, etc) and does try to make packaging `imdl` easy, but sadly, this additional tooling is not really built with cross compilation in mind (afaict), and it requires access to the git history of the repository (for changelog generation). It would be possible to work around these limitations here, but it probably makes sense to instead think about how to improve this, approach upstream about it (they say "First off, thank you very much! If I can do anything to make packaging Intermodal easier, please don't hesistate to open an issue." in the repo upstream and provide a lot of useful info in the readme already), improve the situation upstream and then use the improved tooling in a package here.

I have still extended the package a tiny bit to ship shell completions, because this is the part that bugged me the most, and doing so was fairly straight forward using our vtargetrun helper. I've cargo-culted those bits from our rustup package, I hope this is the right way to go?

cc @casey (upstream) and @ThatNerdyPikachu (void contributor for this package)

A patch file from https://github.com/void-linux/void-packages/pull/35082.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-intermodal-0.1.12_1-35082.patch --]
[-- Type: text/x-diff, Size: 2184 bytes --]

From 9c4d33d748569ff41687741b1e9162a6a0d4babd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20Christian=20Gr=C3=BCnhage?=
 <jan.christian@gruenhage.xyz>
Date: Sun, 16 Jan 2022 13:12:25 +0100
Subject: [PATCH] intermodal: update to 0.1.12.

---
 srcpkgs/intermodal/template | 44 +++++++++++++++++++++++++++++++++++--
 1 file changed, 42 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/intermodal/template b/srcpkgs/intermodal/template
index bb0e6148ad02..2f44fd8c9d4f 100644
--- a/srcpkgs/intermodal/template
+++ b/srcpkgs/intermodal/template
@@ -1,11 +1,51 @@
 # Template file for 'intermodal'
 pkgname=intermodal
-version=0.1.10
+version=0.1.12
 revision=1
 build_style=cargo
+make_check_args="-- --skip subcommand::torrent::verify::tests::output_multiple --skip subcommand::torrent::verify::tests::output_color"
 short_desc="User-friendly and featureful command-line BitTorrent metainfo utility"
 maintainer="Pika <pika@lasagna.dev>"
 license="CC0-1.0"
 homepage="https://github.com/casey/intermodal"
 distfiles="https://github.com/casey/intermodal/archive/v${version}.tar.gz"
-checksum=8bb3e4f549e5c4446543babd741fec0cd7c42da4d49eca3e98c5f7611ad59618
+checksum=cd62894e519dc5aa0284a5f48aab86e1a45c3bc96b8a5481741adb6960d4751a
+
+if [ "$CROSS_BUILD" ]; then
+	hostmakedepends+=" ${pkgname}"
+else
+	hostmakedepends+=" help2man"
+fi
+
+post_build() {
+	if [ -z "$CROSS_BUILD" ]; then
+		IMDL="target/${RUST_TARGET}/release/imdl"
+		for target in completion-scripts man readme; do
+			cargo run --package gen -- --bin $IMDL $target
+		done
+	fi
+}
+
+post_install() {
+	if [ -z "$CROSS_BUILD" ]; then
+		vdoc target/gen/README.md
+
+		vcompletion target/gen/completions/_imdl zsh
+		vcompletion target/gen/completions/imdl.bash bash
+		vcompletion target/gen/completions/imdl.fish fish
+
+		for page in target/gen/man/*; do
+			vman $page
+		done
+	else
+		vdoc /usr/share/doc/intermodal/README.md
+
+		vcompletion /usr/share/zsh/site-functions/_intermodal zsh
+		vcompletion /usr/share/bash-completion/completions/intermodal bash
+		vcompletion /usr/share/fish/vendor_completions.d/intermodal.fish fish
+
+		for page in /usr/share/man/man1/imdl*; do
+			vman $page
+		done
+	fi
+}

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PR PATCH] [Updated] intermodal: update to 0.1.12.
  2022-01-16 12:39 [PR PATCH] intermodal: update to 0.1.12 jcgruenhage
                   ` (12 preceding siblings ...)
  2022-01-25 10:28 ` [PR PATCH] [Updated] " jcgruenhage
@ 2022-01-25 10:30 ` jcgruenhage
  2022-01-25 10:56 ` jcgruenhage
                   ` (4 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: jcgruenhage @ 2022-01-25 10:30 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1745 bytes --]

There is an updated pull request by jcgruenhage against master on the void-packages repository

https://github.com/jcgruenhage/void-packages intermodal-0.1.12_1
https://github.com/void-linux/void-packages/pull/35082

intermodal: update to 0.1.12.
#### Testing the changes
- I tested the changes in this PR: **YES**

#### tl;dr: computers are hard
So, the `imdl` package was a bit barebones so far, but I'm not quite sure what the correct way to fix this is. Intermodal does have really nice tooling for automatically generating additional artifacts (completions, man pages, other docs, etc) and does try to make packaging `imdl` easy, but sadly, this additional tooling is not really built with cross compilation in mind (afaict), and it requires access to the git history of the repository (for changelog generation). It would be possible to work around these limitations here, but it probably makes sense to instead think about how to improve this, approach upstream about it (they say "First off, thank you very much! If I can do anything to make packaging Intermodal easier, please don't hesistate to open an issue." in the repo upstream and provide a lot of useful info in the readme already), improve the situation upstream and then use the improved tooling in a package here.

I have still extended the package a tiny bit to ship shell completions, because this is the part that bugged me the most, and doing so was fairly straight forward using our vtargetrun helper. I've cargo-culted those bits from our rustup package, I hope this is the right way to go?

cc @casey (upstream) and @ThatNerdyPikachu (void contributor for this package)

A patch file from https://github.com/void-linux/void-packages/pull/35082.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-intermodal-0.1.12_1-35082.patch --]
[-- Type: text/x-diff, Size: 2184 bytes --]

From a1afe7e7f30bc1e2faa30ab47583d9ba95885287 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20Christian=20Gr=C3=BCnhage?=
 <jan.christian@gruenhage.xyz>
Date: Sun, 16 Jan 2022 13:12:25 +0100
Subject: [PATCH] intermodal: update to 0.1.12.

---
 srcpkgs/intermodal/template | 44 +++++++++++++++++++++++++++++++++++--
 1 file changed, 42 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/intermodal/template b/srcpkgs/intermodal/template
index bb0e6148ad02..2f44fd8c9d4f 100644
--- a/srcpkgs/intermodal/template
+++ b/srcpkgs/intermodal/template
@@ -1,11 +1,51 @@
 # Template file for 'intermodal'
 pkgname=intermodal
-version=0.1.10
+version=0.1.12
 revision=1
 build_style=cargo
+make_check_args="-- --skip subcommand::torrent::verify::tests::output_multiple --skip subcommand::torrent::verify::tests::output_color"
 short_desc="User-friendly and featureful command-line BitTorrent metainfo utility"
 maintainer="Pika <pika@lasagna.dev>"
 license="CC0-1.0"
 homepage="https://github.com/casey/intermodal"
 distfiles="https://github.com/casey/intermodal/archive/v${version}.tar.gz"
-checksum=8bb3e4f549e5c4446543babd741fec0cd7c42da4d49eca3e98c5f7611ad59618
+checksum=cd62894e519dc5aa0284a5f48aab86e1a45c3bc96b8a5481741adb6960d4751a
+
+if [ "$CROSS_BUILD" ]; then
+	hostmakedepends+=" ${pkgname}"
+else
+	hostmakedepends+=" help2man"
+fi
+
+post_build() {
+	if [ -z "$CROSS_BUILD" ]; then
+		IMDL="target/${RUST_TARGET}/release/imdl"
+		for target in completion-scripts man readme; do
+			cargo run --package gen -- --bin $IMDL $target
+		done
+	fi
+}
+
+post_install() {
+	if [ -z "$CROSS_BUILD" ]; then
+		vdoc target/gen/README.md
+
+		vcompletion target/gen/completions/_imdl zsh
+		vcompletion target/gen/completions/imdl.bash bash
+		vcompletion target/gen/completions/imdl.fish fish
+
+		for page in target/gen/man/*; do
+			vman $page
+		done
+	else
+		vdoc /usr/share/doc/intermodal/README.md
+
+		vcompletion /usr/share/zsh/site-functions/_intermodal zsh
+		vcompletion /usr/share/bash-completion/completions/intermodal bash
+		vcompletion /usr/share/fish/vendor_completions.d/intermodal.fish fish
+
+		for page in /usr/share/man/man1/imdl*; do
+			vman $page
+		done
+	fi
+}

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PR PATCH] [Updated] intermodal: update to 0.1.12.
  2022-01-16 12:39 [PR PATCH] intermodal: update to 0.1.12 jcgruenhage
                   ` (13 preceding siblings ...)
  2022-01-25 10:30 ` jcgruenhage
@ 2022-01-25 10:56 ` jcgruenhage
  2022-01-25 11:03 ` jcgruenhage
                   ` (3 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: jcgruenhage @ 2022-01-25 10:56 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1745 bytes --]

There is an updated pull request by jcgruenhage against master on the void-packages repository

https://github.com/jcgruenhage/void-packages intermodal-0.1.12_1
https://github.com/void-linux/void-packages/pull/35082

intermodal: update to 0.1.12.
#### Testing the changes
- I tested the changes in this PR: **YES**

#### tl;dr: computers are hard
So, the `imdl` package was a bit barebones so far, but I'm not quite sure what the correct way to fix this is. Intermodal does have really nice tooling for automatically generating additional artifacts (completions, man pages, other docs, etc) and does try to make packaging `imdl` easy, but sadly, this additional tooling is not really built with cross compilation in mind (afaict), and it requires access to the git history of the repository (for changelog generation). It would be possible to work around these limitations here, but it probably makes sense to instead think about how to improve this, approach upstream about it (they say "First off, thank you very much! If I can do anything to make packaging Intermodal easier, please don't hesistate to open an issue." in the repo upstream and provide a lot of useful info in the readme already), improve the situation upstream and then use the improved tooling in a package here.

I have still extended the package a tiny bit to ship shell completions, because this is the part that bugged me the most, and doing so was fairly straight forward using our vtargetrun helper. I've cargo-culted those bits from our rustup package, I hope this is the right way to go?

cc @casey (upstream) and @ThatNerdyPikachu (void contributor for this package)

A patch file from https://github.com/void-linux/void-packages/pull/35082.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-intermodal-0.1.12_1-35082.patch --]
[-- Type: text/x-diff, Size: 2227 bytes --]

From ff1242b5a600b5d95641e07ccc0a6e65339a2504 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20Christian=20Gr=C3=BCnhage?=
 <jan.christian@gruenhage.xyz>
Date: Sun, 16 Jan 2022 13:12:25 +0100
Subject: [PATCH] intermodal: update to 0.1.12.

---
 srcpkgs/intermodal/template | 45 +++++++++++++++++++++++++++++++++++--
 1 file changed, 43 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/intermodal/template b/srcpkgs/intermodal/template
index bb0e6148ad02..e19f12b8ab52 100644
--- a/srcpkgs/intermodal/template
+++ b/srcpkgs/intermodal/template
@@ -1,11 +1,52 @@
 # Template file for 'intermodal'
 pkgname=intermodal
-version=0.1.10
+version=0.1.12
 revision=1
 build_style=cargo
+make_check_args="-- --skip subcommand::torrent::verify::tests::output_multiple --skip subcommand::torrent::verify::tests::output_color"
 short_desc="User-friendly and featureful command-line BitTorrent metainfo utility"
 maintainer="Pika <pika@lasagna.dev>"
 license="CC0-1.0"
 homepage="https://github.com/casey/intermodal"
 distfiles="https://github.com/casey/intermodal/archive/v${version}.tar.gz"
-checksum=8bb3e4f549e5c4446543babd741fec0cd7c42da4d49eca3e98c5f7611ad59618
+checksum=cd62894e519dc5aa0284a5f48aab86e1a45c3bc96b8a5481741adb6960d4751a
+
+if [ "$CROSS_BUILD" ]; then
+	hostmakedepends+=" ${pkgname}"
+else
+	hostmakedepends+=" help2man pkg-config"
+	makedepends+=" openssl-devel"
+fi
+
+post_build() {
+	if [ -z "$CROSS_BUILD" ]; then
+		IMDL="target/${RUST_TARGET}/release/imdl"
+		for target in completion-scripts man readme; do
+			cargo run --package gen -- --bin $IMDL $target
+		done
+	fi
+}
+
+post_install() {
+	if [ -z "$CROSS_BUILD" ]; then
+		vdoc target/gen/README.md
+
+		vcompletion target/gen/completions/_imdl zsh
+		vcompletion target/gen/completions/imdl.bash bash
+		vcompletion target/gen/completions/imdl.fish fish
+
+		for page in target/gen/man/*; do
+			vman $page
+		done
+	else
+		vdoc /usr/share/doc/intermodal/README.md
+
+		vcompletion /usr/share/zsh/site-functions/_intermodal zsh
+		vcompletion /usr/share/bash-completion/completions/intermodal bash
+		vcompletion /usr/share/fish/vendor_completions.d/intermodal.fish fish
+
+		for page in /usr/share/man/man1/imdl*; do
+			vman $page
+		done
+	fi
+}

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: intermodal: update to 0.1.12.
  2022-01-16 12:39 [PR PATCH] intermodal: update to 0.1.12 jcgruenhage
                   ` (14 preceding siblings ...)
  2022-01-25 10:56 ` jcgruenhage
@ 2022-01-25 11:03 ` jcgruenhage
  2022-01-25 11:31 ` [PR PATCH] [Updated] " jcgruenhage
                   ` (2 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: jcgruenhage @ 2022-01-25 11:03 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 719 bytes --]

New comment by jcgruenhage on void-packages repository

https://github.com/void-linux/void-packages/pull/35082#issuecomment-1021068515

Comment:
CI is still busy on this one, but I've locally done a cross build from scratch and the content of the resulting package looks good to me (diffed the content with the natively build package, just the binary and props.plist differ). The native build is tested, man pages and completions are there as expected and look good, am fairly happy with it now.

The only thing that I'm still kinda missing is a changelog now, but as discussed before, this is something we can't really fix downstream. Anything else we'd want to do here, or is this basically ready to be merged now?

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PR PATCH] [Updated] intermodal: update to 0.1.12.
  2022-01-16 12:39 [PR PATCH] intermodal: update to 0.1.12 jcgruenhage
                   ` (15 preceding siblings ...)
  2022-01-25 11:03 ` jcgruenhage
@ 2022-01-25 11:31 ` jcgruenhage
  2022-01-26 19:21 ` jcgruenhage
  2022-01-26 19:38 ` [PR PATCH] [Closed]: " ahesford
  18 siblings, 0 replies; 20+ messages in thread
From: jcgruenhage @ 2022-01-25 11:31 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1745 bytes --]

There is an updated pull request by jcgruenhage against master on the void-packages repository

https://github.com/jcgruenhage/void-packages intermodal-0.1.12_1
https://github.com/void-linux/void-packages/pull/35082

intermodal: update to 0.1.12.
#### Testing the changes
- I tested the changes in this PR: **YES**

#### tl;dr: computers are hard
So, the `imdl` package was a bit barebones so far, but I'm not quite sure what the correct way to fix this is. Intermodal does have really nice tooling for automatically generating additional artifacts (completions, man pages, other docs, etc) and does try to make packaging `imdl` easy, but sadly, this additional tooling is not really built with cross compilation in mind (afaict), and it requires access to the git history of the repository (for changelog generation). It would be possible to work around these limitations here, but it probably makes sense to instead think about how to improve this, approach upstream about it (they say "First off, thank you very much! If I can do anything to make packaging Intermodal easier, please don't hesistate to open an issue." in the repo upstream and provide a lot of useful info in the readme already), improve the situation upstream and then use the improved tooling in a package here.

I have still extended the package a tiny bit to ship shell completions, because this is the part that bugged me the most, and doing so was fairly straight forward using our vtargetrun helper. I've cargo-culted those bits from our rustup package, I hope this is the right way to go?

cc @casey (upstream) and @ThatNerdyPikachu (void contributor for this package)

A patch file from https://github.com/void-linux/void-packages/pull/35082.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-intermodal-0.1.12_1-35082.patch --]
[-- Type: text/x-diff, Size: 2221 bytes --]

From 8134f4b1202d5d29e27dfd578b4caae637749b81 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20Christian=20Gr=C3=BCnhage?=
 <jan.christian@gruenhage.xyz>
Date: Sun, 16 Jan 2022 13:12:25 +0100
Subject: [PATCH] intermodal: update to 0.1.12.

---
 srcpkgs/intermodal/template | 45 +++++++++++++++++++++++++++++++++++--
 1 file changed, 43 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/intermodal/template b/srcpkgs/intermodal/template
index bb0e6148ad02..6801b66dd68d 100644
--- a/srcpkgs/intermodal/template
+++ b/srcpkgs/intermodal/template
@@ -1,11 +1,52 @@
 # Template file for 'intermodal'
 pkgname=intermodal
-version=0.1.10
+version=0.1.12
 revision=1
 build_style=cargo
+make_check_args="-- --skip subcommand::torrent::verify::tests::output_multiple --skip subcommand::torrent::verify::tests::output_color"
 short_desc="User-friendly and featureful command-line BitTorrent metainfo utility"
 maintainer="Pika <pika@lasagna.dev>"
 license="CC0-1.0"
 homepage="https://github.com/casey/intermodal"
 distfiles="https://github.com/casey/intermodal/archive/v${version}.tar.gz"
-checksum=8bb3e4f549e5c4446543babd741fec0cd7c42da4d49eca3e98c5f7611ad59618
+checksum=cd62894e519dc5aa0284a5f48aab86e1a45c3bc96b8a5481741adb6960d4751a
+
+if [ "$CROSS_BUILD" ]; then
+	hostmakedepends="${pkgname}"
+else
+	hostmakedepends="help2man pkg-config"
+	makedepends="openssl-devel"
+fi
+
+post_build() {
+	if [ -z "$CROSS_BUILD" ]; then
+		IMDL="target/${RUST_TARGET}/release/imdl"
+		for target in completion-scripts man readme; do
+			cargo run --package gen -- --bin $IMDL $target
+		done
+	fi
+}
+
+post_install() {
+	if [ -z "$CROSS_BUILD" ]; then
+		vdoc target/gen/README.md
+
+		vcompletion target/gen/completions/_imdl zsh
+		vcompletion target/gen/completions/imdl.bash bash
+		vcompletion target/gen/completions/imdl.fish fish
+
+		for page in target/gen/man/*; do
+			vman $page
+		done
+	else
+		vdoc /usr/share/doc/intermodal/README.md
+
+		vcompletion /usr/share/zsh/site-functions/_intermodal zsh
+		vcompletion /usr/share/bash-completion/completions/intermodal bash
+		vcompletion /usr/share/fish/vendor_completions.d/intermodal.fish fish
+
+		for page in /usr/share/man/man1/imdl*; do
+			vman $page
+		done
+	fi
+}

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PR PATCH] [Updated] intermodal: update to 0.1.12.
  2022-01-16 12:39 [PR PATCH] intermodal: update to 0.1.12 jcgruenhage
                   ` (16 preceding siblings ...)
  2022-01-25 11:31 ` [PR PATCH] [Updated] " jcgruenhage
@ 2022-01-26 19:21 ` jcgruenhage
  2022-01-26 19:38 ` [PR PATCH] [Closed]: " ahesford
  18 siblings, 0 replies; 20+ messages in thread
From: jcgruenhage @ 2022-01-26 19:21 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1745 bytes --]

There is an updated pull request by jcgruenhage against master on the void-packages repository

https://github.com/jcgruenhage/void-packages intermodal-0.1.12_1
https://github.com/void-linux/void-packages/pull/35082

intermodal: update to 0.1.12.
#### Testing the changes
- I tested the changes in this PR: **YES**

#### tl;dr: computers are hard
So, the `imdl` package was a bit barebones so far, but I'm not quite sure what the correct way to fix this is. Intermodal does have really nice tooling for automatically generating additional artifacts (completions, man pages, other docs, etc) and does try to make packaging `imdl` easy, but sadly, this additional tooling is not really built with cross compilation in mind (afaict), and it requires access to the git history of the repository (for changelog generation). It would be possible to work around these limitations here, but it probably makes sense to instead think about how to improve this, approach upstream about it (they say "First off, thank you very much! If I can do anything to make packaging Intermodal easier, please don't hesistate to open an issue." in the repo upstream and provide a lot of useful info in the readme already), improve the situation upstream and then use the improved tooling in a package here.

I have still extended the package a tiny bit to ship shell completions, because this is the part that bugged me the most, and doing so was fairly straight forward using our vtargetrun helper. I've cargo-culted those bits from our rustup package, I hope this is the right way to go?

cc @casey (upstream) and @ThatNerdyPikachu (void contributor for this package)

A patch file from https://github.com/void-linux/void-packages/pull/35082.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-intermodal-0.1.12_1-35082.patch --]
[-- Type: text/x-diff, Size: 2223 bytes --]

From c8fa92a63d695a6388750bae1703eacc4c7bee1d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20Christian=20Gr=C3=BCnhage?=
 <jan.christian@gruenhage.xyz>
Date: Sun, 16 Jan 2022 13:12:25 +0100
Subject: [PATCH] intermodal: update to 0.1.12.

---
 srcpkgs/intermodal/template | 46 +++++++++++++++++++++++++++++++++++--
 1 file changed, 44 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/intermodal/template b/srcpkgs/intermodal/template
index bb0e6148ad02..67c932fac9be 100644
--- a/srcpkgs/intermodal/template
+++ b/srcpkgs/intermodal/template
@@ -1,11 +1,53 @@
 # Template file for 'intermodal'
 pkgname=intermodal
-version=0.1.10
+version=0.1.12
 revision=1
 build_style=cargo
+make_check_args="-- --skip subcommand::torrent::verify::tests::output_multiple
+ --skip subcommand::torrent::verify::tests::output_color"
 short_desc="User-friendly and featureful command-line BitTorrent metainfo utility"
 maintainer="Pika <pika@lasagna.dev>"
 license="CC0-1.0"
 homepage="https://github.com/casey/intermodal"
 distfiles="https://github.com/casey/intermodal/archive/v${version}.tar.gz"
-checksum=8bb3e4f549e5c4446543babd741fec0cd7c42da4d49eca3e98c5f7611ad59618
+checksum=cd62894e519dc5aa0284a5f48aab86e1a45c3bc96b8a5481741adb6960d4751a
+
+if [ "$CROSS_BUILD" ]; then
+	hostmakedepends="${pkgname}"
+else
+	hostmakedepends="help2man pkg-config"
+	makedepends="openssl-devel"
+fi
+
+post_build() {
+	if [ -z "$CROSS_BUILD" ]; then
+		IMDL="target/${RUST_TARGET}/release/imdl"
+		for target in completion-scripts man readme; do
+			cargo run --package gen -- --bin $IMDL $target
+		done
+	fi
+}
+
+post_install() {
+	if [ -z "$CROSS_BUILD" ]; then
+		vdoc target/gen/README.md
+
+		vcompletion target/gen/completions/_imdl zsh
+		vcompletion target/gen/completions/imdl.bash bash
+		vcompletion target/gen/completions/imdl.fish fish
+
+		for page in target/gen/man/*; do
+			vman $page
+		done
+	else
+		vdoc /usr/share/doc/intermodal/README.md
+
+		vcompletion /usr/share/zsh/site-functions/_intermodal zsh
+		vcompletion /usr/share/bash-completion/completions/intermodal bash
+		vcompletion /usr/share/fish/vendor_completions.d/intermodal.fish fish
+
+		for page in /usr/share/man/man1/imdl*; do
+			vman $page
+		done
+	fi
+}

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PR PATCH] [Closed]: intermodal: update to 0.1.12.
  2022-01-16 12:39 [PR PATCH] intermodal: update to 0.1.12 jcgruenhage
                   ` (17 preceding siblings ...)
  2022-01-26 19:21 ` jcgruenhage
@ 2022-01-26 19:38 ` ahesford
  18 siblings, 0 replies; 20+ messages in thread
From: ahesford @ 2022-01-26 19:38 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1569 bytes --]

There's a closed pull request on the void-packages repository

intermodal: update to 0.1.12.
https://github.com/void-linux/void-packages/pull/35082

Description:
#### Testing the changes
- I tested the changes in this PR: **YES**

#### tl;dr: computers are hard
So, the `imdl` package was a bit barebones so far, but I'm not quite sure what the correct way to fix this is. Intermodal does have really nice tooling for automatically generating additional artifacts (completions, man pages, other docs, etc) and does try to make packaging `imdl` easy, but sadly, this additional tooling is not really built with cross compilation in mind (afaict), and it requires access to the git history of the repository (for changelog generation). It would be possible to work around these limitations here, but it probably makes sense to instead think about how to improve this, approach upstream about it (they say "First off, thank you very much! If I can do anything to make packaging Intermodal easier, please don't hesistate to open an issue." in the repo upstream and provide a lot of useful info in the readme already), improve the situation upstream and then use the improved tooling in a package here.

I have still extended the package a tiny bit to ship shell completions, because this is the part that bugged me the most, and doing so was fairly straight forward using our vtargetrun helper. I've cargo-culted those bits from our rustup package, I hope this is the right way to go?

cc @casey (upstream) and @ThatNerdyPikachu (void contributor for this package)

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2022-01-26 19:38 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-16 12:39 [PR PATCH] intermodal: update to 0.1.12 jcgruenhage
2022-01-17 12:58 ` [PR PATCH] [Updated] " jcgruenhage
2022-01-18 13:20 ` [PR REVIEW] " ahesford
2022-01-18 13:21 ` ahesford
2022-01-18 13:31 ` jcgruenhage
2022-01-18 13:31 ` ahesford
2022-01-18 13:33 ` [PR PATCH] [Updated] " jcgruenhage
2022-01-18 13:42 ` jcgruenhage
2022-01-18 13:52 ` Johnnynator
2022-01-18 13:53 ` Johnnynator
2022-01-18 14:42 ` ahesford
2022-01-18 14:49 ` jcgruenhage
2022-01-18 15:17 ` ahesford
2022-01-25 10:28 ` [PR PATCH] [Updated] " jcgruenhage
2022-01-25 10:30 ` jcgruenhage
2022-01-25 10:56 ` jcgruenhage
2022-01-25 11:03 ` jcgruenhage
2022-01-25 11:31 ` [PR PATCH] [Updated] " jcgruenhage
2022-01-26 19:21 ` jcgruenhage
2022-01-26 19:38 ` [PR PATCH] [Closed]: " ahesford

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).