2020-05-25 21:39:33 +02:00
|
|
|
# Maintainer: leonekmi <usingarchbtw@leonekmi.fr>
|
|
|
|
pkgname=karaokemugen
|
2021-04-25 16:00:56 +02:00
|
|
|
pkgver=5.0.33
|
2021-04-25 16:27:16 +02:00
|
|
|
pkgrel=2
|
2020-05-25 21:39:33 +02:00
|
|
|
pkgdesc="Karaoke playlist manager/player app used in parties or events."
|
2021-04-25 16:00:56 +02:00
|
|
|
arch=('x86_64')
|
2020-05-25 21:39:33 +02:00
|
|
|
url="https://mugen.karaokes.moe/"
|
|
|
|
license=('MIT')
|
|
|
|
groups=()
|
2021-04-25 16:00:56 +02:00
|
|
|
depends=('mpv' 'ffmpeg' 'postgresql' 'electron11')
|
|
|
|
makedepends=('git' 'npm' 'typescript' 'yarn' 'nodejs>=12' 'python2' 'patch')
|
2020-05-25 21:39:33 +02:00
|
|
|
optdepends=('sudo: for using karaokemugen-install script')
|
2020-07-17 14:59:07 +02:00
|
|
|
provides=()
|
|
|
|
conflicts=()
|
2020-05-25 21:39:33 +02:00
|
|
|
replaces=()
|
|
|
|
backup=()
|
|
|
|
options=()
|
2020-07-17 14:59:07 +02:00
|
|
|
install=${pkgname}.install
|
2021-04-25 16:00:56 +02:00
|
|
|
source=('karaokemugen::git+https://lab.shelter.moe/karaokemugen/karaokemugen-app.git#tag=v5.0.33'
|
2020-05-25 21:39:33 +02:00
|
|
|
'karaokemugen-lib::git+https://lab.shelter.moe/karaokemugen/lib.git'
|
2021-04-25 16:00:56 +02:00
|
|
|
'karaokemugen-avatars::git+https://lab.shelter.moe/karaokemugen/medias/guest-avatars.git'
|
2020-05-25 21:39:33 +02:00
|
|
|
'install.sh'
|
|
|
|
'run.sh'
|
|
|
|
'icon256.png'
|
2021-04-25 16:00:56 +02:00
|
|
|
'karaokemugen.desktop'
|
|
|
|
'appPath.patch')
|
2020-05-25 21:39:33 +02:00
|
|
|
noextract=()
|
|
|
|
md5sums=('SKIP'
|
|
|
|
'SKIP'
|
2021-04-25 16:00:56 +02:00
|
|
|
'SKIP'
|
|
|
|
'4ad5390b139dc5b5e78e6eef8411e90b'
|
2021-04-25 16:27:16 +02:00
|
|
|
'55557823030b7824a85a55469e119cb4'
|
2020-05-25 21:39:33 +02:00
|
|
|
'5e9a33a42fef7572b7e0fa504c586f32'
|
2021-04-25 16:00:56 +02:00
|
|
|
'10561eed906a5efeed427f90501b4f49'
|
|
|
|
'1c331f8ccc9b3157ac0d9af4b559dd69')
|
2020-05-25 21:39:33 +02:00
|
|
|
|
|
|
|
prepare() {
|
|
|
|
cd "$srcdir/${pkgname}"
|
|
|
|
git submodule init
|
|
|
|
git config submodule.src/lib.url $srcdir/${pkgname}-lib
|
2021-04-25 16:00:56 +02:00
|
|
|
git config submodule.assets/guestAvatars.url $srcdir/${pkgname}-avatars
|
2020-05-25 21:39:33 +02:00
|
|
|
git submodule update
|
2021-04-25 16:00:56 +02:00
|
|
|
# Apply appPath patch
|
|
|
|
patch "$srcdir/${pkgname}/src/index.ts" "$srcdir/appPath.patch"
|
2020-05-25 21:39:33 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
|
|
|
cd "$srcdir/${pkgname}"
|
|
|
|
|
|
|
|
# Prepare dependencies
|
|
|
|
export HOME="$srcdir/$pkgname-home"
|
|
|
|
export XDG_CACHE_HOME="$srcdir/$pkgname-cache"
|
|
|
|
export npm_config_devdir="$srcdir/$pkgname-npm-dev"
|
|
|
|
export npm_config_cache="$srcdir/$pkgname-npm-cache"
|
2021-04-25 16:27:16 +02:00
|
|
|
yarn install --ignore-scripts --frozen-lockfile
|
2021-04-25 16:00:56 +02:00
|
|
|
yarn add --dev electron-builder
|
|
|
|
yarn installkmfrontend
|
2020-05-25 21:39:33 +02:00
|
|
|
# Build and package with electron-builder
|
|
|
|
export NODE_ENV='production'
|
2021-04-25 16:00:56 +02:00
|
|
|
electronVer=$(electron11 --version | tail -c +2)
|
2020-05-25 21:39:33 +02:00
|
|
|
yarn build
|
2021-04-25 16:00:56 +02:00
|
|
|
yarn buildkmfrontend
|
|
|
|
yarn electron-builder --linux --x64 -c.electronDist=/usr/lib/electron11 -c.electronVersion=$electronVer --dir
|
2020-05-25 21:39:33 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
|
|
|
cd "$srcdir/${pkgname}"
|
|
|
|
|
|
|
|
# Application itself
|
|
|
|
install -dm755 "$pkgdir/usr/lib/${pkgname}"
|
|
|
|
cp -dr --no-preserve=ownership packages/linux-unpacked/resources/* "$pkgdir/usr/lib/${pkgname}/"
|
|
|
|
chmod -R 755 "$pkgdir/usr/lib/${pkgname}/"
|
|
|
|
|
|
|
|
# License
|
|
|
|
install -dm755 "$pkgdir/usr/share/licenses/${pkgname}"
|
|
|
|
install -m644 LICENSE.md "$pkgdir/usr/share/licenses/${pkgname}/LICENSE"
|
|
|
|
|
|
|
|
# Runtimes
|
|
|
|
install -dm755 "$pkgdir/usr/bin/"
|
|
|
|
install -m755 "$srcdir/run.sh" "$pkgdir/usr/bin/karaokemugen"
|
|
|
|
install -m755 "$srcdir/install.sh" "$pkgdir/usr/bin/karaokemugen-install"
|
|
|
|
|
|
|
|
# .desktop entry
|
|
|
|
install -dm755 "$pkgdir/usr/share/pixmaps/"
|
|
|
|
install -dm755 "$pkgdir/usr/share/applications/"
|
|
|
|
install -m644 "$srcdir/icon256.png" "$pkgdir/usr/share/pixmaps/${pkgname}.png"
|
|
|
|
install -m644 "$srcdir/${pkgname}.desktop" "$pkgdir/usr/share/applications/${pkgname}.desktop"
|
2020-07-17 14:59:07 +02:00
|
|
|
}
|