Skip to content
Snippets Groups Projects
Verified Commit 4150dc56 authored by Carl Smedstad's avatar Carl Smedstad
Browse files

upgpkg: 0.17-2: Adopt & refactor PKGBUILD

parent 50b278c3
No related branches found
Tags 0.17-2
No related merge requests found
pkgbase = hotdoc
pkgdesc = The Tastiest Documentation Tool
pkgdesc = The tastiest API documentation system
pkgver = 0.17
pkgrel = 1
pkgrel = 2
url = https://github.com/hotdoc/hotdoc
arch = x86_64
license = LGPL-2.1-or-later
......@@ -10,6 +10,7 @@ pkgbase = hotdoc
makedepends = npm
makedepends = python-build
makedepends = python-installer
makedepends = python-setuptools
makedepends = python-wheel
depends = bash
depends = glib2
......@@ -25,21 +26,20 @@ pkgbase = hotdoc
depends = python-networkx
depends = python-pkgconfig
depends = python-schema
depends = python-setuptools
depends = python-toposort
depends = python-wheezy-template
depends = python-yaml
optdepends = clang: for the C extension
optdepends = llvm: for the C extension
source = git+https://github.com/hotdoc/hotdoc#tag=0.17
source = mathieu-cmark::git+https://github.com/MathieuDuponchelle/cmark
source = prismjs::git+https://github.com/PrismJS/prism
source = git+https://github.com/MathieuDuponchelle/cmark
source = git+https://github.com/PrismJS/prism
source = git+https://github.com/hotdoc/hotdoc_bootstrap_theme
source = 0001-Simplify-deps-for-Python-3.11.patch
b2sums = 3be5a4b0401914e1b4362d5edb4adcccb7bc2edc158ac273ca4b8e433ededf6a1b22814a6b219f3dc5f692f0b5cdbfbe908eadfff37d58f3f3c0b38d75ef5e83
b2sums = SKIP
b2sums = SKIP
b2sums = SKIP
b2sums = cc1ebc2f1d4842d6bd39f9d755a4abf909bc3db12b863bc40a8cffea5eab71eb88034884a1d7c18e1be9d9714c3a15698753393c5497bbc19449db069ae535d7
sha256sums = 4ffeb856513360ff024b6777711d87f269de47b1a9193e68433e8549a389dc2c
sha256sums = SKIP
sha256sums = SKIP
sha256sums = SKIP
sha256sums = 865812a0c5a66822ece814e898b4b3ca46553ba51190adc944bb4f01c0db6cf0
pkgname = hotdoc
[hotdoc]
source = "github"
github = "hotdoc/hotdoc"
use_max_tag = true
source = "pypi"
pypi = "hotdoc"
# Maintainer: Carl Smedstad <carsme@archlinux.org>
# Contributor: Eli Schwartz <eschwartz@archlinux.org>
pkgname=hotdoc
pkgver=0.17
pkgrel=1
pkgdesc="The Tastiest Documentation Tool"
pkgrel=2
pkgdesc="The tastiest API documentation system"
url="https://github.com/hotdoc/hotdoc"
arch=(x86_64)
license=(LGPL-2.1-or-later)
......@@ -22,7 +23,6 @@ depends=(
python-networkx
python-pkgconfig
python-schema
python-setuptools
python-toposort
python-wheezy-template
python-yaml
......@@ -33,6 +33,7 @@ makedepends=(
npm
python-build
python-installer
python-setuptools
python-wheel
)
optdepends=(
......@@ -41,43 +42,42 @@ optdepends=(
)
source=(
"git+https://github.com/hotdoc/hotdoc#tag=$pkgver"
"mathieu-cmark::git+https://github.com/MathieuDuponchelle/cmark"
"prismjs::git+https://github.com/PrismJS/prism"
"git+https://github.com/MathieuDuponchelle/cmark"
"git+https://github.com/PrismJS/prism"
"git+https://github.com/hotdoc/hotdoc_bootstrap_theme"
0001-Simplify-deps-for-Python-3.11.patch
"0001-Simplify-deps-for-Python-3.11.patch"
)
b2sums=('3be5a4b0401914e1b4362d5edb4adcccb7bc2edc158ac273ca4b8e433ededf6a1b22814a6b219f3dc5f692f0b5cdbfbe908eadfff37d58f3f3c0b38d75ef5e83'
'SKIP'
'SKIP'
'SKIP'
'cc1ebc2f1d4842d6bd39f9d755a4abf909bc3db12b863bc40a8cffea5eab71eb88034884a1d7c18e1be9d9714c3a15698753393c5497bbc19449db069ae535d7')
sha256sums=('4ffeb856513360ff024b6777711d87f269de47b1a9193e68433e8549a389dc2c'
'SKIP'
'SKIP'
'SKIP'
'865812a0c5a66822ece814e898b4b3ca46553ba51190adc944bb4f01c0db6cf0')
prepare() {
cd hotdoc
cd $pkgname
# Avoid having to package https://pypi.org/project/backports.entry-points-selectable/
git apply -3 ../0001-Simplify-deps-for-Python-3.11.patch
patch -Np1 -i "$srcdir/0001-Simplify-deps-for-Python-3.11.patch"
git submodule init
git submodule set-url cmark "$srcdir/mathieu-cmark"
git submodule set-url hotdoc/extensions/syntax_highlighting/prism "$srcdir/prismjs"
git submodule set-url hotdoc/hotdoc_bootstrap_theme "$srcdir/hotdoc_bootstrap_theme"
git -c protocol.file.allow=always -c protocol.allow=never submodule update
git config submodule.cmark.url "$srcdir/cmark"
git config submodule.hotdoc/extensions/syntax_highlighting/prism.url "$srcdir/prism"
git config submodule.hotdoc/hotdoc_bootstrap_theme.url "$srcdir/hotdoc_bootstrap_theme"
git -c protocol.file.allow=always submodule update
}
build() {
cd hotdoc
cd $pkgname
python -m build --wheel --no-isolation
}
check() {
cd hotdoc/build/lib.linux-$CARCH-cpython-*
python -m unittest
cd $pkgname
python -m installer -d tmp_install dist/*.whl
local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
python -m unittest discover "$PWD/tmp_install/$site_packages"
}
package() {
cd hotdoc
cd $pkgname
python -m installer --destdir="$pkgdir" dist/*.whl
}
# vim:set sw=2 sts=-1 et:
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment