moOde audio player - package builder

January 28, 2025 ยท View on GitHub

by bitlab

Hosted By: Cloudsmith

Package repository hosting is graciously provided by Cloudsmith. Cloudsmith is the only fully hosted, cloud-native, universal package management solution, that enables your organization to create, store and share packages in any format, to any place, with total confidence.

Disclaimer

The software and other materials in this repository are distributed under the GNU GENERAL PUBLIC LICENSE Version 3 which includes the following disclaimer:

  1. Disclaimer of Warranty.

THERE IS NO WARRANTY FOR THE PROGRAM, TO THE >EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.

  1. Limitation of Liability.

IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

This means that the user of this software is responsible for any damage resulting from its use. It does not matter if the damage is caused by incorrect usage or a bug in the software.

Table of Contents

1. Introduction

This repository contains scripts to build the packages containing the software components used in moOde audio player.

1.1. Origin and build type

There are several ways in which packages are built and sources obtained.

HowDescriptionOutput
backportDownload source packagedeb+src
cargo-debGit clone source, generate package from rust project with cargo-debdeb
rebuildRebuild from stock package sourcedeb+src
fpmGit clone source, generate package with FPMdeb
gitClone source, contains debian directorydeb+src
git+debsrcClone source, use debian dir from older versiondeb+src
git+dhmakeClone source and create new packagedeb+src
stdebGit clone source, generate package with stdebdeb+src
stockNo need to build, use stock available-

All forms with src as output can be rebuilt from source packages (also present in the repo).

1.2. Overview of the packages that are used

Note: The versions represented in the table are only for example and may not represent the latest versions being used and the table may not contain all the packages in the repo.

PackageVersionHowPatches*
alsa-cdsp1.2.0-1moode1git+dh_makeyes
alsacap1.0.1-1moode1git+dh_make
ashuffle3.12.5-1moode1git+dh_make
bluez5.55-3.1+rpt1stock
bluez-alsa4.2.0-2moode1git+debscr
camilladsp3.0.0-1moode1cargo-deb
camillagui3.0.0-1moode3fpmyes
camillagui-backend1.0.1-1moode1-yes
caps0.9.26-1moode1rebuildyes
libnpupnp26.2.0-1moode1git
librespot0.6.0-1moode1cargo-deb
libupnpp160.26.7-1moode1git
log2ram1.7.2-1moode1git
mediainfo20.09-1stock
minidlna1.3.0+dfsg-2stock
moode-player8.2.5-1moode1git+dh_make
mpc0.33.1stock
mpd0.23.12-1moode1backportyes
mpd2cdspvolume2.0.0-1moode1fpmno
nqptp1.1.0~git20220930.c71b49a-1moode1git+dh_make
pleezer0.11-1moode1cargo-deb
python3-camilladsp3.0.0-1moode1stdeb
python3-camilladsp-plot3.0.0-1moode1stdeb
python3-libupnpp0.21.0-1moode1git
shairport-sync4.3.5-1moode1git+debsrc
squeezelite1.9.9-1449+git20230814.8581aba-1moode1rebuildyes
trx0.6-1moode1git+dh_make
udisks1.0.5-1moode1upportyes
udisks-glue1.3.5-1moode3git+debsrc
upmpdcli1.9.0-1moode1git

Patches* means patches required for the source code and excludes patches for the packing itself. Stock pacakges can be directly used, no need to rebuild.

Note: The camillagui-backend is bundled with the camillagui package.

1.3. Other packages in the repo for example drivers.

PackageVersionHowPatches*Descriptions
aloop5.15.84-1moode1fpmyes384kHz patch for in tree module
ax881795.6.4.2-1moode1gitPatched ax88179_178a driver with Allo SIG suppport.
boss2-oled-p31.0.0-1moode1fpmAllo Boss2 OLED display service
motu-avb1.0-2moode1fpmmotu usb driver for the avb (default not installed)
pcm1794a5.15.84-1moode1fpmyes384kHz patch for in tree module
rpi-source0.1-1moode1gityesFixes to let it work with Python 3. Only needed with development.
rtl88xxau5.6.4.2-1moode1gitRequired for SIG Wifi.
runonce0.1.0-1moode1fpmservice for running scripts once during boot

2. (Re)building packages

Requirements:

  • Pi with Raspbian Lite Bullseye (or a moOde image) installed.
  • Have at least a 32GB SD card (or have NFS mount to your NAS)

2.1. Prepare environment

2.1.1. Update the system

Update the system and install the minimal requirement git:

sudo apt update
sudo apt upgrade
sudo apt -y install git
sudo apt reboot

2.1.2. Clone the pkgbuild tree

In this example we use the moodedev directory to store al moode related project dirs.

Setup a build tree:

mkdir -p ~/moodedev/
cd ~.moodedev
git clone https://github.com/moode-player/pkgbuild.git
cd pkgbuild/scripts

2.1.3. Setup environment settings

  • Copy the scripts/setenv.sh.example to setenv.sh
cp setenv.sh.example setenv.sh
  • Change the content to reflect your settings:
# The var MOODE_DIR refers to the location of the cloned moode source repo
# These commands should be added to ~/.bashrc
export DEBFULLNAME=John
export DEBEMAIL=john@noreply.com
export MOODE_DIR=~/home/pi/mooddev.moode

The latest is the location with the moode player main project it self.

Activate the environment by:

cd ..
. ./scripts/setenv.sh

2.2. Build dependencies

And image below give an overview of most packages. Some packages depends on build and install of others (including dev packages):

package build dep

2.3. Building a package

Go to a package dir in the subdir packages and run the build.sh script

For test try to build alsacap and aloop.

cd packages/alsacap
./build.sh

The output will be in the dist/binary subdirectory.

All dependencies are automatically installed. The first time this will take a while. Especially the kernel packages.

The kernel packages are build for the current active running kernel and expect an offical released kernel for Raspberry Pi OS.

The only exception to the build process is the moOde player it self. It expect that the moode source tree is checkout out in separate directory and the location is set in the setenv.sh script, before it can be packed by the build script from packages/moode-player/build.sh. See the build documentation from moode.

2.4. Deploy package and source

There is a helper script that deploys packages to a Cloudsmith package repository. This requires a Cloudsmith account with access to the moOde repository.

2.4.1. Install Cloudsmith tooling

sudo apt install python3-pip
pip install --upgrade cloudsmith-cli

This will ask your credentials(you need to have permission to upload to the moOde CS repo) to generate an API key.

Logout now and start the ssh session again.

2.4.2. Upload the package

After a package has been built run the deploy command.

cd packages/alsacap
../../scripts/deploy.sh alsacap_1.0.1