blob: 12af382fc28e11de3fa34139670e78d6f0e06770 (
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
51
52
53
54
55
56
57
58
59
60
61
|
# Maintainer: weearc <q19981121@163.com>
pkgname=motrix
_pkgname=Motrix
pkgver=git20190120
pkgrel=4
epoch=
pkgdesc="elegent downloading tool frontend for aria2c,using vue"
arch=("x86_64")
url="https://github.com/agalwood/Motrix"
license=('MIT')
groups=()
depends=('bash'
'aria2')
makedepends=('npm'
'git')
checkdepends=()
optdepends=()
provides=()
conflicts=()
replaces=()
backup=()
options=()
install=
changelog=
source=("Motrix.desktop"
"aria2.conf"
"package.json")
noextract=()
md5sums=('SKIP'
'SKIP'
'SKIP')
validpgpkeys=()
prepare() {
git clone https://github.com/agalwood/$_pkgname.git
npm config set registry 'https://registry.npm.taobao.org'
export ELECTRON_MIRROR='https://npm.taobao.org/mirrors/electron/'
export SASS_BINARY_SITE='https://npm.taobao.org/mirrors/node-sass'
rm $_pkgname/package.json && mv ${srcdir}/package.json $_pkgname/.
}
build() {
cd $_pkgname/
npm install
npm run build
}
package() {
install -d ${pkgdir}/opt
install -d ${pkgdir}/usr/bin
install -d ${pkgdir}/usr/share/icons
install -d ${pkgdir}/usr/share/applications
mv ${srcdir}/$_pkgname/release/linux-unpacked/ ${pkgdir}/opt/motrix
install -Dm644 ${srcdir}/$_pkgname/build/256x256.png ${pkgdir}/usr/share/icons/$pkgname.png
echo -e "#!/bin/bash \n /opt/motrix/motrix" >> ${pkgdir}/usr/bin/motrix
chmod a+x ${pkgdir}/usr/bin/motrix
install -Dm 644 ${srcdir}/Motrix.desktop ${pkgdir}/usr/share/applications
# rm ${pkgdir}/opt/motrix/resources/engine/aria2.conf
install -Dm 644 ${srcdir}/aria2.conf ${pkgdir}/opt/motrix/resources/engine/aria2.conf
rm -rf ${srcdir}
}
|