Skip to content

Conversation

@ilyabelow
Copy link

The package requires pandoc (which is half a gigabyte of haskell dependencies!) to just build one man file. I honestly almost skipped the package because of this until I realized that pandoc is not needed at all. The man file can easily be prebuild

PKGBUILD should be changed accordingly to only make bdsync, not all, and moving pandoc to optional dependencies. Alternatively, bdsync.1 can just be removed from all target

# Maintainer: Ivan Shapovalov <intelfx@intelfx.name>
# Contributor: Baptiste Jonglez <baptiste--aur at jonglez dot org>
pkgname=bdsync
pkgver=0.11.3
pkgrel=1
pkgdesc="Fast block device synchronizing tool"
arch=("i686" "x86_64")
url="https://github.com/rolffokkens/bdsync"
license=('GPL')
depends=("openssl")
makedepends=("git")
optdepends=(
  'pandoc: regenerate man page from README.md'
)
source=("git+https://github.com/rolffokkens/$pkgname#tag=v${pkgver}")
sha256sums=('SKIP')


prepare() {
  cd "$pkgname"
  sed -i -r 's|^CFLAGS=(.*)|CFLAGS:=\1 $(CFLAGS)|' Makefile
  sed -i -r 's|$\(CRYPTO_LDFLAGS\)$|\0 $(LDFLAGS)|' Makefile
}

build() {
  cd "$pkgname"

  CFLAGS="${CFLAGS//-O2/-O3}"
  make bdsync
}

package() {
  cd "$pkgname"
  install -D -m755 bdsync "$pkgdir/usr/bin/bdsync"
  install -D -m644 bdsync.1 "$pkgdir/usr/share/man/man1/bdsync.1"
}

# vim:set ts=2 sw=2 et:

@rolffokkens
Copy link
Owner

PKGBUILD? Ah, Arch Linux. I see, that requires you to build the package yourself indeed.

I'm a Redhat-like systems user, end that's an RPM eco system which does not require me to build packages myself. It's also available as a pre-built debian package (it was anyway). And it's available for some other distro's as well. So I never worried about the size of the build environment (I wasn't even aware of the pandoc size).

Generating the man page during build makes sure it's based on the latest README.md, zo I just have to maintain one file.

For practical reasons it seems like Arch Linux users may accept a slightly out of dat man page, is that correct? Then your approach may work indeed.

@ilyabelow
Copy link
Author

ilyabelow commented Jun 14, 2025

Sorry, for some reason I assumed that you are also a maintainer of the AUR package. Didn't know that you, as a maintainer, do not compile it (and thus generate man page) yourself. In this case I guess there's no point to add precompiled man page if it will not be updated...

If you could ship man page with the repo it would be great, otherwise I'm afraid there's no point and no other way. Which is fine ofc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants