1
1
# Maintainer: taotieren <admin@taotieren.com>
2
2
3
3
pkgname=asciidoctor-web-pdf-git
4
- pkgver=1.0.0.alpha.16.r5.gc613be3
5
- pkgrel=1
4
+ pkgver=1.0.0.alpha.16.r8.g3fe542a
5
+ pkgrel=9
6
6
pkgdesc=" A PDF converter for AsciiDoc based on web technologies. It allows complex layouts to be defined with CSS and JavaScript, while writing the content in AsciiDoc."
7
- arch=(' any ' )
7
+ arch=($CARCH )
8
8
url=" https://github.com/Mogztter/asciidoctor-web-pdf"
9
9
license=(' MIT' )
10
- provides=(${pkgname} )
11
- conflicts=(${pkgname} ${pkgname % -git} asciidoctor-pdf)
10
+ provides=(${pkgname% -git} asciidoctor-pdf )
11
+ conflicts=(${pkgname% -git} asciidoctor-pdf)
12
12
# replaces=(${pkgname})
13
- depends=(npm poppler ghostscript)
14
- makedepends=()
13
+ depends=()
14
+ makedepends=(
15
+ git
16
+ npm
17
+ poppler
18
+ ghostscript
19
+ )
15
20
backup=()
16
- options=(' !strip ' )
21
+ options=()
17
22
install=
18
23
source=(" ${pkgname% -git} ::git+${url} .git" )
19
24
sha256sums=(' SKIP' )
20
25
noextract=()
21
26
22
27
pkgver () {
23
28
cd " ${srcdir} /${pkgname% -git} "
24
- git describe --long --tags | sed ' s/^v//g;s/\([^-]*-g\)/r\1/;s/-/./g'
29
+ (
30
+ set -o pipefail
31
+ git describe --long --tag --abbrev=7 2> /dev/null | sed ' s/^[vV]//g;s/\([^-]*-g\)/r\1/;s/-/./g' ||
32
+ printf " r%s.%s" " $( git rev-list --count HEAD) " " $( git rev-parse --short=7 HEAD) "
33
+ )
25
34
}
26
35
27
36
package () {
28
- npm install -g --prefix " ${pkgdir} /usr" " ${srcdir} /${pkgname% -git} "
37
+ cd " ${srcdir} /${pkgname% -git} "
38
+ npm install -g --prefix " ${pkgdir} /usr" $( npm pack)
29
39
30
40
# Non-deterministic race in npm gives 777 permissions to random directories.
31
41
# See https://github.com/npm/cli/issues/1103 for details.
@@ -34,4 +44,6 @@ package() {
34
44
# npm gives ownership of ALL FILES to build user
35
45
# https://bugs.archlinux.org/task/63396
36
46
chown -R root:root " ${pkgdir} "
47
+
48
+ install -Dm0644 " ${srcdir} /${pkgname% -git} /LICENSE" -t " ${pkgdir} /usr/share/licenses/${pkgname} /"
37
49
}
0 commit comments