%define version 0.44.1

Summary: MAL (Mobil Application Link) library
Name: libmal
Version: %{version}
Release: 2%{?_dist_release}

Group: System Environment/Libraries
License: MPL
URL: http://www.jlogday.com/code/libmal/

Source: http://http://www.jlogday.com/code/libmal/libmal-%{version}.tar.gz

BuildRoot: %{_tmppath}/%{name}-%{version}-root
BuildRequires: pilot-link-devel

%description
libmal is really just a convenience library of the functions in Tom Whittaker's
malsync distribution, along with a few wrapper functions. 

%package devel
Summary: Development files for libmal
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}

%description devel
Development files for libmal

%prep
%setup -q

%build
%configure --disable-static FORCE_PILOT_LIBS=%{_libdir}
make

%install
rm -rf $RPM_BUILD_ROOT
make DESTDIR=$RPM_BUILD_ROOT install

## remove unuse files
rm -rf %{buildroot}%{_libdir}/*.la

%clean
rm -rf $RPM_BUILD_ROOT

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%defattr(-,root,root)
%doc README ChangeLog MPL-1_0.txt TODO
%{_bindir}/*
%{_libdir}/*.so.*

%files devel
%defattr(-,root,root)
%{_includedir}/libmal/*
%{_libdir}/*.so

%changelog
* Thu Sep 30 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.44.1-2
- added BR: pilot-link-devel

* Thu Apr 29 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.44.1-1
- new upstream release
- built with new toolchain
- added --disable-static to %%configure

* Mon Sep 08 2008 Shu KONNO <owa@bg.wakwak.com> 0.42-1vl5
- applied new versioning policy
- added FORCE_PILOT_LIBS to %%configure
- removed *.la

* Sat Dec  2 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.42-0vl1
- new upstream release
- rebuilt with new pilot-link
- added %post and %postun section
- changed Group to System Environment/Libraries

* Mon Jul 21 2003 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 0.31-0vl1
- build for VineSeed

* Tue Jan 21 2003 Jason Day <jasonday@worldnet.att.net>
- Initial version