[arch-commits] Commit in skate/trunk (PKGBUILD)
George Rawlinson
grawlinson at gemini.archlinux.org
Wed Aug 10 07:10:59 UTC 2022
Date: Wednesday, August 10, 2022 @ 07:10:59
Author: grawlinson
Revision: 1265017
upgpkg: skate 0.2.1-2
Generate reproducible man pages.
Modified:
skate/trunk/PKGBUILD
----------+
PKGBUILD | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2022-08-10 06:58:49 UTC (rev 1265016)
+++ PKGBUILD 2022-08-10 07:10:59 UTC (rev 1265017)
@@ -3,7 +3,7 @@
pkgname=skate
pkgver=0.2.1
-pkgrel=1
+pkgrel=2
pkgdesc='A personal key value store'
arch=('x86_64')
url='https://github.com/charmbracelet/skate'
@@ -48,6 +48,18 @@
-X main.CommitSHA=$_commit" \
-o build \
.
+
+ # generate man page
+ ./build/skate man > build/skate.1
+
+ # ensure reproducibility of man page
+ # i'm not 100% sure where the man sub-command gets the date from, i assume
+ # it uses $TODAYS_DATE, so this should make the man page reproducible
+ local _commit_date=$(git show --no-patch --format=%cd --date=format:%Y-%m-%d)
+
+ sed \
+ -i build/skate.1 \
+ -e "s/\"[0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}\"/\"$_commit_date\"/"
}
check() {
@@ -59,8 +71,13 @@
package() {
cd skate
+ # binary
install -vDm755 -t "$pkgdir/usr/bin" build/skate
+ # man page
+ install -vDm644 -t "$pkgdir/usr/share/man/man1" build/skate.1
+
+ # license
install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE
}
More information about the arch-commits
mailing list