# Makefile for creating newbiedoc package
#
# Version 0.8
# Copyright 2007-2009 Chris Lale.
# chrislale@users.berlios.de
#
#    This program is free software: you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation, either version 3 of the License, or
#    (at your option) any later version.
#
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with this program.  If not, see <http://www.gnu.org/licenses/>.

install:
	install -d $(DESTDIR)/usr/share/doc/newbiedoc/newbiedoc.berlios.de
	install -d $(DESTDIR)/usr/share/doc/newbiedoc/newbiedoc.berlios.de/images
	install -d $(DESTDIR)/usr/share/doc/newbiedoc/newbiedoc.berlios.de/wiki
	cp -aR newbiedoc.berlios.de/* $(DESTDIR)/usr/share/doc/newbiedoc/newbiedoc.berlios.de
	cp newbiedoc $(DESTDIR)/usr/bin
	cp newbiedoc-icon.png $(DESTDIR)/usr/share/doc/newbiedoc/newbiedoc.berlios.de/images
	
uninstall:
	rm -r $(DESTDIR)/usr/share/doc/newbiedoc/
	rm $(DESTDIR)/usr/bin/newbiedoc

all:
	# Invoke the download, and modify scripts and find to download
	# and modify pages from the NewbieDOC wiki and construct a stand-alone
	# non-interactive website from them.
	#
	# Download wiki pages and linked files, eg images.
	./download
	
	# Find the wiki pages and convert them to standalone html	
	# and remove original unconverted wiki pages
	./createweb
