graphviz: split docs into separate package

This commit is contained in:
Biswapriyo Nath
2023-06-30 00:14:44 +05:30
parent cb8f5782a9
commit 401b2ea38b

View File

@@ -2,14 +2,15 @@
_realname=graphviz
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}"
"${MINGW_PACKAGE_PREFIX}-${_realname}-docs")
pkgver=8.0.5
pkgrel=1
pkgdesc="Graph Visualization Software (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64')
url='https://www.graphviz.org/'
license=('EPL')
license=('spdx:EPL-1.0')
depends=("${MINGW_PACKAGE_PREFIX}-cairo"
"${MINGW_PACKAGE_PREFIX}-devil"
"${MINGW_PACKAGE_PREFIX}-expat"
@@ -132,10 +133,34 @@ build() {
make
}
package() {
package_graphviz() {
cd ${srcdir}/build-${MSYSTEM}
local _pythonpath
_pythonpath=$(python -c "import sysconfig; print(sysconfig.get_path('platlib'))")
make DESTDIR="${pkgdir}" PYTHON3_INSTALL_DIR="$(cygpath ${_pythonpath})" install
# split docs
mkdir -p dest${MINGW_PREFIX}/share
mv "${pkgdir}${MINGW_PREFIX}"/share/doc dest${MINGW_PREFIX}/share/doc
}
package_graphviz-docs() {
pkgdesc+=" (documentation)"
depends=()
optdepends=()
cd "${srcdir}"/build-${MSYSTEM}
mv dest/* "${pkgdir}"
}
# template start; name=mingw-w64-splitpkg-wrappers; version=1.0;
# vim: set ft=bash :
# generate wrappers
for _name in "${pkgname[@]}"; do
_short="package_${_name#${MINGW_PACKAGE_PREFIX}-}"
_func="$(declare -f "${_short}")"
eval "${_func/#${_short}/package_${_name}}"
done
# template end;