mirror of
https://github.com/cucumber-sp/yandex-music-linux.git
synced 2025-01-11 22:41:03 +03:00
Update packages script
This commit is contained in:
parent
ceb7c569e1
commit
59c446c8f7
37
PKGBUILD
Normal file
37
PKGBUILD
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
# Maintainer: Andrey Onischenko loraner123@gmail.com
|
||||||
|
|
||||||
|
pkgname=yandexmusic
|
||||||
|
pkgver="5.0.8"
|
||||||
|
pkgrel="1"
|
||||||
|
pkgdesc="Yandex Music Client"
|
||||||
|
arch=("any")
|
||||||
|
url="https://github.com/cucumber-sp/yandex-music-linux"
|
||||||
|
license=("custom")
|
||||||
|
depends=("electron" "libpulse")
|
||||||
|
makedepends=("p7zip" "nodejs" "jq")
|
||||||
|
|
||||||
|
source=("https://music-desktop-application.s3.yandex.net/stable/Yandex_Music_x64_5.0.8.exe")
|
||||||
|
sha256sums=("78b4e1acb61becbbddeb6f48e9d2b55ed7d718cd99c205b89a94f7c3af9df803")
|
||||||
|
|
||||||
|
prepare() {
|
||||||
|
npm install @electron/asar;
|
||||||
|
}
|
||||||
|
|
||||||
|
build() {
|
||||||
|
sh "$srcdir/repack.sh" "Yandex_Music_x64_5.0.8.exe"
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
mkdir -p "$pkgdir/usr/lib/yandexmusic"
|
||||||
|
mkdir -p "$pkgdir/usr/share/applications"
|
||||||
|
mkdir -p "$pkgdir/usr/bin"
|
||||||
|
|
||||||
|
install -Dm644 "$srcdir/out/yandexmusic.asar" "$pkgdir/usr/lib/yandexmusic/yandexmusic.asar"
|
||||||
|
install -Dm644 "$srcdir/out/yandexmusic.desktop" "$pkgdir/usr/share/applications/yandexmusic.desktop"
|
||||||
|
install -Dm644 "$srcdir/LICENSE.md" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
||||||
|
|
||||||
|
# Create a script to launch the app with Electron
|
||||||
|
echo "#!/bin/sh" > "$pkgdir/usr/bin/yandexmusic"
|
||||||
|
echo "electron /usr/lib/yandexmusic/yandexmusic.asar" >> "$pkgdir/usr/bin/yandexmusic"
|
||||||
|
chmod 755 "$pkgdir/usr/bin/yandexmusic"
|
||||||
|
}
|
41
generate_packages.sh
Normal file
41
generate_packages.sh
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
rm -rf ./tmp
|
||||||
|
mkdir ./tmp
|
||||||
|
|
||||||
|
# loading json from file https://music-desktop-application.s3.yandex.net/stable/download.json
|
||||||
|
curl -s https://music-desktop-application.s3.yandex.net/stable/download.json > ./tmp/download.json
|
||||||
|
|
||||||
|
exe_link=$(jq -r '.windows' ./tmp/download.json)
|
||||||
|
version=$(echo $exe_link | grep -oP '(?<=x64_).*(?=.exe)')
|
||||||
|
exe_name=$(basename $exe_link)
|
||||||
|
|
||||||
|
echo "Windows url: $exe_link"
|
||||||
|
echo "Version: $version"
|
||||||
|
echo "Exe name: $exe_name"
|
||||||
|
|
||||||
|
curl $exe_link > ./tmp/$exe_name
|
||||||
|
|
||||||
|
exe_sha256=$(sha256sum ./tmp/$exe_name | awk '{print $1}')
|
||||||
|
|
||||||
|
echo "Exe sha256: $exe_sha256"
|
||||||
|
|
||||||
|
rm -rf ./version_info.json
|
||||||
|
|
||||||
|
echo "{
|
||||||
|
\"version\": \"$version\",
|
||||||
|
\"exe_name\": \"$exe_name\",
|
||||||
|
\"exe_link\": \"$exe_link\",
|
||||||
|
\"exe_sha256\": \"$exe_sha256\"
|
||||||
|
}" > ./version_info.json
|
||||||
|
|
||||||
|
rm -rf ./PKGBUILD
|
||||||
|
cp ./templates/PKGBUILD ./PKGBUILD
|
||||||
|
|
||||||
|
sed -i "s#%version%#$version#g" ./PKGBUILD
|
||||||
|
sed -i "s#%release%#1#g" ./PKGBUILD
|
||||||
|
sed -i "s#%exe_name%#$exe_name#g" ./PKGBUILD
|
||||||
|
sed -i "s#%exe_link%#$exe_link#g" ./PKGBUILD
|
||||||
|
sed -i "s#%exe_sha256%#$exe_sha256#g" ./PKGBUILD
|
||||||
|
|
||||||
|
rm -rf ./tmp
|
@ -1,8 +1,8 @@
|
|||||||
# Maintainer: Andrey Onischenko loraner123@gmail.com
|
# Maintainer: Andrey Onischenko loraner123@gmail.com
|
||||||
|
|
||||||
pkgname=yandexmusic-bin
|
pkgname=yandexmusic
|
||||||
pkgver=VERSION
|
pkgver="%version%"
|
||||||
pkgrel=RELEASE_NUMBER
|
pkgrel="%release%"
|
||||||
pkgdesc="Yandex Music Client"
|
pkgdesc="Yandex Music Client"
|
||||||
arch=("any")
|
arch=("any")
|
||||||
url="https://github.com/cucumber-sp/yandex-music-linux"
|
url="https://github.com/cucumber-sp/yandex-music-linux"
|
||||||
@ -10,31 +10,25 @@ license=("custom")
|
|||||||
depends=("electron" "libpulse")
|
depends=("electron" "libpulse")
|
||||||
makedepends=("p7zip" "nodejs" "jq")
|
makedepends=("p7zip" "nodejs" "jq")
|
||||||
|
|
||||||
source=("https://music-desktop-application.s3.yandex.net/stable/Yandex_Music_x64_$pkgver.exe" "https://github.com/cucumber-sp/yandex-music-linux/archive/v$pkgver-$pkgrel.tar.gz")
|
source=("%exe_link%")
|
||||||
sha256sums=("EXE_HASH" "SOURCE_HASH")
|
sha256sums=("%exe_sha256%")
|
||||||
|
|
||||||
prepare() {
|
prepare() {
|
||||||
npm install @electron/asar;
|
npm install @electron/asar;
|
||||||
}
|
}
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
arch_dir="yandex-music-linux-$pkgver-$pkgrel"
|
sh "$srcdir/repack.sh" "%exe_name%"
|
||||||
mv "$srcdir/Yandex_Music_x64_$pkgver.exe" "$srcdir/$arch_dir"
|
|
||||||
cd "$srcdir/$arch_dir"
|
|
||||||
sh "./repack.sh" "Yandex_Music_x64_$pkgver.exe"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
package() {
|
package() {
|
||||||
arch_dir="yandex-music-linux-$pkgver-$pkgrel"
|
|
||||||
mkdir -p "$pkgdir/usr/lib/yandexmusic"
|
mkdir -p "$pkgdir/usr/lib/yandexmusic"
|
||||||
mkdir -p "$pkgdir/usr/share/applications"
|
mkdir -p "$pkgdir/usr/share/applications"
|
||||||
mkdir -p "$pkgdir/usr/bin"
|
mkdir -p "$pkgdir/usr/bin"
|
||||||
|
|
||||||
install -Dm644 "$srcdir/$arch_dir/out/yandexmusic.asar" "$pkgdir/usr/lib/yandexmusic/yandexmusic.asar"
|
install -Dm644 "$srcdir/out/yandexmusic.asar" "$pkgdir/usr/lib/yandexmusic/yandexmusic.asar"
|
||||||
install -Dm644 "$srcdir/$arch_dir/out/yandexmusic.desktop" "$pkgdir/usr/share/applications/yandexmusic.desktop"
|
install -Dm644 "$srcdir/out/yandexmusic.desktop" "$pkgdir/usr/share/applications/yandexmusic.desktop"
|
||||||
install -Dm644 "$srcdir/$arch_dir/LICENSE.md" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
install -Dm644 "$srcdir/LICENSE.md" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
||||||
|
|
||||||
rm -rf "$srcdir/$arch_dir"
|
|
||||||
|
|
||||||
# Create a script to launch the app with Electron
|
# Create a script to launch the app with Electron
|
||||||
echo "#!/bin/sh" > "$pkgdir/usr/bin/yandexmusic"
|
echo "#!/bin/sh" > "$pkgdir/usr/bin/yandexmusic"
|
||||||
|
6
version_info.json
Normal file
6
version_info.json
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"version": "5.0.8",
|
||||||
|
"exe_name": "Yandex_Music_x64_5.0.8.exe",
|
||||||
|
"exe_link": "https://music-desktop-application.s3.yandex.net/stable/Yandex_Music_x64_5.0.8.exe",
|
||||||
|
"exe_sha256": "78b4e1acb61becbbddeb6f48e9d2b55ed7d718cd99c205b89a94f7c3af9df803"
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user