Don't compress man page(s) in Makefile

Compressing man pages is a distribution / user preference that should be handled on the packaging side of things.

Indeed, compressing man pages by default imposes a compression algorithm / level whereas most package managers handle that already and eventually allow users to choose or customize them if wanted.

Additionally, it can lead to unexpected side effects. For instance, gzip is recording timestamps in metadata by default, which prevents [reproducible builds](https://reproducible-builds.org/):

```
==> ERROR: Package is not reproducible
--- lidm-0.2.0-1-any.pkg.tar.zst
+++ ./build/lidm-0.2.0-1-any.pkg.tar.zst
├── lidm-0.2.0-1-any.pkg.tar
│ ├── file list
│ │ @@ -1,9 +1,9 @@
│ │  -rw-r--r--   0 root         (0) root         (0)     5391 2025-03-10 12:01:53.000000 .BUILDINFO
│ │ --rw-r--r--   0 root         (0) root         (0)      488 2025-03-10 12:01:53.000000 .MTREE
│ │ +-rw-r--r--   0 root         (0) root         (0)      492 2025-03-10 12:01:53.000000 .MTREE
│ │  -rw-r--r--   0 root         (0) root         (0)      427 2025-03-10 12:01:53.000000 .PKGINFO
│ │  drwxr-xr-x   0 root         (0) root         (0)        0 2025-03-10 12:01:53.000000 etc/
│ │  -rw-r--r--   0 root         (0) root         (0)      930 2025-03-10 12:01:53.000000 etc/lidm.ini
│ │  drwxr-xr-x   0 root         (0) root         (0)        0 2025-03-10 12:01:53.000000 usr/
│ │  drwxr-xr-x   0 root         (0) root         (0)        0 2025-03-10 12:01:53.000000 usr/bin/
│ │  -rwxr-xr-x   0 root         (0) root         (0)    39656 2025-03-10 12:01:53.000000 usr/bin/lidm
│ │  drwxr-xr-x   0 root         (0) root         (0)        0 2025-03-10 12:01:53.000000 usr/share/
│ ├── .MTREE
│ │ ├── .MTREE-content
│ │ │ @@ -7,10 +7,10 @@
│ │ │  /set mode=755
│ │ │  ./usr time=1741608113.0 type=dir
│ │ │  ./usr/bin time=1741608113.0 type=dir
│ │ │  ./usr/bin/lidm time=1741608113.0 size=39656 sha256digest=1a27eef50f6caf35d408f7650c362dea788c7a00a2736f0ec4c94ecd38ae6c6f
│ │ │  ./usr/share time=1741608113.0 type=dir
│ │ │  ./usr/share/man time=1741608113.0 type=dir
│ │ │  ./usr/share/man/man1 time=1741608113.0 type=dir
│ │ │ -./usr/share/man/man1/lidm.1.gz time=1741608113.0 mode=644 size=615 sha256digest=7babc0d1e7d84c3ff18db5ea327313cdbe2ba1117c33d733622a916dfd9d8d0e
│ │ │ +./usr/share/man/man1/lidm.1.gz time=1741608113.0 mode=644 size=615 sha256digest=497e49b75ab0d2c3f3edb70967bf189724990c46df23492738254395ec835d8c
│ │ │  ./usr/share/man/man5 time=1741608113.0 type=dir
│ │ │ -./usr/share/man/man5/lidm-config.5.gz time=1741608113.0 mode=644 size=1374 sha256digest=d0b54c3117c417dfdc43a7629f26cf4c64235742f698a0498722a03a4d1c25c2
│ │ │ +./usr/share/man/man5/lidm-config.5.gz time=1741608113.0 mode=644 size=1374 sha256digest=4e16649cb31029b039a594ffa2f2d4d8a624917aaacc865836c5c2d2a92cd3e4
│ ├── usr/share/man/man1/lidm.1.gz
│ │ ├── filetype from file(1)
│ │ │ @@ -1 +1 @@
│ │ │ -gzip compressed data, was "lidm.1", last modified: Mon Mar 10 12:01:59 2025, from Unix
│ │ │ +gzip compressed data, was "lidm.1", last modified: Mon Mar 10 12:15:51 2025, from Unix
│ ├── usr/share/man/man5/lidm-config.5.gz
│ │ ├── filetype from file(1)
│ │ │ @@ -1 +1 @@
│ │ │ -gzip compressed data, was "lidm-config.5", last modified: Mon Mar 10 12:01:59 2025, from Unix
│ │ │ +gzip compressed data, was "lidm-config.5", last modified: Mon Mar 10 12:15:51 2025, from Unix
```

See https://cmpct.info/~sam/blog/posts/automatic-manpage-compression/ for detailed rational.
This commit is contained in:
Robin Candau 2025-03-10 13:13:19 +01:00
parent b003909c3e
commit 5d298ea6d8
No known key found for this signature in database
GPG Key ID: D33FAA16B937F3B2
5 changed files with 1 additions and 6 deletions

View File

@ -36,7 +36,6 @@ install: lidm
install -Dm644 ./themes/default.ini ${DESTDIR}/etc/lidm.ini
install -Dm644 ./assets/man/lidm.1 ${DESTDIR}${PREFIX}/share/man/man1/
install -Dm644 ./assets/man/lidm-config.5 ${DESTDIR}${PREFIX}/share/man/man5/
gzip -f ${DESTDIR}${PREFIX}/share/man/man{1/lidm.1,5/lidm-config.5}
uninstall:
rm -rf ${DESTDIR}${PREFIX}/bin/lidm ${DESTDIR}/etc/lidm.ini

View File

@ -5,7 +5,6 @@ pkgbase = lidm-bin
url = https://github.com/javalsai/lidm
arch = x86_64
license = GPL
makedepends = gzip
depends = pam
provides = lidm
conflicts = lidm

View File

@ -4,7 +4,6 @@ pkgname=lidm-bin
pkgver=0.2.0
pkgrel=1
depends=('pam')
makedepends=('gzip')
pkgdesc="A fully colorful customizable TUI display manager made in C. (release binary)"
arch=('x86_64')
url="https://github.com/javalsai/lidm"
@ -27,5 +26,4 @@ package() {
install -Dm644 default-theme.ini "${pkgdir}/etc/lidm.ini"
install -Dm644 lidm.1 "${pkgdir}/usr/share/man/man1/lidm.1"
install -Dm644 lidm-config.5 "${pkgdir}/usr/share/man/man5/lidm-config.5"
gzip -f "${pkgdir}"/usr/share/man/man{1/lidm.1,5/lidm-config.5}
}

View File

@ -7,7 +7,6 @@ pkgbase = lidm
license = GPL
makedepends = git
makedepends = gcc
makedepends = gzip
depends = pam
source = tarball.tar.gz::https://github.com/javalsai/lidm/archive/refs/tags/v0.2.0.tar.gz
sha256sums = 6d397cf75cafdcb95e5a2623d70f2e07bbb085a07b7c3b743caac06454ed7b16

View File

@ -4,7 +4,7 @@ pkgname=lidm
pkgver=0.2.0
pkgrel=1
depends=('pam')
makedepends=('git' 'gcc' 'gzip')
makedepends=('git' 'gcc')
pkgdesc="A fully colorful customizable TUI display manager made in C. (build latest tag)"
arch=('any')
url="https://github.com/javalsai/lidm"