diff options
author | Core | 2022-06-26 18:36:34 +0100 |
---|---|---|
committer | Core | 2022-06-26 18:36:34 +0100 |
commit | cf4b83a71031489f4a7876d636353cd0d038cf40 (patch) | |
tree | 4e2922bd5ce9b834555fc94fc1a39f15978e8027 | |
parent | da5b0ffe3e03fa55e065142a9aa10ad5fd565187 (diff) | |
download | aur-cf4b83a71031489f4a7876d636353cd0d038cf40.tar.gz |
Moved to stable branch
-rw-r--r-- | .SRCINFO | 10 | ||||
-rw-r--r-- | PKGBUILD | 103 | ||||
-rw-r--r-- | cider.desktop | 4 |
3 files changed, 76 insertions, 41 deletions
@@ -1,5 +1,5 @@ pkgbase = cider - pkgdesc = Project Cider. An open-source Apple Music client built from the ground up with Vue.js and Electron. Installed using the debian release builds from CircleCI. + pkgdesc = Project Cider. An open-source Apple Music client built from the ground up with Vue.js and Electron. Compiled from the GitHub repositories stable branch. pkgver = 1.5.1 pkgrel = 1 url = https://github.com/CiderApp/Cider.git @@ -7,11 +7,15 @@ pkgbase = cider arch = i686 arch = x86_64 license = GPL + makedepends = git + makedepends = npm + makedepends = yarn depends = gtk3 depends = nss - depends = wget optdepends = libnotify: Playback notifications + source = git+https://github.com/CiderApp/Cider.git#branch=stable source = cider.desktop - sha256sums = 7bf97dfa92b312ceb95d005a8aa7f225af079ee450f38b58b894e951a529d997 + sha256sums = SKIP + sha256sums = c41e9b1019411019fce8509e32f770edf33c9e864bf707c30ffe2e3f2dcf1571 pkgname = cider @@ -2,56 +2,87 @@ pkgname=cider _pkgname=Cider -pkgver=1.5.1 +pkgver=1.5.0 pkgrel=1 -pkgdesc="Project Cider. An open-source Apple Music client built from the ground up with Vue.js and Electron. Installed using the debian release builds from CircleCI." +pkgdesc="Project Cider. An open-source Apple Music client built from the ground up with Vue.js and Electron. Compiled from the GitHub repositories stable branch." arch=("armv7h" "i686" "x86_64") url="https://github.com/CiderApp/${_pkgname}.git" -_url="https://api.github.com/repos/ciderapp/cider-releases/releases/latest" -license=('GPL') -depends=('gtk3' 'nss' 'wget') +license=("GPL") +depends=('gtk3' 'nss') +makedepends=('git' 'npm' 'yarn') optdepends=('libnotify: Playback notifications') -source=("cider.desktop") -sha256sums=('7bf97dfa92b312ceb95d005a8aa7f225af079ee450f38b58b894e951a529d997') +source=( + "git+https://github.com/CiderApp/${_pkgname}.git#branch=stable" + "cider.desktop" +) +sha256sums=('SKIP' + 'c41e9b1019411019fce8509e32f770edf33c9e864bf707c30ffe2e3f2dcf1571') pkgver() { - curl -s $_url | grep tag_name | cut -d '"' -f 4 | sed 's/v//' | sed 's/\-/./g' | xargs + cd "$srcdir/$_pkgname" + LATEST_SHA=$(curl -s https://api.github.com/repos/ciderapp/Cider/branches/stable | grep sha | cut -d '"' -f 4 | sed 's/v//' | xargs | cut -d' ' -f1) + COMMITSINCESTABLE=$(git rev-list $LATEST_SHA..HEAD --count) + CURRENT_VERSION=$(node -p -e "require('./package.json').version") + if [[ $COMMITSINCESTABLE -gt 0 ]]; then + if [[ $CURRENT_VERSION == *"beta"* ]]; then + NEW_VERSION="${CURRENT_VERSION%.*}.$COMMITSINCESTABLE" + else + NEW_VERSION="${CURRENT_VERSION}-beta.${COMMITSINCESTABLE}" + fi + echo ${NEW_VERSION//-/.} + sed -i "0,/$CURRENT_VERSION/s//$NEW_VERSION/" package.json + else + echo ${CURRENT_VERSION/0/$COMMITSINCESTABLE} + fi + } build() { - cd "$srcdir" - - # Download the latest debian package - echo "Building ${_pkgname} on v${pkgver} : [Downloading Debian Package] | Extracting Package | Done" - curl -s $_url | - grep "browser_download_url.*deb" | - cut -d : -f 2,3 | - tr -d \" | - wget -qi - - - # Extract the package - echo "Building ${_pkgname} on v${pkgver} : Downloading Debian Package | [Extracting Package] | Done" - ar vx *.deb - echo "Building ${_pkgname} on v${pkgver} : Downloading Debian Package | Extracting Package | [Done]" - - # Fetch the Various Useful Files - echo "Fetching additional Files" - curl -s https://raw.githubusercontent.com/CiderApp/cider/master/README.md > README - curl -s https://raw.githubusercontent.com/CiderApp/cider/master/LICENSE > LICENSE - curl -s https://raw.githubusercontent.com/CiderApp/cider/master/resources/icons/cider.png > icon.png + cd "${srcdir}/${_pkgname}" + + if [ -f cider.lock ]; then + mv cider.lock yarn.lock + fi + + echo "Building ${_pkgname} on v${pkgver} : [Install Build Dependencies] | Build | Done" + yarn install --non-interactive --pure-lockfile --cache-folder "${srcdir}/yarn-cache" + + echo "Building : Install Build Dependencies | [Build] | Done" + if [[ ${CARCH} == "armv7h" ]]; then + yarn build + yarn electron-builder build --armv7l --linux dir + elif [[ ${CARCH} == "i686" ]]; then + yarn build + yarn electron-builder build --ia32 --linux dir + elif [[ ${CARCH} == "x86_64" ]]; then + yarn build + yarn electron-builder build --x64 --linux dir + fi + + echo "Building : Install Build Dependencies | Build | [Done]" } package() { - # Extract package data - tar -xJ -f data.tar.xz -C "${pkgdir}" + cd "${srcdir}/${_pkgname}" - install -d "$pkgdir/usr/bin/" - ln -sf "/opt/${_pkgname}/${pkgname}" "${pkgdir}/usr/bin/${pkgname}" + echo "Packaging : [Desktop Shortcut] | Icon | Build Files | Other Files | Done" + install -Dm644 "${srcdir}/${pkgname%-git}.desktop" "${pkgdir}/usr/share/applications/${pkgname%-git}.desktop" + + echo "Packaging : Desktop Shortcut | [Icon] | Build Files | Other Files | Done" + install -Dm644 "${srcdir}/${_pkgname}/resources/icons/icon.png" "${pkgdir}/usr/share/icons/hicolor/256x256/apps/${pkgname%-git}.png" - # Desktop File - install -Dm644 "${srcdir}/${pkgname}.desktop" "${pkgdir}/usr/share/applications/${pkgname}.desktop" + echo "Packaging : Desktop Shortcut | Icon | [Build Files] | Other Files | Done" + install -d "$pkgdir/opt/" + install -d "$pkgdir/usr/bin/" + cd ${srcdir}/${_pkgname}/dist/linux-unpacked + mkdir "${pkgdir}/opt/${pkgname%-git}" + cp -r --preserve=mode * "${pkgdir}/opt/${pkgname%-git}" + ln -sf "/opt/${pkgname%-git}/${pkgname%-git}" "${pkgdir}/usr/bin/${pkgname%-git}" + echo "Packaging : Desktop Shortcut | Icon | Build Files | [Other Files] | Done" install -d "$pkgdir/usr/share/licenses" "$pkgdir/usr/share/doc" - install -Dm644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" - install -Dm644 "${srcdir}/README" "${pkgdir}/usr/share/doc/${pkgname}/README.md" + install -Dm644 "${srcdir}/${_pkgname}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" + install -Dm644 "${srcdir}/${_pkgname}/README.md" "${pkgdir}/usr/share/doc/${pkgname}/README.md" + + echo "Packaging : Desktop Shortcut | Icon | Build Files | Other Files | [Done]" } diff --git a/cider.desktop b/cider.desktop index 63e3d42ac52d..cdd8d7c57594 100644 --- a/cider.desktop +++ b/cider.desktop @@ -3,8 +3,8 @@ Name=Cider StartupWMClass=Cider Comment=Project Cider. A new look into listening and enjoying music in style and performance. GenericName=Music Player -Exec=/opt/Cider/cider %U +Exec=/usr/bin/cider %U Icon=cider Type=Application Categories=Audio;Music;Player;AudioVideo;Network; -MimeType=x-scheme-handler/ame;x-scheme-handler/cider;x-scheme-handler/itms;x-scheme-handler/itmss;x-scheme-handler/musics;x-scheme-handler/music;
\ No newline at end of file +MimeType=x-scheme-handler/ame;x-scheme-handler/cider;x-scheme-handler/itms;x-scheme-handler/itmss;x-scheme-handler/musics;x-scheme-handler/music; |