Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/devel' into feature/remote-clients
Browse files Browse the repository at this point in the history
Conflicts:
	debian/control
	html/pfappserver/root/static.alt/src/views/Configuration/_config/provisioning.js
	html/pfappserver/root/static.alt/src/views/Configuration/provisioners/schema.js
	rpm/packetfence.spec
  • Loading branch information
julsemaan committed Jan 18, 2021
2 parents d119af1 dae3f6a commit e60c476
Show file tree
Hide file tree
Showing 2,361 changed files with 5,600 additions and 35,624 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 233,8 @@ docs/*.fo
docs/docbook/xsl/import-fo.xsl
docs/docbook/xsl/titlepage-fo.xsl
docs/docbook/*.docbook
docs/html/*.html
docs/html/index.js
docs/*.html
docs/index.js

# trap stats graphs
# TODO we should move them under var/
Expand Down
79 changes: 20 additions & 59 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,11 1,4 @@
include config.mk
DOCBOOK_XSL := /usr/share/xml/docbook/stylesheet/docbook-xsl
UNAME := $(shell uname -s)
ifeq ($(UNAME),Darwin)
DOCBOOK_XSL := /opt/local/share/xsl/docbook-xsl
else ifneq ("$(wildcard /etc/redhat-release)","")
DOCBOOK_XSL := /usr/share/sgml/docbook/xsl-stylesheets
endif

all:
@echo "Please chose which documentation to build:"
Expand All @@ -17,89 10,57 @@ all:
@echo " 'docs/PacketFence_Network_Devices_Configuration_Guide.pdf' will build the Network Devices Configuration guide in PDF"
@echo " 'docs/PacketFence_Upgrade_Guide.pdf' will build the Upgrade guide in PDF"

DOCINFO_XMLS := $(notdir $(wildcard docs/PacketFence_*-docinfo.xml))
ASCIIDOCS := $(patsubst %-docinfo.xml, %.asciidoc, $(DOCINFO_XMLS))
ASCIIDOCS := $(notdir $(wildcard docs/PacketFence_*.asciidoc))
PDFS = $(patsubst %.asciidoc,docs/%.pdf, $(ASCIIDOCS))

docs/docbook/xsl/titlepage-fo.xsl: docs/docbook/xsl/titlepage-fo.xml
xsltproc \
-o docs/docbook/xsl/titlepage-fo.xsl \
$(DOCBOOK_XSL)/template/titlepage.xsl \
docs/docbook/xsl/titlepage-fo.xml

docs/docbook/xsl/import-fo.xsl:
@echo "<?xml version='1.0'?> \
<xsl:stylesheet \
xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\" \
xmlns:fo=\"http://www.w3.org/1999/XSL/Format\" \
version=\"1.0\"> \
<xsl:import href=\"${DOCBOOK_XSL}/fo/docbook.xsl\"/> \
</xsl:stylesheet>" \
> docs/docbook/xsl/import-fo.xsl

docs/docbook/%.docbook: docs/%.asciidoc
asciidoc \
-a docinfo2 \
-b docbook \
-d book \
-f docs/docbook/docbook45.conf \
-o $@ $<

docs/%.fo: docs/docbook/%.docbook docs/docbook/xsl/titlepage-fo.xsl docs/docbook/xsl/import-fo.xsl
xsltproc \
-o $@ \
docs/docbook/xsl/packetfence-fo.xsl \
$<
clean:
rm -f docs/*.html docs/*.pdf

docs/%.pdf: docs/%.fo
fop \
-c docs/fonts/fop-config.xml \
$< -pdf $@
docs/%.pdf: docs/%.asciidoc
asciidoctor-pdf \
-a pdf-theme=docs/asciidoctor-pdf-theme.yml \
-a pdf-fontsdir=docs/fonts \
-a release_version=`cat conf/pf-release | cut -d' ' -f 2` \
-a release_month=`date %B` \
$<

.PHONY: pdf

pdf: $(PDFS)

HTML = $(patsubst %.asciidoc,docs/html/%.html, $(ASCIIDOCS))
HTML = $(patsubst %.asciidoc,docs/%.html, $(ASCIIDOCS))

docs/html/%.html: docs/%.asciidoc
docs/%.html: docs/%.asciidoc
asciidoctor \
-D docs/html \
-n \
-r ./docs/html/asciidoctor-html.rb \
-a imagesdir=../images \
-r ./docs/asciidoctor-html.rb \
-a stylesdir=../html/pfappserver/root/static.alt/dist/css \
-a stylesheet=$(notdir $(wildcard ./html/pfappserver/root/static.alt/dist/css/app*.css)) \
-a release_version=`cat conf/pf-release | cut -d' ' -f 2` \
-a release_month=`date %B` \
$<

html/pfappserver/root/static/doc:
make html
mkdir html/pfappserver/root/static/doc
mkdir html/pfappserver/root/static/images
cp -a docs/html/* html/pfappserver/root/static/doc
cp -a docs/images/* html/pfappserver/root/static/images

docs/html/index.js: $(HTML)
docs/index.js: $(HTML)
find $$(dirname "$@") -type f -iname '*.html' -and -not -iname '*template*' -printf "{\"name\":\"%f\", \"size\":%s, \"last_modifed\" : %T@}\n" | jq -s '{ items: [ .[] | {name, size, last_modifed : (.last_modifed*1000 | floor)} ] }' > $@

.PHONY: images

images:
@echo "install images dir and all subdirectories"
for subdir in `find docs/images/* -type d -printf "%f\n"` ; do \
install -d -m0755 $(DESTDIR)/usr/local/pf/html/pfappserver/root/static/images/$$subdir ; \
install -d -m0755 $(DESTDIR)/usr/local/pf/html/pfappserver/root/static/doc/images/$$subdir ; \
for img in `find docs/images/$$subdir -type f`; do \
install -m0644 $$img $(DESTDIR)/usr/local/pf/html/pfappserver/root/static/images/$$subdir ; \
install -m0644 $$img $(DESTDIR)/usr/local/pf/html/pfappserver/root/static/doc/images/$$subdir ; \
done \
done
@echo "install only images at depth0 in images/ directory"
for img in `find docs/images/* -maxdepth 0 -type f`; do \
install -m0644 $$img $(DESTDIR)/usr/local/pf/html/pfappserver/root/static/images/ ; \
install -m0644 $$img $(DESTDIR)/usr/local/pf/html/pfappserver/root/static/doc/images/ ; \
done

.PHONY: html

html: $(HTML) docs/html/index.js
html: $(HTML) docs/index.js

pfcmd.help:
/usr/local/pf/bin/pfcmd help > docs/installation/pfcmd.help
Expand Down
1 change: 1 addition & 0 deletions NEWS.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 41,7 @@ For a list of compatibility related changes see the <<PacketFence_Upgrade_Guide.
* Improve support of Android Agent for EAP-TLS and EAP-PEAP
* Improve CLI login support on HP and Aruba switches
* Use the "Authorization" header when performing API calls to Github in the OAuth context
* Replace xsltproc/fop by asciidoctor-pdf (#5968)
=== Bug Fixes
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 20,9 @@ Follow the instructions provided in the [Administration Guide](https://packetfen

## More Information

Noteworthy changes since the last release see the [NEWS](https://github.com/inverse-inc/packetfence/blob/devel/NEWS.asciidoc) file.
Noteworthy changes since the last release see the [NEWS file](https://github.com/inverse-inc/packetfence/blob/devel/NEWS.asciidoc).

Upgrading? See the [UPGRADE](https://github.com/inverse-inc/packetfence/blob/devel/UPGRADE.asciidoc) file.
Upgrading? See the [Upgrade Guide](https://github.com/inverse-inc/packetfence/blob/devel/docs/PacketFence_Upgrade_Guide.asciidoc.asciidoc).

For more details and developer visible changes see the [project's page on Github](https://github.com/inverse-inc/packetfence).

Expand Down
Loading

0 comments on commit e60c476

Please sign in to comment.