11# Maintainer: taotieren <[email protected] >22
33pkgname=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
66pkgdesc=" 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 )
88url=" https://github.com/Mogztter/asciidoctor-web-pdf"
99license=(' MIT' )
10- provides=(${pkgname} )
11- conflicts=(${pkgname} ${pkgname % -git} asciidoctor-pdf)
10+ provides=(${pkgname% -git} asciidoctor-pdf )
11+ conflicts=(${pkgname% -git} asciidoctor-pdf)
1212# replaces=(${pkgname})
13- depends=(npm poppler ghostscript)
14- makedepends=()
13+ depends=(
14+ sh
15+ cairo
16+ dbus
17+ expat
18+ gcc-libs
19+ glib2
20+ glibc
21+ libcups
22+ libx11
23+ libxcb
24+ libxext
25+ nodejs
26+ nspr
27+ nss
28+ )
29+ makedepends=(
30+ git
31+ npm
32+ poppler
33+ ghostscript
34+ )
1535backup=()
16- options=(' !strip ' )
36+ options=()
1737install=
1838source=(" ${pkgname% -git} ::git+${url} .git" )
1939sha256sums=(' SKIP' )
2040noextract=()
2141
2242pkgver () {
2343 cd " ${srcdir} /${pkgname% -git} "
24- git describe --long --tags | sed ' s/^v//g;s/\([^-]*-g\)/r\1/;s/-/./g'
44+ (
45+ set -o pipefail
46+ git describe --long --tag --abbrev=7 2> /dev/null | sed ' s/^[vV]//g;s/\([^-]*-g\)/r\1/;s/-/./g' ||
47+ printf " r%s.%s" " $( git rev-list --count HEAD) " " $( git rev-parse --short=7 HEAD) "
48+ )
2549}
2650
2751package () {
28- npm install -g --prefix " ${pkgdir} /usr" " ${srcdir} /${pkgname% -git} "
52+ cd " ${srcdir} /${pkgname% -git} "
53+ npm install -g --prefix " ${pkgdir} /usr" $( npm pack)
2954
3055 # Non-deterministic race in npm gives 777 permissions to random directories.
3156 # See https://github.com/npm/cli/issues/1103 for details.
@@ -34,4 +59,6 @@ package() {
3459 # npm gives ownership of ALL FILES to build user
3560 # https://bugs.archlinux.org/task/63396
3661 chown -R root:root " ${pkgdir} "
62+
63+ install -Dm0644 " ${srcdir} /${pkgname% -git} /LICENSE" -t " ${pkgdir} /usr/share/licenses/${pkgname} /"
3764}
0 commit comments