Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Improved PKGBUILD for adlplug-git AUR package
[Desktop Entry]
Name=OPNplug
Name[fr]=OPNplug
Comment=FM Yamaha OPN2 synthesizer for ADLMIDI
Comment[fr]=Synthétiseur FM Yamaha OPN2 pour ADLMIDI
TryExec=OPNplug
Exec=OPNplug
Icon=OPNplug
Type=Application
Categories=AudioVideo;Audio;Music;Midi
# Maintainer: Jean Pierre Cimalando <jp-dev@inbox.ru>
# Contributor: Christopher Arndt <aur -at- chrisarndt -dot- de>
pkgname=(adlplug-git opnplug-git)
_pkgname=ADLplug
pkgver=v1.0.0.beta.1.r7.8a461a2
pkgrel=1
arch=('i686' 'x86_64')
url="https://github.com/jpcima/ADLplug"
license=('GPL')
groups=('pro-audio')
depends=('jack' 'alsa-lib' 'freetype2' 'libxext')
makedepends=('git')
source=('git+https://github.com/jpcima/ADLplug.git'
'git+https://github.com/Wohlstand/libADLMIDI.git'
'git+https://github.com/Wohlstand/libOPNMIDI.git'
'git+https://github.com/jpcima/JUCE.git'
'git+https://github.com/fmtlib/fmt.git'
'OPNplug.desktop'
'OPNplug.png')
md5sums=('SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'd7ad9f515b9a05f4dfb98bb0ef4a4d97'
'd65ce8316751760ae8df9740b9009f96')
pkgver() {
cd "${srcdir}/$_pkgname"
printf "%s" "$(git describe --long | sed 's/\([^-]*-\)g/r\1/;s/-/./g')"
}
prepare() {
cd "${srcdir}/${_pkgname}"
git submodule init
for submodule in \
thirdparty/libADLMIDI thirdparty/libOPNMIDI \
thirdparty/JUCE thirdparty/fmt
do
git config "submodule.$submodule.url" "${srcdir}/`basename "$submodule"`"
done
git submodule update
cd "${srcdir}"
cp -r "${_pkgname}" "${_pkgname}-opn"
}
build() {
cd "${srcdir}/${_pkgname}"
mkdir -p build
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DADLplug_CHIP=OPL3 ..
make
cd "${srcdir}/${_pkgname}-opn"
mkdir -p build
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DADLplug_CHIP=OPN2 ..
make
}
package_adlplug-git() {
pkgdesc="FM synthesizer for ADLMIDI with OPL3 chip emulation"
provides=('adlplug')
conflicts=('adlplug')
cd "${srcdir}/${_pkgname}/build"
make DESTDIR="$pkgdir/" install
}
package_opnplug-git() {
pkgdesc="FM synthesizer for ADLMIDI with OPN2 chip emulation"
provides=('opnplug')
conflicts=('opnplug')
cd "${srcdir}/${_pkgname}-opn/build"
make DESTDIR="$pkgdir/" install
rm -f "${pkgdir}/usr/share/applications/ADLplug.desktop"
rm -f "${pkgdir}/usr/share/pixmaps/ADLplug.png"
install -Dm644 "${srcdir}"/OPNplug.desktop -t "${pkgdir}/usr/share/applications"
install -Dm644 "${srcdir}"/OPNplug.png -t "${pkgdir}/usr/share/pixmaps"
}
@jpcima

This comment has been minimized.

Copy link

commented Sep 18, 2018

I would like to include your icon. Please send it, by mail, or here or PR into jpcima/ADLplug, as you prefer. Thanks

@SpotlightKid

This comment has been minimized.

Copy link
Owner Author

commented Sep 19, 2018

For reference, the PR is here: jpcima/ADLplug#24

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.