# HG changeset patch # User Franz Glasner # Date 1663495440 -7200 # Node ID f2b4edf5f6a347ca195fc07956b16553bf6bb6bd # Parent 7508d9a9cf4985175e0e2e8e8f08542d575254f2 Docs: read the version from the Makefile diff -r 7508d9a9cf49 -r f2b4edf5f6a3 Makefile --- a/Makefile Sun Sep 18 11:10:39 2022 +0200 +++ b/Makefile Sun Sep 18 12:04:00 2022 +0200 @@ -37,6 +37,7 @@ do-extract: ${MKDIR} ${WRKSRC}/bin ${MKDIR} ${WRKSRC}/sbin + ${CP} Makefile ${WRKSRC}/Makefile .for _rp in sbin/check-ports sbin/fjail sbin/ftjail sbin/fzfs sbin/fpkg sbin/bsmtp2dma ${CP} -v ${SRC}/${_rp} ${WRKSRC}/${_rp} ${SED} -i "" -E -e "s|\\\$$Date\\\$$|\$$Date: ${HGDATE} \$$|" ${WRKSRC}/${_rp} diff -r 7508d9a9cf49 -r f2b4edf5f6a3 docs/conf.py --- a/docs/conf.py Sun Sep 18 11:10:39 2022 +0200 +++ b/docs/conf.py Sun Sep 18 12:04:00 2022 +0200 @@ -10,7 +10,8 @@ # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. # -# import os +import os +import re # import sys # sys.path.insert(0, os.path.abspath('.')) @@ -22,7 +23,12 @@ author = 'Franz Glasner' # The full version, including alpha/beta/rc tags -release = '0.18.2' +with open(os.path.join(os.path.dirname(__file__), + "..", + "Makefile"), "rb") as f: + release = re.search(b"^PORTVERSION\s*=\s*(\S+)", + f.read(), + re.MULTILINE).group(1).decode("ascii") # -- General configuration --------------------------------------------------- @@ -65,14 +71,13 @@ # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ - ("man/local-bsdtools", "local-bsdtools", 'FreeBSD specific administration helper tools', [author], 8), + ("man/local-bsdtools", "local-bsdtools", 'FreeBSD specific administration helper tools v%s' % release, [author], 8), ("man/fzfs", "fzfs", "A ZFS management helper tool", [author], 8), ("man/fzfs-mount", "fzfs-mount", "Mount ZFS datasets recursively", [author], 8), - ("man/fzfs-umount", "fzfs-umount", "Unmount ZFS datasets recursively", [author], 8), + ("man/fzfs-umount", "fzfs-umount", "Unmount ZFS datasets recursively", [author], 8), ] # -- Link to manual pages ---------------------------------------------------- manpages_url = "https://www.freebsd.org/cgi/man.cgi?query={page}&sektion={section}" -