blob: 2005a324739bb37dd86080208114b26c3aebea81 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
# Maintainer: Timur Demin <me@tdem.in>
# Ported from insomnia-src pkgbuild, thanks to @vscncls and @bruceutut
pkgname="emdl"
pkgver="2.0.1"
pkgrel=2
pkgdesc='Extensible manga downloader and reader using Electron'
_pkgarchive="$pkgname-v$pkgver"
url="https://gitlab.com/CopyNippyJoin/emdl"
arch=('x86_64')
license=('GPL3')
depends=(
'jq'
)
makedepends=(
'git'
'nvm'
)
source=(
"$pkgname.desktop"
"https://gitlab.com/CopyNippyJoin/$pkgname/-/archive/v$pkgver/$_pkgarchive.tar.gz"
)
sha256sums=('a34a3d921a0469431286ee2b0966f46efc07bdf2b1f694d8cc61f3e5a3bf9a0c'
'b4a3d6f612815ac2e248beffae7deed3d4454bc4692f90a15229cd615fbd54fd')
build () {
# Use node 12
local node_version='12'
export npm_config_cache="$srcdir/$_pkgarchive/npm_cache"
source /usr/share/nvm/init-nvm.sh
nvm install "$node_version"
# Run the build
cd "$srcdir/$_pkgarchive"
nvm exec $node_version npm ci
nvm exec $node_version npm run pack
}
package () {
# Set up package directories
install -d $pkgdir/{opt,usr/bin}
install -Dm 755 $srcdir/$pkgname.desktop $pkgdir/usr/share/applications/$pkgname.desktop
# Copy built files into the package
( cd $srcdir/$_pkgarchive/dist/linux-unpacked && find . -type f \
-exec install -Dm 755 "{}" "$pkgdir/opt/$pkgname/{}" \; )
# Symlink the executable path into the package
ln -s /opt/$pkgname/$pkgname $pkgdir/usr/bin/$pkgname
}
|