git: ecee0b0bbcd5 - main - net-mgmt/netbox: Make online documentation available [1]

From: Kai Knoblich <kai_at_FreeBSD.org>
Date: Sun, 09 Jan 2022 20:03:38 UTC
The branch main has been updated by kai:

URL: https://cgit.FreeBSD.org/ports/commit/?id=ecee0b0bbcd5b8c926b6f8a48a2958e22a22aeac

commit ecee0b0bbcd5b8c926b6f8a48a2958e22a22aeac
Author:     Kai Knoblich <kai@FreeBSD.org>
AuthorDate: 2022-01-09 20:00:33 +0000
Commit:     Kai Knoblich <kai@FreeBSD.org>
CommitDate: 2022-01-09 20:00:33 +0000

    net-mgmt/netbox: Make online documentation available [1]
    
    * Since the 3.x release of NetBox its documentation has also been made
      available locally.  In order for this to be possible, the
      documentation must be generated accordingly beforehand.
    
    * Also relax the requirements for Pillow because there have been no
      problems so far and to make future updates of Pillow easier.
    
    * Bump PORTREVISION due changed package contents.
    
    Reported by:    Linda Lapinlampi (via e-mail) [1]
    MFH:            2022Q1 (after 3d)
---
 net-mgmt/netbox/Makefile             |   9 +-
 net-mgmt/netbox/files/pkg-message.in |  10 ++
 net-mgmt/netbox/pkg-plist            | 188 +++++++++++++++++++++++++++++++++++
 3 files changed, 205 insertions(+), 2 deletions(-)

diff --git a/net-mgmt/netbox/Makefile b/net-mgmt/netbox/Makefile
index faf1e22a2569..f75cbec26d54 100644
--- a/net-mgmt/netbox/Makefile
+++ b/net-mgmt/netbox/Makefile
@@ -1,6 +1,7 @@
 PORTNAME=	netbox
 DISTVERSIONPREFIX=	v
 DISTVERSION=	3.0.12
+PORTREVISION=	1
 CATEGORIES=	net-mgmt python
 
 MAINTAINER=	kai@FreeBSD.org
@@ -22,6 +23,8 @@ LICENSE_FILE=	${WRKSRC}/LICENSE.txt
 # - www/py-dj32-django-tables2
 # - www/py-dj32-djangorestframework (in conjunction with www/py-dj32-drf-yasg)
 #
+BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}markdown-include>=0.6.0<1:textproc/py-markdown-include@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}mkdocs-material>=7.3.6<9:textproc/py-mkdocs-material@${PY_FLAVOR}
 RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}django32>=3.2.9<3.3:www/py-django32@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}dj32-django-cors-headers>=3.10.0<4:www/py-dj32-django-cors-headers@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}dj32-django-debug-toolbar>=3.2.2<4:www/py-dj32-django-debug-toolbar@${PY_FLAVOR} \
@@ -41,7 +44,7 @@ RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}django32>=3.2.9<3.3:www/py-django32@${PY_FLA
 		${PYTHON_PKGNAMEPREFIX}Jinja2>=3.0.1<4:devel/py-Jinja2@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}markdown>=3.3.4<3.5:textproc/py-markdown@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}netaddr>=0.8.0<1:net/py-netaddr@${PY_FLAVOR} \
-		${PYTHON_PKGNAMEPREFIX}pillow>=8.2.0<9:graphics/py-pillow@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}pillow>=8.2.0:graphics/py-pillow@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}psycopg2>=2.9.1<3:databases/py-psycopg2@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}svgwrite>=1.4.1<2:graphics/py-svgwrite@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}tablib>=3.1.0<3.2:textproc/py-tablib@${PY_FLAVOR} \
@@ -55,11 +58,13 @@ GH_ACCOUNT=	netbox-community
 
 SUB_FILES=	850.netbox-housekeeping.sample netbox_rq.sample netboxrc.sample pkg-message
 SUB_LIST=	DATADIR=${DATADIR} PYTHON_CMD=${PYTHON_CMD} PYTHON_VER=${PYTHON_VER} WWWOWN=${WWWOWN}
-NO_BUILD=	yes
 NO_ARCH=	yes
 
 OPTIONS_DEFINE=	DOCS EXAMPLES
 
+do-build:
+	cd ${WRKSRC} && ${PYTHON_CMD} -m mkdocs build
+
 do-install:
 	cd ${WRKSRC}/netbox ; \
 	for src in $$( ${FIND} . ! -name '*.bak' ) ; do \
