Files
haikuports/media-sound/picard/picard-2.2.3.recipe
2019-11-06 23:37:21 +01:00

86 lines
2.3 KiB
Bash

SUMMARY="MusicBrainz music tagger"
DESCRIPTION="Tag your music with the next generation MusicBrainz tagger.
* Multiple formats - Picard supports all popular music formats, including MP3, \
FLAC, OGG, M4A, WMA, WAV, and more.
* AcoustID - Picard uses AcoustID audio fingerprints, allowing files to be \
identified by the actual music, even if they have no metadata.
* CD lookups - Picard can lookup entire music CDs with a click.
* Plugin support - If you need a particular feature, you can choose from a \
selection of available plugins or write your own."
HOMEPAGE="https://picard.musicbrainz.org/"
COPYRIGHT="2004-2019 Robert Kaye, Lukas Lalinsky, Laurent Monin, \
Sambhav Kothari, Philipp Wolfer and others"
LICENSE="GNU GPL v2"
REVISION="1"
SOURCE_URI="ftp://ftp.eu.metabrainz.org/pub/musicbrainz/picard/picard-$portVersion.tar.gz"
CHECKSUM_SHA256="920bc0ffc1b5ae395456698a133799aee06c66b4446f6a388a64046e07d8716b"
SOURCE_DIR="picard-release-$portVersion"
PATCHES="picard-$portVersion.patchset"
ADDITIONAL_FILES="picard.rdef.in"
ARCHITECTURES="!x86_gcc2 ?x86 x86_64"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
picard$secondaryArchSuffix = $portVersion
app:Picard = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
cmd:fpcalc
cmd:python3.7
discid_python3
lib:libdiscid$secondaryArchSuffix
mutagen_python3
pyqt_python3
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
setuptools_python3
"
BUILD_PREREQUIRES="
cmd:gcc$secondaryArchSuffix
cmd:msgfmt$secondaryArchSuffix
cmd:python3.7
"
BUILD()
{
LC_ALL=en_US.UTF-8
python3 setup.py config
}
INSTALL()
{
LC_ALL=en_US.UTF-8
python3 setup.py install \
--root=/ --prefix=$prefix \
--install-data=$dataDir \
--install-locales=$dataDir/locale \
--disable-autoupdate
mkdir -p $appsDir
mv $prefix/bin/picard $appsDir/Picard
rm -rf $binDir
local MAJOR="`echo "$portVersion" | cut -d. -f1`"
local MIDDLE="`echo "$portVersion" | cut -d. -f2`"
local MINOR="`echo "$portVersion" | cut -d. -f3 | cut -d~ -f1`"
sed \
-e "s|@MAJOR@|$MAJOR|" \
-e "s|@MIDDLE@|$MIDDLE|" \
-e "s|@MINOR@|$MINOR|" \
$portDir/additional-files/picard.rdef.in > $sourceDir/build/picard.rdef
settype -t application/x-vnd.Be-elfexecutable $appsDir/Picard
rc $sourceDir/build/picard.rdef
resattr -o $appsDir/Picard $sourceDir/build/picard.rsrc
addAppDeskbarSymlink $appsDir/Picard
rm -rf $dataDir/share
}