[SOLVED] PKGBUILD review - distrho-mini-series-git

All your LV2 and LADSPA goodness and more.

Moderators: MattKingUSA, khz

Post Reply
CrocoDuck
Established Member
Posts: 1133
Joined: Sat May 05, 2012 6:12 pm
Been thanked: 17 times

[SOLVED] PKGBUILD review - distrho-mini-series-git

Post by CrocoDuck »

Hi there!

I got new DISTRHO packages working for: glBars, Kars, Mini-Series, ndc-Plugs, MVerb, Nekobi and ProM. They are based on the same bash code, only the names change. So, I think it would be enough if some more experienced AUR packager could review this one:

Code: Select all

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

_pkgbasename=mini-series
pkgname="distrho-${_pkgbasename}-git"
pkgver=r64.baf70c0
pkgrel=1
pkgdesc="A collection of small but useful plugins, based on the good old LOSER-Dev Plugins."
arch=('i686' 'x86_64')
url="http://distrho.sourceforge.net/"
license=('LGPL3')
depends=('jack2' 'liblo' 'mesa')
makedepends=('git')
provides=('3bandeq' '3bandsplitter' 'pingpongpan')
conflicts=("${_pkgbasename}" 'dpf-plugins')
source=("3bandeq.desktop"
        "3bandsplitter.desktop"
        "pingpongpan.desktop"
        "${_pkgbasename}::git://github.com/DISTRHO/Mini-Series"
        "dpf::git://github.com/DISTRHO/DPF")
md5sums=('1564ae057f065a421f2f04646ab27262' 
         '3392b059f757911f0d9966a709404434'
         '67fd149674431b1d1df6ff5df1d44fce' 
         'SKIP' 
         'SKIP')

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

prepare() {
    # Set up submodule:
	cd "${_pkgbasename}"
    git submodule init
    git config "submodule.dpf.https:${source[-1]##*:}.git" \
        "$srcdir/${source[-1]%::*}"
    git submodule update
}

build() {
    cd "${_pkgbasename}"
    make
}

package() {
    cd "${_pkgbasename}"
    # Standalones:
	install -D "bin/3BandEQ" "$pkgdir/usr/bin/3BandEQ"
	install -D "bin/3BandSplitter" "$pkgdir/usr/bin/3BandSplitter"
	install -D "bin/PingPongPan" "$pkgdir/usr/bin/PingPongPan"
	# LADSPA:
	install -D "bin/3BandEQ-ladspa.so" \
	    "$pkgdir/usr/lib/ladspa/3BandEQ-ladspa.so"
	install -D "bin/3BandSplitter-ladspa.so" \
	    "$pkgdir/usr/lib/ladspa/3BandSplitter-ladspa.so"
	install -D "bin/PingPongPan-ladspa.so" \
	    "$pkgdir/usr/lib/ladspa/PingPongPan-ladspa.so"
	# VST:
	install -D "bin/3BandEQ-vst.so" "$pkgdir/usr/lib/vst/3BandEQ-vst.so"
	install -D "bin/3BandSplitter-vst.so" \
	    "$pkgdir/usr/lib/vst/3BandSplitter-vst.so"
	install -D "bin/PingPongPan-vst.so" "$pkgdir/usr/lib/vst/PingPongPan-vst.so"
	# DSSI:
	install -D "bin/3BandEQ-dssi.so" "$pkgdir/usr/lib/dssi/3BandEQ-dssi.so"
	install -D "bin/3BandSplitter-dssi.so" \
	    "$pkgdir/usr/lib/dssi/3BandSplitter-dssi.so"
	install -D "bin/PingPongPan-dssi.so" \
	    "$pkgdir/usr/lib/dssi/PingPongPan-dssi.so"
	for i in bin/{3BandEQ,3BandSplitter,PingPongPan}-dssi/*; do
		install -D "$i" "$pkgdir/usr/lib/dssi/${i#*/}"
	done
	# LV2
	for i in $(find bin/{3BandEQ.lv2,3BandSplitter.lv2,PingPongPan.lv2} -type f); do 
	    install -D "$i" "$pkgdir/usr/lib/lv2/${i#*/}";  
	done
	# License:
	cd "$srcdir/${source[-1]%::*}"
	install -Dm 644 "LICENSE" "$pkgdir/usr/share/licenses/$pkgname/dpf/LICENSE"
	# Launchers:
	cd $srcdir
	install -Dm 644 \
	    "$srcdir/3bandeq.desktop" \
	    "$pkgdir/usr/share/applications/3bandeq.desktop"
	install -Dm 644 \
	    "$srcdir/3bandsplitter.desktop" \
	    "$pkgdir/usr/share/applications/3bandsplitter.desktop"
    install -Dm 644 \
	    "$srcdir/pingpongpan.desktop" \
	    "$pkgdir/usr/share/applications/pingpongpan.desktop"
}
In particular, is the provides variables used correctly? I am having some trouble interpreting what the wiki says.
Last edited by CrocoDuck on Fri Jan 13, 2017 9:47 pm, edited 1 time in total.
lykwydchykyn
Established Member
Posts: 227
Joined: Tue May 20, 2014 2:01 pm
Location: Tennessee, USA
Been thanked: 1 time
Contact:

Re: PKGBUILD review - distrho-mini-series-git

Post by lykwydchykyn »

I'm a relative noob at PKGBUILDs, so I probably can't answer the provides question, but my first question is why your package provides redundant VST, DSSI, LV2, and LADSPA versions of the same plugins (or does it? Did I misread?).

Other packages usually break those out into separate builds. Not sure which approach is better, but I'm interested in the rationale.
CrocoDuck
Established Member
Posts: 1133
Joined: Sat May 05, 2012 6:12 pm
Been thanked: 17 times

Re: PKGBUILD review - distrho-mini-series-git

Post by CrocoDuck »

lykwydchykyn wrote: Other packages usually break those out into separate builds. Not sure which approach is better, but I'm interested in the rationale.
Good point, I though about it. I am not sure the Makefile allows me to build it selectively tho.
Javafant
Established Member
Posts: 15
Joined: Sat Dec 14, 2013 11:09 pm

Re: PKGBUILD review - distrho-mini-series-git

Post by Javafant »

IMHO it would be nice to add to pkgdesc the type of plugins contained in this package (i.e. LV2, VST, Ladspa).
lykwydchykyn
Established Member
Posts: 227
Joined: Tue May 20, 2014 2:01 pm
Location: Tennessee, USA
Been thanked: 1 time
Contact:

Re: PKGBUILD review - distrho-mini-series-git

Post by lykwydchykyn »

CrocoDuck wrote:
lykwydchykyn wrote: Other packages usually break those out into separate builds. Not sure which approach is better, but I'm interested in the rationale.
Good point, I though about it. I am not sure the Makefile allows me to build it selectively tho.
I guess if they're all in the same source tree and you have to build them anyway, might as well install them all.
CrocoDuck
Established Member
Posts: 1133
Joined: Sat May 05, 2012 6:12 pm
Been thanked: 17 times

Re: [SOLVED] PKGBUILD review - distrho-mini-series-git

Post by CrocoDuck »

Thank you for your feedback guys. I actually decided to provide mini-series through dpf-plugins. I have incorporated your feedback into the final PKGBUILD. Thanks.
Post Reply