blob: 107d22f3dcf0398133f02e93782062c57147bc1a (
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: Andy Weidenbaum <archbaum@gmail.com>
# Maintainer: Jianqiu Zhang <zhangjianqiu13@gmail.com>
pkgname=swagger-editor-git
pkgver=20181227
pkgrel=1
pkgdesc="Swagger Editor"
arch=('i686' 'x86_64')
depends=('darkhttpd' 'nodejs')
makedepends=('git' 'npm' 'python2')
url="https://github.com/swagger-api/swagger-editor"
license=('Apache')
source=(git+https://github.com/swagger-api/swagger-editor
swagger-editor.service)
sha256sums=('SKIP'
'ca2474524032867d5ea1662535250d9339d9e8f80be1d4d23e429b73e0a5eed4')
provides=('swagger-editor')
conflicts=('swagger-editor')
options=('!strip')
install=swagger-editor.install
pkgver() {
cd ${pkgname%%-git}
git log -1 --format="%cd" --date=short | sed "s|-||g"
}
build() {
cd ${pkgname%%-git}
msg2 'Fetching NPM dependencies...'
npm install --python=python2
msg2 'Building...'
npm run build
}
package() {
cd ${pkgname%%-git}
msg2 'Installing docs...'
install -Dm 644 README.md "$pkgdir/usr/share/doc/swagger-editor/README.md"
msg2 'Installing...'
install -dm 755 "$pkgdir/usr/share/swagger-editor"
find . -mindepth 1 -maxdepth 1 -exec \
cp -dpr --no-preserve=ownership '{}' "$pkgdir/usr/share/swagger-editor" \;
msg2 'Installing swagger-editor.service...'
install -Dm 644 "$srcdir/swagger-editor.service" \
"$pkgdir/usr/lib/systemd/system/swagger-editor.service"
msg2 'Cleaning up pkgdir...'
find "$pkgdir" -type d -name .git -exec rm -r '{}' +
find "$pkgdir" -type f -name .gitignore -exec rm -r '{}' +
}
|