diff options
author | Kimiblock | 2023-03-22 20:37:25 +0800 |
---|---|---|
committer | Kimiblock | 2023-03-22 20:37:25 +0800 |
commit | e269a0dd98bfca7df257ce78e9eb92c2ed4800c6 (patch) | |
tree | 7b4fde6c45d9d5f08740881860e63cbb9aa642f6 | |
download | aur-e269a0dd98bfca7df257ce78e9eb92c2ed4800c6.tar.gz |
Initial commit
-rw-r--r-- | .SRCINFO | 19 | ||||
-rwxr-xr-x | PKGBUILD | 62 |
2 files changed, 81 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..b56d4a36e47f --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,19 @@ +pkgbase = qcm-git + pkgdesc = Qt client for netease cloud music + pkgver = r25.5d17e9b + pkgrel = 1 + url = https://github.com/hypengw/Qcm + arch = x86_64 + makedepends = git + makedepends = cmake + makedepends = ninja + depends = qt6-base + depends = hicolor-icon-theme + depends = curl + depends = openssl + depends = qt6-tools + provides = qcm + source = git+https://github.com/hypengw/Qcm.git + sha256sums = SKIP + +pkgname = qcm-git diff --git a/PKGBUILD b/PKGBUILD new file mode 100755 index 000000000000..266187b7403c --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,62 @@ +pkgname=qcm-git +pkgver=r25.5d17e9b +pkgrel=1 +pkgdesc="Qt client for netease cloud music " +arch=('x86_64') +url="https://github.com/hypengw/Qcm" +License=('GPL2.0') +depends=( + 'qt6-base' + 'hicolor-icon-theme' + 'curl' + 'openssl' + 'qt6-tools') +makedepends=( + 'git' + 'cmake' + 'ninja') +provides=("qcm") +source=('git+https://github.com/hypengw/Qcm.git') +sha256sums=('SKIP') + +function pkgver(){ + cd Qcm + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +function build(){ + if [ -d "${srcdir}"/Qcm/build ]; then + _info "Deleting ${srcdir}/Qcm/build" + rm -r "${srcdir}"/Qcm/build + fi + _info "Starting Build..." + cd Qcm + git submodule update --init + mkdir build + cd build + cmake .. -GNinja -DCMAKE_BUILD_TYPE=Release + ninja +} + +function package(){ + _info "Copying files" + mkdir -p "${pkgdir}"/opt/Qcm + mkdir -p "${pkgdir}"/usr/bin + cp "${srcdir}"/Qcm/build/app/Qcm "${pkgdir}"/opt/Qcm + echo '''#!/bin/bash +"${pkgdir}"/opt/Qcm/Qcm "$@" +''' >"${pkgdir}"/usr/bin/Qcm + chmod +x "${pkgdir}" -R +} + +function _info() { + if [ -f /usr/bin/pamac ]; then + echo " ==> [Info]: $@" + else + all_off="$(tput sgr0)" + bold="${all_off}$(tput bold)" + blue="${bold}$(tput setaf 4)" + yellow="${bold}$(tput setaf 3)" + printf "${blue}==>${yellow} [Info]:${bold} $1${all_off}\n" + fi +} |