0
0
mirror of https://github.com/cucumber-sp/yandex-music-linux.git synced 2024-12-23 14:12:59 +03:00

Rename to yandex-music

This commit is contained in:
Andrey Onishchenko 2024-02-14 14:07:10 +03:00
parent 14f9d1ecfb
commit c5a5568ff9
14 changed files with 83 additions and 83 deletions

View File

@ -29,7 +29,7 @@ case $OS in
mkdir dist
mv *.pkg.tar.zst dist
mv ./src/app/yandexmusic.asar dist/yandexmusic.asar
mv ./src/app/yandex-music.asar dist/yandex-music.asar
mv ./src/app/release_notes.json dist/release_notes.json
sh ./build_deb.sh -a all

View File

@ -64,8 +64,8 @@ jobs:
- uses: DeterminateSystems/magic-nix-cache-action@v2
- name: Build yandexmusic
run: nix build --impure .#yandexmusic
- name: Build yandexmusic without flakes binaries
run: nix build --impure .#yandexmusic-noflakes
- name: Build yandex-music
run: nix build --impure .#yandex-music
- name: Build yandex-music without flakes binaries
run: nix build --impure .#yandex-music-noflakes

View File

@ -41,7 +41,7 @@ jobs:
- name: Publish AUR package
uses: KSXGitHub/github-actions-deploy-aur@v2.7.0
with:
pkgname: "yandexmusic"
pkgname: "yandex-music"
pkgbuild: "PKGBUILD"
updpkgsums: false
allow_empty_commits: false

View File

@ -1,6 +1,6 @@
# Maintainer: Andrey Onischenko loraner123@gmail.com
pkgname=yandexmusic
pkgname=yandex-music
pkgver="5.0.10"
pkgrel="1"
pkgdesc="Yandex Music - Personal recommendations, selections for any occasion and new music"
@ -18,17 +18,17 @@ build() {
}
package() {
mkdir -p "$pkgdir/usr/lib/yandexmusic"
mkdir -p "$pkgdir/usr/lib/yandex-music"
mkdir -p "$pkgdir/usr/share/applications"
mkdir -p "$pkgdir/usr/bin"
install -Dm644 "$srcdir/app/yandexmusic.asar" "$pkgdir/usr/lib/yandexmusic/yandexmusic.asar"
install -Dm644 "$srcdir/app/favicon.png" "$pkgdir/usr/share/pixmaps/yandexmusic.png"
install -Dm644 "$srcdir/yandex-music-linux/templates/desktop" "$pkgdir/usr/share/applications/yandexmusic.desktop"
install -Dm644 "$srcdir/app/yandex-music.asar" "$pkgdir/usr/lib/yandex-music/yandex-music.asar"
install -Dm644 "$srcdir/app/favicon.png" "$pkgdir/usr/share/pixmaps/yandex-music.png"
install -Dm644 "$srcdir/yandex-music-linux/templates/desktop" "$pkgdir/usr/share/applications/yandex-music.desktop"
install -Dm644 "$srcdir/yandex-music-linux/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 'exec electron /usr/lib/yandexmusic/yandexmusic.asar "$@"' >> "$pkgdir/usr/bin/yandexmusic"
chmod 755 "$pkgdir/usr/bin/yandexmusic"
echo "#!/bin/sh" > "$pkgdir/usr/bin/yandex-music"
echo 'exec electron /usr/lib/yandex-music/yandex-music.asar "$@"' >> "$pkgdir/usr/bin/yandex-music"
chmod 755 "$pkgdir/usr/bin/yandex-music"
}

View File

