%define         package_version 0.9.4
%define         package_release 1%{?_dist_release}

Name:           liboauth
Version:        %{package_version}
Release:        %{package_release}
Summary:        A collection of POSIX-c functions implementing the OAuth Core RFC 5849 standard

Group:          System Environment/Libraries
License:        MIT
URL:            http://www.clutter-project.org/
Source0:        http://sourceforge.net/projects/liboauth/files/%{name}-%{version}.tar.gz

BuildRoot:      %{_tmppath}/%{name}-%{version}-root

BuildRequires:	curl-devel
BuildRequires:	nss-devel

Vendor: Project Vine
Distribution: Vine Linux
Packager: Takemikaduchi

%description
liboauth is a collection of POSIX-c functions implementing the OAuth Core RFC 5849 standard.
liboauth provides functions to escape and encode parameters according to OAuth specification
and offers high-level functionality to sign requests or verify OAuth signatures as well as
perform HTTP requests.

liboauth depends on either on the OpenSSL library or on NSS (Mozilla's Network Security Services),
which are used for generating the hash/signature, and optionally libcurl for issuing HTTP requests.


%package	devel
Summary:        Development tools for liboauth
Summary(ja):    liboauth の開発環境
Group:          Development/Libraries
Requires:       %{name} = %{version}-%{release}
Requires:       pkgconfig
Requires:       curl-devel
Requires:       nss-devel

%description	devel
Header files and libraries for building a extension library for the
liboauth.


%prep
%setup -q

%build
%configure --disable-static --enable-nss


make %{?_smp_mflags}

%install
rm -rf $RPM_BUILD_ROOT

make DESTDIR=$RPM_BUILD_ROOT install

rm -f $RPM_BUILD_ROOT%{_libdir}/*.la

%clean
rm -rf $RPM_BUILD_ROOT

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%defattr(-,root,root,-)
%doc ChangeLog AUTHORS COPYING NEWS README
%{_libdir}/*.so.*
%{_mandir}/man3/oauth.3.gz

%files devel
%defattr(-, root, root)
%{_includedir}/oauth.h
%{_libdir}/*.so
%{_libdir}/pkgconfig/*.pc


%changelog
* Mon Aug 15 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.9.4-1
- initial build for Vine Linux

