# Note that this is NOT a relocatable package
%define ver      @VERSION@
%define pkg      @PACKAGE@
%define rel      3
%define prefix   /usr

Summary:   libtrain -- the train route library
Name:      %pkg
Version:   %ver
Release:   %rel
Group:     Applications/Productivity
Copyright: GPL
Source:    %{pkg}-%{ver}.tar.gz
URL:       http://www.on.rim.or.jp/~katamuki/software/
Packager:  FURUKAWA Yo <katamuki@on.rim.or.jp>
BuildRoot: /tmp/%{pkg}-%{ver}-root
Docdir:    %{prefix}/doc

%description
libtrain -- the train route library

%description -l ja
libtrain -- Ŵƻ��ϩõ���饤�֥��

%prep
%setup

rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/usr/bin

%build
CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{prefix}
make

%install
make prefix=$RPM_BUILD_ROOT%{prefix} install

%clean
rm -rf $RPM_BUILD_ROOT

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%defattr(-, root, root)
%doc AUTHORS BUGS COPYING ChangeLog INSTALL NEWS README doc/SETUP
%{prefix}/bin/train
%{prefix}/lib/libtrain.a
%{prefix}/lib/libtrain.la
%{prefix}/lib/libtrain.so
%{prefix}/lib/libtrain.so.1
%{prefix}/lib/libtrain.so.1.0.0
%{prefix}/share/libtrain/train.ini
%{prefix}/include/libtrain.h

%changelog