@ -32,12 +32,12 @@ Native YandexMusic client for Linux. Built using repacking of Windows client (El
#### AUR
You can obtain the latest version of package from `AUR` using one of the [AUR Helpers](https://wiki.archlinux.org/title/AUR_helpers). Then install it with `yandexmusic` as package name.
You can obtain the latest version of package from `AUR` using one of the [AUR Helpers](https://wiki.archlinux.org/title/AUR_helpers). Then install it with `yandex-music` as package name.
For this example I will use [yay](https://github.com/Jguer/yay)
```
yay -S yandexmusic
yay -S yandex-music
```
#### Binary package file
@ -47,7 +47,7 @@ Download prebuilt binary package from [Releases](https://github.com/cucumber-sp/
Then you can install it with the following command
```
pacman -U yandexmusic-<version>-any.pkg.tar.zst
pacman -U yandex-music-<version>-any.pkg.tar.zst
```
***
@ -67,7 +67,7 @@ Download prebuilt binary package from [Releases](https://github.com/cucumber-sp/
Then you can install it with the following command
```
dpkg -i yandexmusic_<version>_<arch>.deb
dpkg -i yandex-music_<version>_<arch>.deb
```
***
@ -139,7 +139,7 @@ sh build_deb.sh [-a <x64|armv7l|arm64|all> default=x64]
## Run with nix
The `yandexmusic` package has unlicensed license, so you need to have
The `yandex-music` package has unlicensed license, so you need to have
`allowUnfree` option enabled.
### Run with flakes
@ -152,7 +152,7 @@ nix run github:cucumber-sp/yandex-music-linux
### Run old style
Execute next in this repository to build yandexmusic package without using
Execute next in this repository to build yandex-music package without using
flakes.
```
@ -162,4 +162,4 @@ nix-build --expr '(import <nixpkgs> {}).callPackage ./nix {}'
### Install to NixOS
This flake exports `modules` list. Append it to your system modules and add
`yandexmusic` package to `environment.systemPackages`.
`yandex-music` package to `environment.systemPackages`.

View File

@ -100,84 +100,84 @@ mkdir -p "deb"
#bulding packages
if [ $x64 -eq 1 ]; then
echo "Building x64 package"
pkgdir="$TEMPDIR/yandexmusic-x64"
pkgdir="$TEMPDIR/yandex-music-x64"
mkdir -p "$pkgdir/DEBIAN"
cp "./templates/control" "$pkgdir/DEBIAN/control"
sed -i "s/%version%/$version/g" "$pkgdir/DEBIAN/control"
sed -i "s/%arch%/amd64/g" "$pkgdir/DEBIAN/control"
mkdir -p "$pkgdir/usr/lib/yandexmusic"
mkdir -p "$pkgdir/usr/lib/yandex-music"
mkdir -p "$pkgdir/usr/share/applications"
mkdir -p "$pkgdir/usr/share/licenses/yandexmusic"
mkdir -p "$pkgdir/usr/share/licenses/yandex-music"
mkdir -p "$pkgdir/usr/share/pixmaps"
mkdir -p "$pkgdir/usr/bin"
install -Dm644 "$TEMPDIR/app/yandexmusic.asar" "$pkgdir/usr/lib/yandexmusic/yandexmusic.asar"
install -Dm644 "$TEMPDIR/app/favicon.png" "$pkgdir/usr/share/pixmaps/yandexmusic.png"
install -Dm644 "./templates/desktop" "$pkgdir/usr/share/applications/yandexmusic.desktop"
install -Dm644 "./LICENSE.md" "$pkgdir/usr/share/licenses/yandexmusic/LICENSE"
mv "$TEMPDIR/electron-x64/" "$pkgdir/usr/lib/yandexmusic/electron"
install -Dm644 "$TEMPDIR/app/yandex-music.asar" "$pkgdir/usr/lib/yandex-music/yandex-music.asar"
install -Dm644 "$TEMPDIR/app/favicon.png" "$pkgdir/usr/share/pixmaps/yandex-music.png"
install -Dm644 "./templates/desktop" "$pkgdir/usr/share/applications/yandex-music.desktop"
install -Dm644 "./LICENSE.md" "$pkgdir/usr/share/licenses/yandex-music/LICENSE"
mv "$TEMPDIR/electron-x64/" "$pkgdir/usr/lib/yandex-music/electron"
echo "#!/bin/sh" > "$pkgdir/usr/bin/yandexmusic"
echo 'exec /usr/lib/yandexmusic/electron/electron /usr/lib/yandexmusic/yandexmusic.asar "$@"' >> "$pkgdir/usr/bin/yandexmusic"
chmod 755 "$pkgdir/usr/bin/yandexmusic"
echo "#!/bin/sh" > "$pkgdir/usr/bin/yandex-music"
echo 'exec /usr/lib/yandex-music/electron/electron /usr/lib/yandex-music/yandex-music.asar "$@"' >> "$pkgdir/usr/bin/yandex-music"
chmod 755 "$pkgdir/usr/bin/yandex-music"
dpkg-deb --build "$pkgdir" "deb/yandexmusic_${version}_amd64.deb"
dpkg-deb --build "$pkgdir" "deb/yandex-music_${version}_amd64.deb"
fi
if [ $armv7l -eq 1 ]; then
echo "Building armv7l package"
pkgdir="$TEMPDIR/yandexmusic-armv7l"
pkgdir="$TEMPDIR/yandex-music-armv7l"
mkdir -p "$pkgdir/DEBIAN"
cp "./templates/control" "$pkgdir/DEBIAN/control"
sed -i "s/%version%/$version/g" "$pkgdir/DEBIAN/control"
sed -i "s/%arch%/armhf/g" "$pkgdir/DEBIAN/control"
mkdir -p "$pkgdir/usr/lib/yandexmusic"
mkdir -p "$pkgdir/usr/lib/yandex-music"
mkdir -p "$pkgdir/usr/share/applications"
mkdir -p "$pkgdir/usr/share/licenses/yandexmusic"
mkdir -p "$pkgdir/usr/share/licenses/yandex-music"
mkdir -p "$pkgdir/usr/share/pixmaps"
mkdir -p "$pkgdir/usr/bin"
install -Dm644 "$TEMPDIR/app/yandexmusic.asar" "$pkgdir/usr/lib/yandexmusic/yandexmusic.asar"
install -Dm644 "$TEMPDIR/app/favicon.png" "$pkgdir/usr/share/pixmaps/yandexmusic.png"
install -Dm644 "./templates/desktop" "$pkgdir/usr/share/applications/yandexmusic.desktop"
install -Dm644 "./LICENSE.md" "$pkgdir/usr/share/licenses/yandexmusic/LICENSE"
mv "$TEMPDIR/electron-armv7l/" "$pkgdir/usr/lib/yandexmusic/electron"
install -Dm644 "$TEMPDIR/app/yandex-music.asar" "$pkgdir/usr/lib/yandex-music/yandex-music.asar"
install -Dm644 "$TEMPDIR/app/favicon.png" "$pkgdir/usr/share/pixmaps/yandex-music.png"
install -Dm644 "./templates/desktop" "$pkgdir/usr/share/applications/yandex-music.desktop"
install -Dm644 "./LICENSE.md" "$pkgdir/usr/share/licenses/yandex-music/LICENSE"
mv "$TEMPDIR/electron-armv7l/" "$pkgdir/usr/lib/yandex-music/electron"
echo "#!/bin/sh" > "$pkgdir/usr/bin/yandexmusic"
echo 'exec /usr/lib/yandexmusic/electron/electron /usr/lib/yandexmusic/yandexmusic.asar "$@"' >> "$pkgdir/usr/bin/yandexmusic"
chmod 755 "$pkgdir/usr/bin/yandexmusic"
echo "#!/bin/sh" > "$pkgdir/usr/bin/yandex-music"
echo 'exec /usr/lib/yandex-music/electron/electron /usr/lib/yandex-music/yandex-music.asar "$@"' >> "$pkgdir/usr/bin/yandex-music"
chmod 755 "$pkgdir/usr/bin/yandex-music"
dpkg-deb --build "$pkgdir" "deb/yandexmusic_${version}_armhf.deb"
dpkg-deb --build "$pkgdir" "deb/yandex-music_${version}_armhf.deb"
fi
if [ $arm64 -eq 1 ]; then
echo "Building arm64 package"
pkgdir="$TEMPDIR/yandexmusic-arm64"
pkgdir="$TEMPDIR/yandex-music-arm64"
mkdir -p "$pkgdir/DEBIAN"
cp "./templates/control" "$pkgdir/DEBIAN/control"
sed -i "s/%version%/$version/g" "$pkgdir/DEBIAN/control"
sed -i "s/%arch%/arm64/g" "$pkgdir/DEBIAN/control"
mkdir -p "$pkgdir/usr/lib/yandexmusic"
mkdir -p "$pkgdir/usr/lib/yandex-music"
mkdir -p "$pkgdir/usr/share/applications"
mkdir -p "$pkgdir/usr/share/licenses/yandexmusic"
mkdir -p "$pkgdir/usr/share/licenses/yandex-music"
mkdir -p "$pkgdir/usr/share/pixmaps"
mkdir -p "$pkgdir/usr/bin"
install -Dm644 "$TEMPDIR/app/yandexmusic.asar" "$pkgdir/usr/lib/yandexmusic/yandexmusic.asar"
install -Dm644 "$TEMPDIR/app/favicon.png" "$pkgdir/usr/share/pixmaps/yandexmusic.png"
install -Dm644 "./templates/desktop" "$pkgdir/usr/share/applications/yandexmusic.desktop"
install -Dm644 "./LICENSE.md" "$pkgdir/usr/share/licenses/yandexmusic/LICENSE"
mv "$TEMPDIR/electron-arm64/" "$pkgdir/usr/lib/yandexmusic/electron"
install -Dm644 "$TEMPDIR/app/yandex-music.asar" "$pkgdir/usr/lib/yandex-music/yandex-music.asar"
install -Dm644 "$TEMPDIR/app/favicon.png" "$pkgdir/usr/share/pixmaps/yandex-music.png"
install -Dm644 "./templates/desktop" "$pkgdir/usr/share/applications/yandex-music.desktop"
install -Dm644 "./LICENSE.md" "$pkgdir/usr/share/licenses/yandex-music/LICENSE"
mv "$TEMPDIR/electron-arm64/" "$pkgdir/usr/lib/yandex-music/electron"
echo "#!/bin/sh" > "$pkgdir/usr/bin/yandexmusic"
echo 'exec /usr/lib/yandexmusic/electron/electron /usr/lib/yandexmusic/yandexmusic.asar "$@"' >> "$pkgdir/usr/bin/yandexmusic"
chmod 755 "$pkgdir/usr/bin/yandexmusic"
echo "#!/bin/sh" > "$pkgdir/usr/bin/yandex-music"
echo 'exec /usr/lib/yandex-music/electron/electron /usr/lib/yandex-music/yandex-music.asar "$@"' >> "$pkgdir/usr/bin/yandex-music"
chmod 755 "$pkgdir/usr/bin/yandex-music"
dpkg-deb --build "$pkgdir" "deb/yandexmusic_${version}_arm64.deb"
dpkg-deb --build "$pkgdir" "deb/yandex-music_${version}_arm64.deb"
fi

View File

@ -6,7 +6,7 @@
};
outputs = { self, ymExe, nixpkgs, flake-utils }:
let
yandexmusic-with = pkgs: pkgs.callPackage ./nix {
yandex-music-with = pkgs: pkgs.callPackage ./nix {
inherit ymExe;
};
in
@ -17,17 +17,17 @@
in
{
packages = rec {
yandexmusic = yandexmusic-with pkgs;
yandexmusic-noflakes = pkgs.callPackage ./nix {};
yandex-music = yandex-music-with pkgs;
yandex-music-noflakes = pkgs.callPackage ./nix {};
generate_packages = pkgs.callPackage ./nix/generate_packages.nix {};
default = yandexmusic;
default = yandex-music;
};
}
) // {
modules = [{
nixpkgs.overlays = [
(final: prev: {
yandexmusic = yandexmusic-with prev;
yandex-music = yandex-music-with prev;
})
];
}];

View File

@ -16,7 +16,7 @@ let
in
stdenvNoCC.mkDerivation
{
name = "yandexmusic";
name = "yandex-music";
inherit (version_info) version;
nativeBuildInputs = [
@ -50,19 +50,19 @@ stdenvNoCC.mkDerivation
installPhase = ''
mkdir -p "$out/share/nodejs"
mv app/yandexmusic.asar "$out/share/nodejs"
mv app/yandex-music.asar "$out/share/nodejs"
# use makeWrapper on electron binary to make it call our asar package
makeWrapper "${electron}/bin/electron" "$out/bin/yandexmusic" \
--add-flags "$out/share/nodejs/yandexmusic.asar"
makeWrapper "${electron}/bin/electron" "$out/bin/yandex-music" \
--add-flags "$out/share/nodejs/yandex-music.asar"
mkdir -p "$out/share/pixmaps"
mkdir -p "$out/share/icons/hicolor/48x48/apps/"
cp ./app/favicon.png "$out/share/icons/hicolor/48x48/apps/yandexmusic.png"
ln -s ../icons/hicolor/48x48/apps/yandexmusic.png "$out/share/pixmaps"
cp ./app/favicon.png "$out/share/icons/hicolor/48x48/apps/yandex-music.png"
ln -s ../icons/hicolor/48x48/apps/yandex-music.png "$out/share/pixmaps"
mkdir -p $out/share/applications
cp $desktopItem $out/share/applications/yandexmusic.desktop
cp $desktopItem $out/share/applications/yandex-music.desktop
'';
meta = {

View File

@ -4,7 +4,7 @@ diff --git a/package.json b/package.json
@@ -39,5 +39,6 @@
"COPYRIGHT": "Яндекс Музыка",
"TRADEMARK": "Яндекс Музыка",
"DEEPLINK_PROTOCOL": "yandexmusic"
"DEEPLINK_PROTOCOL": "yandex-music"
- }
+ },
+ "license": "UNLICENSED"

View File

@ -3,7 +3,7 @@ diff --git a/package.json b/package.json
+++ b/package.json
@@ -40,5 +40,9 @@
"TRADEMARK": "Яндекс Музыка",
"DEEPLINK_PROTOCOL": "yandexmusic"
"DEEPLINK_PROTOCOL": "yandex-music"
},
- "license": "UNLICENSED"
+ "license": "UNLICENSED",

View File

@ -125,7 +125,7 @@ fi
echo "Packing"
cd "$curdir"
asar pack "$TEMPDIR/app" "$dst/yandexmusic.asar"
asar pack "$TEMPDIR/app" "$dst/yandex-music.asar"
for ext in png svg; do
mv "$TEMPDIR/app/build/next-desktop/favicon.$ext" "$dst"
done

View File

@ -1,6 +1,6 @@
# Maintainer: Andrey Onischenko loraner123@gmail.com
pkgname=yandexmusic
pkgname=yandex-music
pkgver="%version%"
pkgrel="%release%"
pkgdesc="Yandex Music - Personal recommendations, selections for any occasion and new music"
@ -18,17 +18,17 @@ build() {
}
package() {
mkdir -p "$pkgdir/usr/lib/yandexmusic"
mkdir -p "$pkgdir/usr/lib/yandex-music"
mkdir -p "$pkgdir/usr/share/applications"
mkdir -p "$pkgdir/usr/bin"
install -Dm644 "$srcdir/app/yandexmusic.asar" "$pkgdir/usr/lib/yandexmusic/yandexmusic.asar"
install -Dm644 "$srcdir/app/favicon.png" "$pkgdir/usr/share/pixmaps/yandexmusic.png"
install -Dm644 "$srcdir/yandex-music-linux/templates/desktop" "$pkgdir/usr/share/applications/yandexmusic.desktop"
install -Dm644 "$srcdir/app/yandex-music.asar" "$pkgdir/usr/lib/yandex-music/yandex-music.asar"
install -Dm644 "$srcdir/app/favicon.png" "$pkgdir/usr/share/pixmaps/yandex-music.png"
install -Dm644 "$srcdir/yandex-music-linux/templates/desktop" "$pkgdir/usr/share/applications/yandex-music.desktop"
install -Dm644 "$srcdir/yandex-music-linux/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 'exec electron /usr/lib/yandexmusic/yandexmusic.asar "$@"' >> "$pkgdir/usr/bin/yandexmusic"
chmod 755 "$pkgdir/usr/bin/yandexmusic"
echo "#!/bin/sh" > "$pkgdir/usr/bin/yandex-music"
echo 'exec electron /usr/lib/yandex-music/yandex-music.asar "$@"' >> "$pkgdir/usr/bin/yandex-music"
chmod 755 "$pkgdir/usr/bin/yandex-music"
}

View File

@ -1,4 +1,4 @@
Package: yandexmusic
Package: yandex-music
Version: %version%
Section: sound
Priority: optional

View File

@ -4,8 +4,8 @@ Name[ru]=Яндекс Музыка
Comment=Yandex Music — we collect music for you
Comment[ru]=Яндекс Музыка — собираем музыку для вас
GenericName=YandexMusic
Exec=yandexmusic %U
Icon=yandexmusic
Exec=yandex-music %U
Icon=yandex-music
Type=Application
StartupNotify=true
Categories=Audio;Music;Player;AudioVideo