lucianodato / noise-repellent

Lv2 suite of plugins for broadband noise reduction
GNU Lesser General Public License v3.0
462 stars 39 forks source link

Packaging Issue: Installation Prefix Configuration #55

Closed stefano-tronci closed 6 years ago

stefano-tronci commented 6 years ago

Hi! I am maintaining an Arch Linux AUR package for this plugin. According to the Arch Linux Package Etiquette packages should never be installed into /usr/local. However, that appears to be the default install prefix for meson. My attempts at changing the default prefix failed:

# Maintainer: CrocoDuck <crocoduck dot oducks at gmail dot com>

pkgname=noise-repellent-git
pkgver=r561.98cf68f
pkgrel=1
pkgdesc="An lv2 plugin for broadband noise reduction."
arch=('i686' 'x86_64')
url="https://github.com/lucianodato/noise-repellent"
license=('LGPL3')
depends=('fftw')
makedepends=('git' 'lv2' 'meson')
provides=("${pkgname%-*}")
conflicts=("${pkgname%-*}")
source=("${pkgname%-*}::git://github.com/lucianodato/noise-repellent")
md5sums=('SKIP')

pkgver() {
  cd "${pkgname%-*}"
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
    cd "${pkgname%-*}"
    meson --prefix "/usr" --buildtype=plain build
    ninja -v -C build
}

package() {
    cd "${pkgname%-*}/build"
    DESTDIR="$pkgdir/" ninja install
}

I am not really used to meson or ninja, but seems like the approach above should work. So I am left wondering whether your build scripts do not allow custom install prefix.

stefano-tronci commented 6 years ago

Hey, few more info:

Looks like --prefix is working correctly. Here the output of mesonconf:

Directories:
  Option         Current Value Description
  ------         ------------- -----------
  prefix         /usr          Installation prefix.
  libdir         lib           Library directory.
  libexecdir     libexec       Library executable directory.
  bindir         bin           Executable directory.
  sbindir        sbin          System executable directory.
  includedir     include       Header file directory.
  datadir        share         Data file directory.
  mandir         share/man     Manual page directory.
  infodir        share/info    Info page directory.
  localedir      share/locale  Locale data directory.
  sysconfdir     /etc          Sysconf data directory.
  localstatedir  /var          Localstate data directory.
  sharedstatedir /var/lib      Architecture-independent data directory.

However, build/meson-private/install.dat still shows paths in /usr/local. I have the feeling that everything might boil down to the use of i_path in meson.build.

lucianodato commented 6 years ago

Thanks for reporting @CrocoDuckoDucks. I'm doing non standard path setting. I should indicate for each operating system a prefix and call it a day. I'm fixing ASAP.

lucianodato commented 6 years ago

Should work now. Close the issue if it's correct now. Thanks!

stefano-tronci commented 6 years ago

Yes, it is working now. Thanks!