From 43926c44661a9f8499b3fb9775e1cfdd4aef2bdf Mon Sep 17 00:00:00 2001 From: Rémy Oudompheng Date: Sun, 19 Jun 2011 21:01:55 +0200 Subject: Allow using markdown instead of pandoc, packaging fixes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rémy Oudompheng --- Makefile | 9 ++++----- README | 4 ++++ docs/make.sh | 14 ++++++++++++-- scripts/netcfg | 2 +- 4 files changed, 21 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 07391a1..a0074e3 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ DESTDIR= -VERSION=2.6 +VERSION=2.6rc1 VPATH = doc .PHONY: install docs @@ -45,13 +45,12 @@ install-docs: docs install -m644 contrib/* $(DESTDIR)/usr/share/doc/netcfg/contrib/ docs: - cd docs; \ - ./make.sh + cd docs && ./make.sh tarball: docs - sed -i "s/NETCFG_VER=.*/NETCFG_VER=$(VERSION)/g" src/netcfg + sed -i "s/NETCFG_VER=.*/NETCFG_VER=$(VERSION)/g" scripts/netcfg mkdir -p netcfg-$(VERSION) - cp -r src src-wireless ifplugd wpa_actiond examples contrib man Makefile LICENSE README netcfg-$(VERSION) + cp -r src scripts src-wireless ifplugd wpa_actiond examples contrib man Makefile LICENSE README netcfg-$(VERSION) tar -zcvf netcfg-$(VERSION).tar.gz netcfg-$(VERSION) rm -rf netcfg-$(VERSION) diff --git a/README b/README index 427c670..7121de0 100644 --- a/README +++ b/README @@ -17,3 +17,7 @@ For wireless support: Deprecated dependencies: - net-tools (only used in IFOPTS option) - wireless_tools (only used for IWCONFIG option, still necessary for wireless connection) + +For documentation generation: +- python-markdown, or pandoc + diff --git a/docs/make.sh b/docs/make.sh index 544d1f3..76a30af 100755 --- a/docs/make.sh +++ b/docs/make.sh @@ -1,7 +1,17 @@ #! /bin/bash PAGES=(ethernet features wireless) +make_page() { + echo '' + grep -v '^%' $1 | markdown -x def_list -x headerid /dev/stdin + echo '' +} + for page in ${PAGES[@]}; do - rm ${page}.html - pandoc -s --toc -w html --email-obfuscation=javascript -c header.css -o ${page}.html $page + rm -f ${page}.html + if [ -f /usr/bin/pandoc ]; then + pandoc -s --toc -w html --email-obfuscation=javascript -c header.css -o ${page}.html $page + else + make_page $page > ${page}.html + fi done diff --git a/scripts/netcfg b/scripts/netcfg index e00794d..7b8fa8a 100755 --- a/scripts/netcfg +++ b/scripts/netcfg @@ -2,7 +2,7 @@ . /usr/lib/network/network -NETCFG_VER=2.6 +NETCFG_VER=2.6rc1 version() { -- cgit v1.2.3-24-g4f1b