diff --git a/net-mgmt/netbox/files/pkg-message.in b/net-mgmt/netbox/files/pkg-message.in
index 18dd9a8fac37..87d3b8e38aaf 100644
--- a/net-mgmt/netbox/files/pkg-message.in
+++ b/net-mgmt/netbox/files/pkg-message.in
@@ -312,4 +312,14 @@ The NetBox 3.0 release contains major changes, so at least items 1.), 2.) and
    # sysrc -f /etc/periodic.conf daily_netbox_housekeeping_enable="YES"
 EOD
 }
+{ type: upgrade
+  maximum_version: 3.0.12_1
+  message: <<EOD
+Please run the following command to make the online help available that was
+previously missing:
+
+# cd %%DATADIR%%
+# python%%PYTHON_VER%% manage.py collectstatic --no-input
+EOD
+}
 ]
diff --git a/net-mgmt/netbox/pkg-plist b/net-mgmt/netbox/pkg-plist
index 4e0b2c196419..5bbceda094dd 100644
--- a/net-mgmt/netbox/pkg-plist
+++ b/net-mgmt/netbox/pkg-plist
@@ -474,6 +474,194 @@
 %%DATADIR%%/project-static/dist/status.js
 %%DATADIR%%/project-static/dist/status.js.map
 %%DATADIR%%/project-static/docs/.info
