blob: a196566b83542cd964fa21bfc0b206e845b6120c (
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
62
63
64
|
# Maintainer: robertfoster
pkgname=openbazaar-git
pkgver=v2.4.10.r0.gf724cf15
pkgrel=1
pkgdesc="Front-end Electron application for talking with the OpenBazaar daemon (Latest devel version)"
arch=(i686 x86_64)
url="https://github.com/OpenBazaar/openbazaar-desktop"
license=('MIT')
depends=('electron6')
optdepends=('openbazaard-git: server daemon occasionally needed by front-end')
makedepends=('git' 'npm')
conflicts=('openbazaar')
source=("${pkgname%%-git}::git+https://github.com/OpenBazaar/openbazaar-desktop.git"
"${pkgname%%-git}.js"
"${pkgname%%-git}.desktop"
)
install=${pkgname%%-git}.install
options=('!strip')
prepare() {
cd $srcdir/${pkgname%%-git}
sed -i '/electron/d' package.json
npm install --save node-sass@5.0.0
npm install --silent
}
build() {
cd $srcdir/${pkgname%%-git}
npm run build
}
package() {
cd $srcdir
appdir="usr/lib/${pkgname%%-git}"
install -d $pkgdir/${appdir%%/${pkgname%%-git}}
cp -rf ${pkgname%%-git} $pkgdir/$appdir
install -Dm755 ${pkgname%%-git}.js $pkgdir/usr/bin/${pkgname%%-git}
install -Dm644 ${pkgname%%-git}/imgs/icon.png $pkgdir/usr/share/pixmaps/${pkgname%%-git}2.png
install -Dm644 ${pkgname%%-git}.desktop $pkgdir/usr/share/applications/${pkgname%%-git}.desktop
cd $pkgdir/$appdir
rm -rf .git*
rm -rf .travis
cp -rf prod/* js/
find "${pkgdir}"/${appdir} \
-name "bin" -prune -exec rm -r '{}' \; \
-or -name "example" -prune -exec rm -r '{}' \; \
-or -name "examples" -prune -exec rm -r '{}' \; \
-or -name "test" -prune -exec rm -r '{}' \;
pathtoreplace=$(echo ${srcdir}/ | sed 's:/:\\\/:g')
find "$pkgdir/$appdir/node_modules/" -name "*.json" -exec \
sed -i "s/$pathtoreplace//g" {} +
}
pkgver() {
cd $srcdir/${pkgname%%-git}
git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}
md5sums=('SKIP'
'8359716a04cff2fd8499406408b6c590'
'a278f17aa965510cadb534df49b245dd')
|