Package Details: ncmdump-git 2:1.3.2-1

Git Clone URL: https://aur.archlinux.org/ncmdump-git.git (read-only, click to copy)
Package Base: ncmdump-git
Description: Convert Netease Cloud Music ncm files to mp3/flac files.
Upstream URL: https://github.com/taurusxin/ncmdump
Keywords: music
Licenses: MIT
Conflicts: ncmdump
Provides: ncmdump
Submitter: haruue
Maintainer: Pig2014
Last Packager: Pig2014
Votes: 3
Popularity: 0.000002
First Submitted: 2019-04-01 06:31 (UTC)
Last Updated: 2024-08-14 00:44 (UTC)

Dependencies (1)

Required by (0)

Sources (1)

Latest Comments

sanbikappa commented on 2024-08-16 17:06 (UTC)

As this is a *-git package, please add a pkgver() to update the package version automatically. Besides, if you want to build the project with "-j" option, for system stability, I suggest only use half of CPUs to build the package.

pkgname=ncmdump-git
_basename="${pkgname%-git}"
pkgver=1.3.2.r2.g0a6ac35
pkgrel=1
pkgdesc='Convert Netease Cloud Music ncm files to mp3/flac files.'
arch=('any')
url='https://github.com/taurusxin/ncmdump'
conflicts=("$_basename" "${_basename}-bin")
provides=("$_basename")
license=('MIT')
makedepends=('git' 'cmake')
source=("$_basename"::'git+https://github.com/taurusxin/ncmdump')
sha256sums=('SKIP')

pkgver() {
  cd "$srcdir/$_basename"
  git describe --long --abbrev=7 | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

prepare() {
  cd "$srcdir/$_basename"
  git submodule update --init --recursive --progress
}

build() {
  # use multi job compile
  CPU=$(grep 'processor' /proc/cpuinfo | wc -l)
  JOBNUMBER=$(($CPU/2))
  if [ $JOBNUMBER -lt 1 ]; then
      JOBNUMBER=1
  fi

  cd "$srcdir"
  cmake -S "$_basename" -B build -DCMAKE_BUILD_TYPE=Release
  cmake --build build -j $JOBNUMBER
}

package() {
  install -Dm755 "$srcdir/build/ncmdump" "$pkgdir/usr/bin/ncmdump"
}