Skip to content

Add asciidoctor-web-pdf-git #2985

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 64 additions & 0 deletions archlinuxcn/asciidoctor-web-pdf-git/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Maintainer: taotieren <admin@taotieren.com>

pkgname=asciidoctor-web-pdf-git
pkgver=1.0.0.alpha.16.r8.g3fe542a
pkgrel=9
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."
arch=($CARCH)
url="https://github.com/Mogztter/asciidoctor-web-pdf"
license=('MIT')
provides=(${pkgname%-git} asciidoctor-pdf)
conflicts=(${pkgname%-git} asciidoctor-pdf)
#replaces=(${pkgname})
depends=(
sh
cairo
dbus
expat
gcc-libs
glib2
glibc
libcups
libx11
libxcb
libxext
nodejs
nspr
nss
)
makedepends=(
git
npm
poppler
ghostscript
)
backup=()
options=()
install=
source=("${pkgname%-git}::git+${url}.git")
sha256sums=('SKIP')
noextract=()

pkgver() {
cd "${srcdir}/${pkgname%-git}"
(
set -o pipefail
git describe --long --tag --abbrev=7 2>/dev/null | sed 's/^[vV]//g;s/\([^-]*-g\)/r\1/;s/-/./g' ||
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
)
}

package() {
cd "${srcdir}/${pkgname%-git}"
npm install -g --prefix "${pkgdir}/usr" $(npm pack)

# Non-deterministic race in npm gives 777 permissions to random directories.
# See https://github.com/npm/cli/issues/1103 for details.
find "${pkgdir}/usr" -type d -exec chmod 755 {} +

# npm gives ownership of ALL FILES to build user
# https://bugs.archlinux.org/task/63396
chown -R root:root "${pkgdir}"

install -Dm0644 "${srcdir}/${pkgname%-git}/LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}/"
}
12 changes: 12 additions & 0 deletions archlinuxcn/asciidoctor-web-pdf-git/lilac.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
maintainers:
- github: taotieren

pre_build: vcs_update

post_build_script: |
git_pkgbuild_commit()
update_aur_repo()

update_on:
- source: github
github: Mogztter/asciidoctor-web-pdf