+%%DATADIR%%/project-static/docs/404.html
+%%DATADIR%%/project-static/docs/additional-features/change-logging/index.html
+%%DATADIR%%/project-static/docs/additional-features/journaling/index.html
+%%DATADIR%%/project-static/docs/additional-features/napalm/index.html
+%%DATADIR%%/project-static/docs/additional-features/prometheus-metrics/index.html
+%%DATADIR%%/project-static/docs/additional-features/webhooks/index.html
+%%DATADIR%%/project-static/docs/administration/housekeeping/index.html
+%%DATADIR%%/project-static/docs/administration/netbox-shell/index.html
+%%DATADIR%%/project-static/docs/administration/permissions/index.html
+%%DATADIR%%/project-static/docs/administration/replicating-netbox/index.html
+%%DATADIR%%/project-static/docs/assets/images/favicon.png
+%%DATADIR%%/project-static/docs/assets/javascripts/bundle.b1047164.min.js
+%%DATADIR%%/project-static/docs/assets/javascripts/bundle.b1047164.min.js.map
+%%DATADIR%%/project-static/docs/assets/javascripts/lunr/min/lunr.ar.min.js
+%%DATADIR%%/project-static/docs/assets/javascripts/lunr/min/lunr.da.min.js
+%%DATADIR%%/project-static/docs/assets/javascripts/lunr/min/lunr.de.min.js
+%%DATADIR%%/project-static/docs/assets/javascripts/lunr/min/lunr.du.min.js
+%%DATADIR%%/project-static/docs/assets/javascripts/lunr/min/lunr.es.min.js
+%%DATADIR%%/project-static/docs/assets/javascripts/lunr/min/lunr.fi.min.js
+%%DATADIR%%/project-static/docs/assets/javascripts/lunr/min/lunr.fr.min.js
+%%DATADIR%%/project-static/docs/assets/javascripts/lunr/min/lunr.hi.min.js
+%%DATADIR%%/project-static/docs/assets/javascripts/lunr/min/lunr.hu.min.js
+%%DATADIR%%/project-static/docs/assets/javascripts/lunr/min/lunr.it.min.js
+%%DATADIR%%/project-static/docs/assets/javascripts/lunr/min/lunr.ja.min.js
+%%DATADIR%%/project-static/docs/assets/javascripts/lunr/min/lunr.jp.min.js
+%%DATADIR%%/project-static/docs/assets/javascripts/lunr/min/lunr.multi.min.js
+%%DATADIR%%/project-static/docs/assets/javascripts/lunr/min/lunr.nl.min.js
+%%DATADIR%%/project-static/docs/assets/javascripts/lunr/min/lunr.no.min.js
+%%DATADIR%%/project-static/docs/assets/javascripts/lunr/min/lunr.pt.min.js
+%%DATADIR%%/project-static/docs/assets/javascripts/lunr/min/lunr.ro.min.js
+%%DATADIR%%/project-static/docs/assets/javascripts/lunr/min/lunr.ru.min.js
+%%DATADIR%%/project-static/docs/assets/javascripts/lunr/min/lunr.stemmer.support.min.js
+%%DATADIR%%/project-static/docs/assets/javascripts/lunr/min/lunr.sv.min.js
+%%DATADIR%%/project-static/docs/assets/javascripts/lunr/min/lunr.th.min.js
+%%DATADIR%%/project-static/docs/assets/javascripts/lunr/min/lunr.tr.min.js
+%%DATADIR%%/project-static/docs/assets/javascripts/lunr/min/lunr.vi.min.js
+%%DATADIR%%/project-static/docs/assets/javascripts/lunr/min/lunr.zh.min.js
+%%DATADIR%%/project-static/docs/assets/javascripts/lunr/tinyseg.js
+%%DATADIR%%/project-static/docs/assets/javascripts/lunr/wordcut.js
+%%DATADIR%%/project-static/docs/assets/javascripts/workers/search.fcfe8b6d.min.js
+%%DATADIR%%/project-static/docs/assets/javascripts/workers/search.fcfe8b6d.min.js.map
+%%DATADIR%%/project-static/docs/assets/stylesheets/main.a57b2b03.min.css
+%%DATADIR%%/project-static/docs/assets/stylesheets/main.a57b2b03.min.css.map
+%%DATADIR%%/project-static/docs/assets/stylesheets/palette.3f5d1f46.min.css
+%%DATADIR%%/project-static/docs/assets/stylesheets/palette.3f5d1f46.min.css.map
+%%DATADIR%%/project-static/docs/configuration/index.html
+%%DATADIR%%/project-static/docs/configuration/optional-settings/index.html
+%%DATADIR%%/project-static/docs/configuration/required-settings/index.html
+%%DATADIR%%/project-static/docs/core-functionality/circuits/index.html
+%%DATADIR%%/project-static/docs/core-functionality/device-types/index.html
+%%DATADIR%%/project-static/docs/core-functionality/devices/index.html
+%%DATADIR%%/project-static/docs/core-functionality/ipam/index.html
+%%DATADIR%%/project-static/docs/core-functionality/power/index.html
+%%DATADIR%%/project-static/docs/core-functionality/services/index.html
+%%DATADIR%%/project-static/docs/core-functionality/sites-and-racks/index.html
+%%DATADIR%%/project-static/docs/core-functionality/tenancy/index.html
+%%DATADIR%%/project-static/docs/core-functionality/virtualization/index.html
+%%DATADIR%%/project-static/docs/core-functionality/vlans/index.html
+%%DATADIR%%/project-static/docs/customization/custom-fields/index.html
+%%DATADIR%%/project-static/docs/customization/custom-scripts/index.html
+%%DATADIR%%/project-static/docs/customization/custom-validation/index.html
+%%DATADIR%%/project-static/docs/customization/export-templates/index.html
+%%DATADIR%%/project-static/docs/customization/reports/index.html
+%%DATADIR%%/project-static/docs/development/adding-models/index.html
+%%DATADIR%%/project-static/docs/development/application-registry/index.html
+%%DATADIR%%/project-static/docs/development/extending-models/index.html
+%%DATADIR%%/project-static/docs/development/getting-started/index.html
+%%DATADIR%%/project-static/docs/development/index.html
+%%DATADIR%%/project-static/docs/development/models/index.html
+%%DATADIR%%/project-static/docs/development/release-checklist/index.html
+%%DATADIR%%/project-static/docs/development/signals/index.html
+%%DATADIR%%/project-static/docs/development/style-guide/index.html
+%%DATADIR%%/project-static/docs/development/user-preferences/index.html
+%%DATADIR%%/project-static/docs/development/web-ui/index.html
+%%DATADIR%%/project-static/docs/extra.css
+%%DATADIR%%/project-static/docs/graphql-api/overview/index.html
+%%DATADIR%%/project-static/docs/index.html
+%%DATADIR%%/project-static/docs/installation/1-postgresql/index.html
+%%DATADIR%%/project-static/docs/installation/2-redis/index.html
+%%DATADIR%%/project-static/docs/installation/3-netbox/index.html
+%%DATADIR%%/project-static/docs/installation/4-gunicorn/index.html
+%%DATADIR%%/project-static/docs/installation/5-http-server/index.html
+%%DATADIR%%/project-static/docs/installation/6-ldap/index.html
+%%DATADIR%%/project-static/docs/installation/index.html
+%%DATADIR%%/project-static/docs/installation/migrating-to-systemd/index.html
+%%DATADIR%%/project-static/docs/installation/upgrading/index.html
+%%DATADIR%%/project-static/docs/media/admin_ui_run_permission.png
+%%DATADIR%%/project-static/docs/media/installation/netbox_application_stack.png
+%%DATADIR%%/project-static/docs/media/models/dcim_cable_trace.png
+%%DATADIR%%/project-static/docs/media/plugins/plugin_admin_ui.png
+%%DATADIR%%/project-static/docs/media/plugins/plugin_rest_api_endpoint.png
+%%DATADIR%%/project-static/docs/media/power_distribution.png
+%%DATADIR%%/project-static/docs/media/release-notes/netbox30_ui.png
+%%DATADIR%%/project-static/docs/media/screenshots/cable-trace.png
+%%DATADIR%%/project-static/docs/media/screenshots/home-dark.png
+%%DATADIR%%/project-static/docs/media/screenshots/home-light.png
+%%DATADIR%%/project-static/docs/media/screenshots/prefixes-list.png
+%%DATADIR%%/project-static/docs/media/screenshots/rack.png
+%%DATADIR%%/project-static/docs/models/circuits/circuit/index.html
+%%DATADIR%%/project-static/docs/models/circuits/circuittermination/index.html
+%%DATADIR%%/project-static/docs/models/circuits/circuittype/index.html
+%%DATADIR%%/project-static/docs/models/circuits/provider/index.html
+%%DATADIR%%/project-static/docs/models/circuits/providernetwork/index.html
+%%DATADIR%%/project-static/docs/models/dcim/cable/index.html
+%%DATADIR%%/project-static/docs/models/dcim/consoleport/index.html
+%%DATADIR%%/project-static/docs/models/dcim/consoleporttemplate/index.html
+%%DATADIR%%/project-static/docs/models/dcim/consoleserverport/index.html
+%%DATADIR%%/project-static/docs/models/dcim/consoleserverporttemplate/index.html
+%%DATADIR%%/project-static/docs/models/dcim/device/index.html
+%%DATADIR%%/project-static/docs/models/dcim/devicebay/index.html
+%%DATADIR%%/project-static/docs/models/dcim/devicebaytemplate/index.html
+%%DATADIR%%/project-static/docs/models/dcim/devicerole/index.html
+%%DATADIR%%/project-static/docs/models/dcim/devicetype/index.html
+%%DATADIR%%/project-static/docs/models/dcim/frontport/index.html
+%%DATADIR%%/project-static/docs/models/dcim/frontporttemplate/index.html
+%%DATADIR%%/project-static/docs/models/dcim/interface/index.html
+%%DATADIR%%/project-static/docs/models/dcim/interfacetemplate/index.html
+%%DATADIR%%/project-static/docs/models/dcim/inventoryitem/index.html
+%%DATADIR%%/project-static/docs/models/dcim/location/index.html
+%%DATADIR%%/project-static/docs/models/dcim/manufacturer/index.html
+%%DATADIR%%/project-static/docs/models/dcim/platform/index.html
+%%DATADIR%%/project-static/docs/models/dcim/powerfeed/index.html
+%%DATADIR%%/project-static/docs/models/dcim/poweroutlet/index.html
+%%DATADIR%%/project-static/docs/models/dcim/poweroutlettemplate/index.html
+%%DATADIR%%/project-static/docs/models/dcim/powerpanel/index.html
+%%DATADIR%%/project-static/docs/models/dcim/powerport/index.html
+%%DATADIR%%/project-static/docs/models/dcim/powerporttemplate/index.html
+%%DATADIR%%/project-static/docs/models/dcim/rack/index.html
+%%DATADIR%%/project-static/docs/models/dcim/rackreservation/index.html
+%%DATADIR%%/project-static/docs/models/dcim/rackrole/index.html
+%%DATADIR%%/project-static/docs/models/dcim/rearport/index.html
+%%DATADIR%%/project-static/docs/models/dcim/rearporttemplate/index.html
+%%DATADIR%%/project-static/docs/models/dcim/region/index.html
+%%DATADIR%%/project-static/docs/models/dcim/site/index.html
+%%DATADIR%%/project-static/docs/models/dcim/sitegroup/index.html
+%%DATADIR%%/project-static/docs/models/dcim/virtualchassis/index.html
+%%DATADIR%%/project-static/docs/models/extras/configcontext/index.html
+%%DATADIR%%/project-static/docs/models/extras/customfield/index.html
+%%DATADIR%%/project-static/docs/models/extras/customlink/index.html
+%%DATADIR%%/project-static/docs/models/extras/exporttemplate/index.html
+%%DATADIR%%/project-static/docs/models/extras/imageattachment/index.html
+%%DATADIR%%/project-static/docs/models/extras/tag/index.html
+%%DATADIR%%/project-static/docs/models/extras/webhook/index.html
+%%DATADIR%%/project-static/docs/models/ipam/aggregate/index.html
+%%DATADIR%%/project-static/docs/models/ipam/ipaddress/index.html
+%%DATADIR%%/project-static/docs/models/ipam/iprange/index.html
+%%DATADIR%%/project-static/docs/models/ipam/prefix/index.html
+%%DATADIR%%/project-static/docs/models/ipam/rir/index.html
+%%DATADIR%%/project-static/docs/models/ipam/role/index.html
+%%DATADIR%%/project-static/docs/models/ipam/routetarget/index.html
+%%DATADIR%%/project-static/docs/models/ipam/service/index.html
+%%DATADIR%%/project-static/docs/models/ipam/vlan/index.html
+%%DATADIR%%/project-static/docs/models/ipam/vlangroup/index.html
+%%DATADIR%%/project-static/docs/models/ipam/vrf/index.html
+%%DATADIR%%/project-static/docs/models/tenancy/tenant/index.html
+%%DATADIR%%/project-static/docs/models/tenancy/tenantgroup/index.html
+%%DATADIR%%/project-static/docs/models/users/objectpermission/index.html
+%%DATADIR%%/project-static/docs/models/users/token/index.html
+%%DATADIR%%/project-static/docs/models/virtualization/cluster/index.html
+%%DATADIR%%/project-static/docs/models/virtualization/clustergroup/index.html
+%%DATADIR%%/project-static/docs/models/virtualization/clustertype/index.html
+%%DATADIR%%/project-static/docs/models/virtualization/virtualmachine/index.html
+%%DATADIR%%/project-static/docs/models/virtualization/vminterface/index.html
+%%DATADIR%%/project-static/docs/netbox_logo.png
+%%DATADIR%%/project-static/docs/netbox_logo.svg
+%%DATADIR%%/project-static/docs/plugins/development/index.html
+%%DATADIR%%/project-static/docs/plugins/index.html
+%%DATADIR%%/project-static/docs/release-notes/index.html
+%%DATADIR%%/project-static/docs/release-notes/version-2.0/index.html
+%%DATADIR%%/project-static/docs/release-notes/version-2.1/index.html
+%%DATADIR%%/project-static/docs/release-notes/version-2.10/index.html
+%%DATADIR%%/project-static/docs/release-notes/version-2.11/index.html
+%%DATADIR%%/project-static/docs/release-notes/version-2.2/index.html
+%%DATADIR%%/project-static/docs/release-notes/version-2.3/index.html
+%%DATADIR%%/project-static/docs/release-notes/version-2.4/index.html
+%%DATADIR%%/project-static/docs/release-notes/version-2.5/index.html
+%%DATADIR%%/project-static/docs/release-notes/version-2.6/index.html
+%%DATADIR%%/project-static/docs/release-notes/version-2.7/index.html
+%%DATADIR%%/project-static/docs/release-notes/version-2.8/index.html
+%%DATADIR%%/project-static/docs/release-notes/version-2.9/index.html
+%%DATADIR%%/project-static/docs/release-notes/version-3.0/index.html
+%%DATADIR%%/project-static/docs/requirements.txt
+%%DATADIR%%/project-static/docs/rest-api/authentication/index.html
+%%DATADIR%%/project-static/docs/rest-api/filtering/index.html
+%%DATADIR%%/project-static/docs/rest-api/overview/index.html
+%%DATADIR%%/project-static/docs/search/search_index.json
+%%DATADIR%%/project-static/docs/sitemap.xml
+%%DATADIR%%/project-static/docs/sitemap.xml.gz
 %%DATADIR%%/project-static/img/graphql.ico
 %%DATADIR%%/project-static/img/netbox.ico
 %%DATADIR%%/project-static/img/netbox_icon.svg