blob: 25fbf67443cf65f1dfa50a567d45aab38602e576 (
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
|
# Maintainer: Krzysztof Saczuk <zakku@zakku.eu>
# Contributor: Maxim Baz <cerebro@maximbaz.com>
pkgname=cerebro-git
_pkgname=cerebro
pkgver=v0.4.0.r4.gb2039c2
pkgrel=1
pkgdesc='Open-source productivity booster with a brain.'
arch=('x86_64')
url='https://cerebroapp.com/'
license=('MIT')
conflicts=('cerebro')
depends=('nss' 'gtk3')
makedepends=('gendesk' 'python2' 'git') #'npm' 'yarn')
provides=('cerebro')
source=('git://github.com/cerebroapp/cerebro.git')
sha256sums=('SKIP')
pkgver() {
cd "${srcdir}/${_pkgname}"
git describe --long --tags | sed 's/-/.r/;s/-/./g'
}
prepare() {
gendesk -f -n --name="Cerebro" --pkgname="${_pkgname}" --pkgdesc="${pkgdesc}" \
--exec="${pkgdir}/opt/${_pkgname}/${_pkgname}" --categories="Utility"
}
build() {
cd "${srcdir}/${_pkgname}"
yarn && cd ./app && yarn && cd ../
yarn run build --linux --dir
}
package() {
cd "${srcdir}"
echo "Creating desktop entry file.."
desktop-file-install -m 644 --dir "${pkgdir}/usr/share/application/" "${srcdir}/${_pkgname}.desktop"
echo "Coping icons..."
install -D "${srcdir}/${_pkgname}/build/icons/256x256.png" "${pkgdir}/usr/share/pixmaps/${_pkgname}.png"
for size in 16 32 48 128 256 512 1024; do
install -D "${srcdir}/${_pkgname}/build/icons/${size}x${size}.png" "${pkgdir}/usr/share/icons/hicolor/${size}x${size}/apps/${_pkgname}.png"
done
echo "Coping build..."
mkdir -p "${pkgdir}/opt/${_pkgname}"
cp -rf "${srcdir}/${_pkgname}/release/linux-unpacked/." "${pkgdir}/opt/${_pkgname}"
echo "Linking binary file"
mkdir -p "${pkgdir}/usr/bin"
ln -s "${pkgdir}/opt/${_pkgname}/${_pkgname}" "${pkgdir}/usr/bin/${_pkgname}"
}
|