Skip to content

Commit

Permalink
graphviz: split docs into separate package
Browse files Browse the repository at this point in the history
  • Loading branch information
Biswa96 committed Jun 29, 2023
1 parent cb8f578 commit 401b2ea
Showing 1 changed file with 28 additions and 3 deletions.
31 changes: 28 additions & 3 deletions mingw-w64-graphviz/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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;

0 comments on commit 401b2ea

Please sign in to comment.