Files

44 lines
1.0 KiB
Makefile

COMMENT = create books from markdown files
# When updating regenerate PLIST of devel/rust-analyzer
GH_ACCOUNT = rust-lang
GH_PROJECT = mdBook
GH_TAGNAME = v0.5.3
PKGNAME = ${DISTNAME:L}
CATEGORIES = textproc www
MAINTAINER = Edd Barrett <edd@openbsd.org>
# MPL-2.0 + dependencies below.
PERMIT_PACKAGE = Yes
WANTLIB += ${MODCARGO_WANTLIB} m
MODULES = devel/cargo
CONFIGURE_STYLE = cargo
SEPARATE_BUILD = Yes
MODCARGO_RUSTFLAGS = -C debuginfo=0
RELEASE_DIR = ${MODCARGO_TARGET_DIR}/release
SUBST_VARS = WRKDIST
# Replace paths in book.toml for tests
post-configure:
${SUBST_CMD} ${WRKDIST}/tests/testsuite/preprocessor/failing_preprocessor/book.toml
${SUBST_CMD} ${WRKDIST}/tests/testsuite/preprocessor/nop_preprocessor/book.toml
# Build the docs.
pre-fake:
cd ${WRKSRC}/guide && ${RELEASE_DIR}/mdbook build
post-install:
cp -r ${WRKSRC}/guide/book ${PREFIX}/share/doc/mdbook/
chown -R ${SHAREOWN}:${SHAREGRP} ${PREFIX}/share/doc/mdbook/
.include "crates.inc"
.include <bsd.port.mk>