cpod-git/PKGBUILD

57 lines
1.3 KiB
Bash
Raw Normal View History

2018-04-06 18:17:20 +02:00
# Maintainer: willemw <willemw12@gmail.com>
2021-07-08 18:48:02 +02:00
pkgname=cpod-git
2021-12-14 09:02:14 +01:00
pkgver=1.28.0.r5.g295b5d1
2018-04-06 18:17:20 +02:00
pkgrel=1
pkgdesc="A simple, beautiful podcast app"
arch=('x86_64')
url="https://github.com/z-------------/CPod"
2018-04-06 18:17:20 +02:00
license=('Apache')
depends=('gconf')
2019-12-27 09:35:57 +01:00
makedepends=('git' 'gulp' 'nvm' 'yarn')
2021-07-08 18:48:02 +02:00
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
2018-04-06 18:17:20 +02:00
replaces=('cumulonimbus')
2021-07-08 18:48:02 +02:00
source=($pkgname::git+$url.git)
2018-04-06 18:17:20 +02:00
sha256sums=('SKIP')
2021-07-08 18:48:02 +02:00
# For the Node.js version used by CPod, see file .travis.yml ("dist:" and "node_js:")
# For a list of all Node.js versions, run in Bash: source /usr/share/nvm/init-nvm.sh ; nvm ls-remote
_nodejsver=8.17.0
2018-04-06 18:17:20 +02:00
pkgver() {
2021-07-08 18:48:02 +02:00
git -C $pkgname describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
2018-04-06 18:17:20 +02:00
}
build() {
cd $pkgname
# Keep all Node.js files inside the package build folder
export HOME="$srcdir/$pkgname"
# Use a specific Node.js version
export NVM_DIR="$srcdir/$pkgname/.nvm"
source /usr/share/nvm/nvm.sh
nvm install $_nodejsver
nvm use $_nodejsver
2021-12-14 09:02:14 +01:00
# Avoid "Unresolved node modules" error
export ELECTRON_BUILDER_ALLOW_UNRESOLVED_DEPENDENCIES=true
2018-04-06 18:17:20 +02:00
yarn
gulp
}
package() {
cd $pkgname
rm -rf dist
yarn dist --linux deb # --x64
cd dist
bsdtar xf CPod_*.deb data.tar.xz
bsdtar xf data.tar.xz --directory "$pkgdir"
install -dm755 "$pkgdir/usr/bin"
2019-04-06 08:14:12 +02:00
ln -sf /opt/CPod/cpod "$pkgdir/usr/bin/cpod"
2018-04-06 18:17:20 +02:00
}