%define nant_dir %{_datadir}/NAnt/bin
Summary: A .NET based build tool
Summary(ja): .NET をベースにしたビルドツール
Name: nant
Version: 0.90
Release: 1%{?_dist_release}
License: GPL v2+
Group: Development/Tools
URL: http://nant.sourceforge.net/
Source: %{name}-%{version}-src.tar.gz
BuildArch: noarch
BuildRequires: mono-core
BuildRequires: mono-devel
BuildRequires: pkgconfig
Requires: mono-core
BuildRoot: %{_tmppath}/%{name}-%{version}-root
Vendor: Project Vine
Distribution: Vine Linux

%description
NAnt is a .NET based build tool. In theory it is kind of like make
without make's wrinkles. In practice it's a lot like Ant.

%prep
%setup -q

%build
%{__make}

%install
rm -rf $RPM_BUILD_ROOT
mono bootstrap/NAnt.exe -f:NAnt.build install-linux -D:install.prefix=$RPM_BUILD_ROOT%{_prefix}

mkdir -p $RPM_BUILD_ROOT%{_datadir}/pkgconfig
mv $RPM_BUILD_ROOT%{_prefix}/lib/pkgconfig/%{name}.pc $RPM_BUILD_ROOT%{_datadir}/pkgconfig

## script nant is exist, but fix it
cat << EOF > $RPM_BUILD_ROOT%{_bindir}/nant
#!/bin/sh
exec mono %{_datadir}/NAnt/bin/NAnt.exe "\$@"
EOF


%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
%doc COPYING.txt README.txt doc/*
%{_bindir}/nant
%{_datadir}/pkgconfig/%{name}.pc
%dir %{nant_dir}
%{nant_dir}/*

%changelog
* Tue Oct 12 2010 Shu KONNO <owa@bg.wakwak.com> 0.90-1
- initial build for VineSeed

