#!/bin/bash
#
# Build file for package TkKasse-Doc
#
# (C) by Jan Kandziora <tkkasse@users.sf.net>
#
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#


PRISTINE_SOURCE_PATH=..
MODULE_NAME=TkKasse-Doc
SOURCE_PATH=~/src/packages/SOURCES
VERSION=1.0
RELEASE=1


rm -r $SOURCE_PATH/${MODULE_NAME}*
cp -R $PRISTINE_SOURCE_PATH/$MODULE_NAME $SOURCE_PATH/${MODULE_NAME}-$VERSION
tar -cj -f $SOURCE_PATH/${MODULE_NAME}-$VERSION.tar.bz2 --exclude '.*' --exclude CVS -C $SOURCE_PATH ${MODULE_NAME}-$VERSION
cat >$SOURCE_PATH/${MODULE_NAME}.spec <<EOT
AutoReqProv:   yes
BuildRequires: bash, binutils, bzip2, coreutils, diffutils, docbook-utils, rpm, sgml-skel, tar
BuildRoot:     %{_tmppath}/%{name}-%{version}-build
Group:         Productivity/Other
License:       GPL
Name:          $MODULE_NAME
Packager:      Jan Kandziora <tkkasse@users.sf.net>
#Patch:
Release:       $RELEASE
Summary:       Documentation for the whole TkKasse cash desk system
Source:        http://prdownloads.sf.net/tkkasse/%{name}-%{version}.tar.bz2
URL:           http://tkkasse.sf.net/
Version:       $VERSION

%description
This is the documentation package for the Tkkasse cash register system.
It contains an installation manual (and will contain an user manual in
the future, too).

I know, the installation manual is a raw sketch only, but I hope it
helps you anyway. Please encourage me to write more.

Author: Jan Kandziora <tkkasse@users.sf.net>

%prep
%setup -n %{name}-%{version}
#%patch

%build
rm -rf \$RPM_BUILD_ROOT
cp /usr/share/sgml/docbook/dsssl-stylesheets*/images/*.gif .
jw -V %admon-graphics-path%= -u installationmanual.sgml

%install
rm -rf \$RPM_BUILD_ROOT

%clean
rm -rf \$RPM_BUILD_ROOT

%files
%defattr(-,root,root)
%doc COPYING ChangeLog PEOPLE README installationmanual.html *.gif
%changelog -n %{name}
* Wed Apr 06 2005 - tkkasse@users.sf.net
- initial package
EOT

rpmbuild -ba -v --target noarch $SOURCE_PATH/${MODULE_NAME}.spec

