当前位置:首页 > HIFI > 正文内容

构建自己的moOde播放器

tomosak1年前 (2024-02-17)HIFI1264


本文档解释了如何moOde-player从源代码构建包。

1. Pre conditions

Assumed you performing the build from a running Raspberry Pi OS bullseye.

You should have both the moode main source and the pkgbuild repo cloned.

git clone https://github.com/moode-player/moode.git
git clone https://github.com/moode-player/pkgbuild.git

For bullseye some changes are required to the moode project itself, because php is bumped from 7.3 to version 7.4 and some services had another name.

You have the following enviroment settings set:

export DEBFULLNAME=Fooexport DEBEMAIL=foo@bar.orgexport MOODE_DIR=~/yourpathto/moode

2. Building the package

2.1. Where and how to make changes to the package

The current content and actions of the package can be found it the follow two scripts:

  • pkgbuild/packages/moode-player/build.sh

  • pkgbuild/packages/moode-player/postinstall.sh

2.1.1. build.sh

This one creates the package and does the following:

  1. Responsible for what files are copied by coping the required files to a fake root dir ($PKG_ROOT_DIR).

  2. List dependencies (multiple fpm --depends argument) to be installed.

  3. Create a package (with fpm ) containing the files from the fake root dir (the fpm command on the bottom of the file)

Almost all configuration files aren't copied to /etc and /lib but to /usr/share/moode-player.

2.1.2. postinstall.sh

This one is included by the package and executed after install as part of the deb install process (fpm --after-install argument).

This file should fix things like:

  • file rights

  • disable/enable services

  • create links

  • create dir structure / touch files etc

  • update setting in files etc

  • when needed copy files /usr/share/moode-player to the correct location in /etc|/lib. This part is far from finsished.

2.1.3. Background information:

Especially the last part is far from finished. I followed for the other stuff most of mosbuild script, but not everything in the mosbuild is needed any more. (Attached it the mosbuild status, everything that is made comment is ... covered I think ;-)

A lot of the third-party packages provide now their own defaults files and or file structure (and by this not always correct for moode). But how more we can adapt to that the less painful software upgrades and migration to new distro version will become.

Package don't allow that a files is owned by two packages. That is why I copies the config files to /usr/share/moode-player. Then we can updates postinstall.sh to copy those, selective, to the correct location. Also updates to files in /etc are treated different then in other locations.

But when a config (for example because the default is already ok) is not needed we shouldn't copy it. And when possible I prefer changing (with sed or so) the default config file as opposed to replacing it. But that is only possible when a limited number of changes are required.

In case we need to 'own' an already existing file we can use the dpkg-divert command.

2.2. Build options

Default (at least it should become default, currently it is turned off see the two vars below) it also:

  1. if not already present installs npm for building the front end app

  2. installs clean required npm modules (in $MOODE_DIR/.npm_modules)

  3. build the frontend app

Step 2 and 3 can take some time.

You can change this in build.sh by changing the two vars below to 0.

# sync required npm modules for gulp buildNPM_CI=0# build web app with gulpBUILD_APP=0

2.3. Building

The build process install required dependencies the first it runs.

cd pkgbuild/packages/moode-player
./build.sh

3. Installing the moode-player package

3.1. Local Installation on a fresh running debian image

The current package is prepared to be updated or reinstalled, this will come when we have a working package. To be sure it you ar developing first remove the package:

sudo apt remove moode-player

Installation

sudo apt update
sudo apt upgrade

sudo apt install ./dist/binary/moode-player_*_armhf.deb
sudo reboot

When install

3.2. Installation from a repo on a fresh running debian image :

If the package is deployed to Cloudsmith you can installed as below:

curl -1sLf \'https://dl.cloudsmith.io/public/moodeaudio/m8y/setup.deb.sh' \| sudo -E distro=raspbian codename=bullseye bash

sudo apt update
sudo apt upgrade

sudo apt install moode-player
sudo reboot




扫描二维码推送至手机访问。

版权声明:本文由Androidnews发布,如需转载请注明出处。

本文链接:https://www.androidnews.top/?id=48

分享给朋友:

“构建自己的moOde播放器” 的相关文章

[S905X]私家云2免拆刷机使用攻略

[S905X]私家云2免拆刷机使用攻略

1、下载地址:链接: https://pan.baidu.com/s/1szVDmA80ubi2jg6GciEn2Q?pwd=skn3 提取码: skn32、--来自百度网盘超级会员v6的分享3、到手后不要联网,不管是有线还是无线;4、准备一套无线鼠标键盘套装,罗技最好;5、电脑...

正确看待音响器材的测试数据

正确看待音响器材的测试数据

如果懒得看长文,记住一个最基本的道理即可:用仪器测试音响器材,用的是简单的正弦波信号(THD等测试),而真正播放音乐是高度动态变化的,而功放/耳放所驱动的音箱、耳机,从阻抗到低频响应特性等等都是具有极大差别。所以唯数据论是很低级的行为,特别是某些人更幼稚到把THD失真数据来做音箱器材声音水平的“排名...

构建自己的moode-player包

构建自己的moode-player包

1. IntroductionThis repository contains scripts to build the packages containing the software components used in moOde audio player.1.1. Origin and bu...

Linux进程管理工具Supervisor使用

安装sudo apt install supervisor进入supervisor配置目录 cd /etc/supervisornano supervisor.conf添加以下行,开启web管理[inet_http_server] port=10.1.11.209:80 us...

ARM系列主板安装moOde等数播系统

ARM系列主板安装moOde等数播系统 ver:1.0.3 by:Androidnews 2024.08.18 说明: 本安装教程不保证所有arm主板都能安装成功; 本安装教程虽然劲量简单,但是还是需要一定的Linux功底; 本安装教程以Debian的bookworm为基底实现,如...

发表评论

访客

◎欢迎参与讨论,请在这里发表您的看法和观点。