#################################################################################
# RPM spec file for argtable
#
# See http://www.rpm.org/max-rpm for a good discussion on building rpm packages
#
# Note: the argtable configure script generates the argtable.spec
#       file from the argtable.spec.in template.
#################################################################################

Summary: An ANSI C library for parsing GNU style command line arguments.
Name: argtable 
Version: 2.@PACKAGE_VERSION@
Release: 0
Copyright: LGPL
Group: Development/Libraries
Source: http://prdownloads.sourceforge.net/argtable/argtable-2.@PACKAGE_VERSION@.tar.gz
URL: http://argtable.sourceforge.net
Packager: Stewart Heitmann <sheitmann@users.sourceforge.net>
Prefix: /usr/local

%description
Argtable is an ANSI C library for parsing GNU style command line arguments.
It allows the programmer to define the command line arguments in their program
as a static array of structs. The argtable library functions then parse the
command line arguments according the specifications in that array.
The resulting argument values are deposited into user-defined program variables
from where they can be accessed by the main program.
Command line errors are trapped automatically and appropriate error messages generated.
The library also provides the means for displaying the command line syntax directly
from the array of argument specifications.

%prep
#remove any old build tree for this package then untar a fresh one
rm -rf $RPM_BUILD_DIR/argtable2
tar -xvzf $RPM_SOURCE_DIR/argtable-2.@PACKAGE_VERSION@.tar.gz

%build
cd argtable2
./configure  --prefix=/usr/local
make

%install
cd argtable2
make install

%clean
cd argtable2
make clean

%files
/usr/local/include/argtable2.h
/usr/local/lib/libargtable2.a
/usr/local/lib/libargtable2.so.@PACKAGE_VERSION@
/usr/local/lib/libargtable2.so
%docdir /usr/local/share/doc/argtable2
/usr/local/share/doc/argtable2
%doc /usr/local/man/man3/argtable2.3

%post 
