moc-stable-complete
All sources are from plausible official/project hosts (ftp.daper.net for MOC, GitHub for moc-fluidsynth-plugin) with SHA256 checksums; bundled local files (pulse.c, pulse.h, ffmpeg.c.patch) also have checksums; the build applies patches and compiles from source with no remote code execution or exfiltration concerns, though the package is complex and low-vote.
Triggered rules
zero_votes_recent
Uploaded within the last 14 days with 2 or fewer community votes — little peer review so far.
llm_review
The static rules flagged this MEDIUM, but an AI model (anthropic/claude-sonnet-4.6) reviewed the full PKGBUILD and judged it LOW (confidence 80%): All sources are from plausible official/project hosts (ftp.daper.net for MOC, GitHub for moc-fluidsynth-plugin) with SHA256 checksums; bundled local files (pulse.c, pulse.h, ffmpeg.c.patch) also have checksums; the build applies patches and compiles from source with no remote code execution or exfiltration concerns, though the package is complex and low-vote.
1 higher static finding superseded - not the current verdict (shown for transparency)
source_untrusted_domain
One or more source=() URLs point to a host outside the trusted allowlist (github.com, gitlab.com, codeberg.org, pypi.org, …).
-
PKGBUILD:22
source=("https://ftp.daper.net/pub/soft/${_pkgname}/stable/${_pkgname}-${pkgver}.tar.bz2"
PKGBUILD
1 offending line(s) highlighted# Maintainer: PiterDeVries <https://aur.archlinux.org/account/PiterDeVries>
pkgname='moc-stable-complete'
_pkgname='moc'
pkgver='2.5.2'
pkgrel=2
pkgdesc='Music On Console is an ncurses-based console audio player - stable version with patches that support PulseAudio and FluidSynth, compiled against current FFmpeg'
arch=('x86_64')
url="https://moc.daper.net/"
license=('GPL-2.0-or-later')
depends=('popt' 'libmad' 'libid3tag' 'jack' 'curl' 'libltdl' 'file' 'sndio' 'fluidsynth' 'libsmf')
makedepends=('speex' 'ffmpeg>=5.1' 'taglib' 'libmpcdec' 'wavpack' 'libmodplug' 'faad2')
optdepends=('speex: for using the speex plugin'
'ffmpeg>=5.1: for using the ffmpeg plugin'
'taglib: for using the musepack plugin'
'libmpcdec: for using the musepack plugin'
'wavpack: for using the wavpack plugin'
'faad2: for using the aac plugin'
'libmodplug: for using the modplug plugin')
provides=('moc')
conflicts=('moc' 'moc-pulse' 'moc-git' 'moc-unstable' 'moc-stable' 'moc-development' 'moc-fluidsynth-plugin')
source=("https://ftp.daper.net/pub/soft/${_pkgname}/stable/${_pkgname}-${pkgver}.tar.bz2"
"moc-fluidsynth-plugin-0.6.6.tar.gz::https://github.com/joanbm/moc-fluidsynth-plugin/archive/refs/tags/v0.0.6.tar.gz"
"pulse.c"
"pulse.h"
"ffmpeg.c.patch")
sha256sums=('f3a68115602a4788b7cfa9bbe9397a9d5e24c68cb61a57695d1c2c3ecf49db08'
'5585d541c6bc92103a71a044d096f16d872ac260a078d7d91b005f60939aefb4'
'84cbc24e9c81f0ea699438bdb8827f1519c107fb963a8b59baf50e3a21f70252'
'93e89cc4f4025f30a9b1b0c4c2603ca35950cf237dc0fc15f09759438232bc33'
'1c80e716ff774a7bb5f07cb938663aac596c12f6302f64b389504519778de5d0')
install="moc-stable-complete.install"
prepare() {
cd "${_pkgname}-${pkgver}"
### The rest of the build() section will be divided into several subsections:
### necessary patches(1), PulseAudio support(2), FluidSynth plugin(3), patches for FFmpeg plugin compatibility with
### FFmpeg versions>5.0 (4) and updating the configuration files (5).
## 1. Fix the compilation (fix all current errors):
# add support for https in the file: 'files.c'
sed -i '95a\ || !strncasecmp (str, "https://", sizeof ("https://") - 1)' "$srcdir/${_pkgname}-${pkgver}/files.c"
# fix warning about the file 'configure.in' (should be named 'configue.ac'):
mv "$srcdir/${_pkgname}-${pkgver}/configure.in" "$srcdir/${_pkgname}-${pkgver}/configure.ac"
## 2. Add the PulseAudio support:
# (Note: PulseAudio support based on the AUR/moc-pulse package)
# copy files 'pulse.c' and 'pulse.h' into the main directory:
cp ../pulse.c "$srcdir/${_pkgname}-${pkgver}/"
cp ../pulse.h "$srcdir/${_pkgname}-${pkgver}/"
# include the 'pulse.h' header into the file: 'audio.c'
sed -i '34a\#ifdef HAVE_PULSE' "$srcdir/${_pkgname}-${pkgver}/audio.c"
sed -i '35a\# include "pulse.h"' "$srcdir/${_pkgname}-${pkgver}/audio.c"
sed -i '36a\#endif"' "$srcdir/${_pkgname}-${pkgver}/audio.c"
# add "PulseAudio" as an option in the main configuration file - modify the file: 'options.c'
sed -i '575 s/CHECK_DISCRETE(5), "SNDIO", "Jack", "ALSA", "OSS", "null");/CHECK_DISCRETE(5), "SNDIO", "PulseAudio", "Jack", "ALSA", "OSS", "null");/' \
"$srcdir/${_pkgname}-${pkgver}/options.c"
sed -i '578 s/CHECK_DISCRETE(5), "SNDIO", "Jack", "ALSA", "OSS", "null");/CHECK_DISCRETE(5), "SNDIO", "PulseAudio", "Jack", "ALSA", "OSS", "null");/' \
"$srcdir/${_pkgname}-${pkgver}/options.c"
# finally, modify the main configuration file to add another option - file: 'configure.ac'
sed -i '190a\if test "x$with_pulse" != "xno"' "$srcdir/${_pkgname}-${pkgver}/configure.ac"
sed -i '191a\then' "$srcdir/${_pkgname}-${pkgver}/configure.ac"
sed -i '192a\ PKG_CHECK_MODULES(PULSE, [libpulse],' "$srcdir/${_pkgname}-${pkgver}/configure.ac"
sed -i '193a\ [SOUND_DRIVERS="$SOUND_DRIVERS PULSE"' "$srcdir/${_pkgname}-${pkgver}/configure.ac"
sed -i '194a\ EXTRA_OBJS="$EXTRA_OBJS pulse.o"' "$srcdir/${_pkgname}-${pkgver}/configure.ac"
sed -i '195a\ AC_DEFINE([HAVE_PULSE], 1, [Define if you have PulseAudio.])' "$srcdir/${_pkgname}-${pkgver}/configure.ac"
sed -i '196a\ EXTRA_LIBS="$EXTRA_LIBS $PULSE_LIBS"' "$srcdir/${_pkgname}-${pkgver}/configure.ac"
sed -i '197a\ CFLAGS="$CFLAGS $PULSE_CFLAGS"],' "$srcdir/${_pkgname}-${pkgver}/configure.ac"
sed -i '198a\ [true])' "$srcdir/${_pkgname}-${pkgver}/configure.ac"
sed -i '199a\fi' "$srcdir/${_pkgname}-${pkgver}/configure.ac"
sed -i '200a\' "$srcdir/${_pkgname}-${pkgver}/configure.ac"
# last tiny detail: add "PULSEAUDIO" into the "SoundDriver" section in the example config file 'config.example.in'
sed -i '124 s/ALSA, JACK,/ALSA, JACK, PULSEAUDIO,/' "$srcdir/${_pkgname}-${pkgver}/config.example.in"
## 3. Add the FluidSynth support (made by Joan Bruguera Micó)
# Note: for some reason, it can't be included directly (can only be compiled separately as a shared library)
# ...probably because the moc-fulidsynth-plugin adds specific steps for compiling the libfluidsynth_decoder.so (as a standalone plugin)
# - that makes some of the following steps kind of redundant
# (will needs to compile the libfluidsynth_decoder.so directly later - see the build() and package() sections)
# copy the 'fluidsynth' decoder plugin from the moc-fluidsynth-plugin project:
cp -r ../moc-fluidsynth-plugin-0.0.6/moc/decoder_plugins/fluidsynth "$srcdir/${_pkgname}-${pkgver}/decoder_plugins"
# add the 'fluidsynth' right after 'timidity' in the decoder list - the file: 'decoders.m4'
sed -i '26a\m4_include(decoder_plugins/fluidsynth/fluidsynth.m4)' "$srcdir/${_pkgname}-${pkgver}/decoder_plugins/decoders.m4"
# ... and to the file: 'decoder_plugins/Makefile.am'
sed -i '38a\if BUILD_fluidsynth' "$srcdir/${_pkgname}-${pkgver}/decoder_plugins/Makefile.am"
sed -i '39a\ SUBDIRS += fluidsynth' "$srcdir/${_pkgname}-${pkgver}/decoder_plugins/Makefile.am"
sed -i '40a\endif' "$srcdir/${_pkgname}-${pkgver}/decoder_plugins/Makefile.am"
sed -i '41a\' "$srcdir/${_pkgname}-${pkgver}/decoder_plugins/Makefile.am"
# also add 'fluidsynth' to the file: 'tools/md5check.sh'
sed -i '240 s/timidity/timidity|fluidsynth/' "$srcdir/${_pkgname}-${pkgver}/tools/md5check.sh"
# and list it in the main makefile: 'Makefile.in'
sed -i '69a\ $(top_srcdir)/decoder_plugins/fluidsynth/fluidsynth.m4 \' "$srcdir/${_pkgname}-${pkgver}/decoder_plugins/Makefile.in"
# add notion about the FluidSynth support to the default example config file: 'config.example.in'
sed -i '625a\# Self-describing FluidSynth audio characteristic options.' "$srcdir/${_pkgname}-${pkgver}/config.example.in"
sed -i '626a\#FluidSynth_SoundFont = /usr/share/soundfonts/default.sf2' "$srcdir/${_pkgname}-${pkgver}/config.example.in"
sed -i '627a\#FluidSynth_Rate = 44100 # Between 8000 and 96000' "$srcdir/${_pkgname}-${pkgver}/config.example.in"
sed -i '628a\' "$srcdir/${_pkgname}-${pkgver}/config.example.in"
# and finally: give credit to the author of the moc-fluidsynth-plugin - add him to the file: 'THANKS'
sed -i '16a\Joan Bruguera:' "$srcdir/${_pkgname}-${pkgver}/THANKS"
sed -i '17a\ * Added FluidSynth decoder for MIDI.' "$srcdir/${_pkgname}-${pkgver}/THANKS"
sed -i '18a\' "$srcdir/${_pkgname}-${pkgver}/THANKS"
## 4. Patch the FFmpeg decoder plugin so that its compatible with current version of FFmpeg:
# apply patch to the file 'decoder_plugins/ffmpeg/ffmpeg.c' - this is the core change,
# as it fixes the breaking API changes that happened between FFmpeg 4.4->5.1
patch < ../ffmpeg.c.patch "$srcdir/${_pkgname}-${pkgver}/decoder_plugins/ffmpeg/ffmpeg.c"
# modify the FFmpeg plugin's makefile 'decoder_plugins/ffmpeg/ffmpeg.m4' - ensure that MOC compiles
# against FFmpeg version>=5.1 (API-wise, this means libavcodec 59.24.100):
sed -i '36 s/--atleast-version 54.59.100 libavcodec/--atleast-version 59.24.100 libavcodec/' "$srcdir/${_pkgname}-${pkgver}/decoder_plugins/ffmpeg/ffmpeg.m4"
## 5. final step - reconfigure the configuration system:
autoreconf -i -f
}
build() {
cd "${_pkgname}-${pkgver}"
./configure --prefix=/usr \
--without-rcc \
--with-pulse \
--with-oss \
--with-alsa \
--with-jack \
--with-aac \
--with-mp3 \
--with-musepack \
--with-vorbis \
--with-flac \
--with-wavpack \
--with-sndfile \
--with-modplug \
--with-ffmpeg \
--with-speex \
--with-samplerate \
--with-curl \
--with-fluidsynth \
--disable-cache \
--disable-debug
make
## Since the FluidSynth plugin can't be included directly (requires specific additional make parameters),
## we will now create a new Makefile and use it to build the file libfluidsynth_decoder.so
## Note that as far as packaging goes, this is kind of a weird hack:
# create the new Makefile in the "$srcdir":
cd "${srcdir}"
touch "Makefile"
# fill the new Makefile - based on the content of Makefile from the moc-fluidsynth-plugin:
echo 'CC := gcc' >> "$srcdir/Makefile"
echo 'SMF_FLAGS = $(shell pkg-config --exists smf && pkg-config --cflags --libs smf && echo "-DHAVE_SMF")' >> "$srcdir/Makefile"
echo 'libfluidsynth_decoder.so: moc/decoder_plugins/fluidsynth/fluidsynth.c' >> "$srcdir/Makefile"
echo ' $(CC) -Wall -Wextra -fPIC -DSTANDALONE -Imoc -shared moc/decoder_plugins/fluidsynth/fluidsynth.c \' >> "$srcdir/Makefile"
echo ' $(shell pkg-config --cflags --libs fluidsynth) $(SMF_FLAGS) -o libfluidsynth_decoder.so' >> "$srcdir/Makefile"
# create a symbolic link called 'moc' in "$srcdir" - this mirrors the directory structure from the moc-fluidsynth plugin:
ln -s "${_pkgname}-${pkgver}" "${srcdir}/${_pkgname}"
# and of course make the libfluidsynth_decoder.so library itself:
make libfluidsynth_decoder.so
}
package() {
cd ${_pkgname}-${pkgver}
make DESTDIR="${pkgdir}" install
# now all that remains to do is to replace the libfluidsynth_decoder.so with the one from "$srcdir":
rm "${pkgdir}/usr/lib/moc/decoder_plugins/libfluidsynth_decoder.so"
cp "${srcdir}/libfluidsynth_decoder.so" "${pkgdir}/usr/lib/moc/decoder_plugins/"
}
# vim: ts=2 sw=2
Scan history
| Scanned at (UTC) | Severity | Rules |
|---|---|---|
| 2026-09-12 03:12:35 | Low | 3 |
| 2026-09-12 03:10:21 | Medium | 2 |