blob: d2b0f2d466796871ca791e6e43d0212b58cdc6f6 (
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
|
# Maintainer: Martin Rys <rys.pw/contact>
pkgname=haste-server-git
_gitname=haste-server
pkgver=r408.b52b394
pkgrel=1
pkgdesc="Prettiest, easiest to use pastebin ever made"
arch=('any')
url="https://github.com/toptal/haste-server"
license=('MIT')
depends=('nodejs')
makedepends=('git' 'npm')
provides=('haste-server')
conflicts=('haste-server')
options=(!emptydirs)
source=('git+https://github.com/toptal/haste-server.git')
sha256sums=('SKIP')
pkgver() {
cd "${srcdir}/${_gitname}"
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
prepare() {
cd "${srcdir}/${_gitname}"
# Adding missing files to package.json
sed -i '38i "config.js","about.md",' package.json
# Changing defaut storage to file
sed -i '36c "path": "./data","type": "file"' config.js
# Unable to run haste from /usr/bin, so removing it
sed -i '32,34d' package.json
# Pack the current folder
npm pack
}
package() {
cd "${srcdir}/${_gitname}"
install -Dm644 "../../${_gitname}.service" -t "${pkgdir}/usr/lib/systemd/system"
npm install --cache ../cache -g --prefix "${pkgdir}/usr" *.tgz
}
|