Blob Blame History Raw
%define debug_package %{nil}
%define realname erlsom


Name:		erlang-%{realname}
Summary:	Support for XML Schema in Erlang
Version:	1.2.1
Release:	5%{?dist}
Group:		System Environment/Libraries
URL:		http://sourceforge.net/projects/erlsom/
Source0:	http://downloads.sourceforge.net/%{realname}/%{realname}-%{version}.tar.gz
License:	GPLv3+
Provides:	%{realname} = %{version}-%{release}
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires:	erlang
BuildRequires:	dos2unix
%if 0%{?el4}%{?el5}%{?fc11}
Requires:	erlang
%else
Requires:	erlang-erts
Requires:	erlang-inets
Requires:	erlang-kernel
Requires:	erlang-stdlib
Requires:	erlang-xmerl
%endif


%description
Erlsom is a set of functions to deal with XML Schema (XSDs) in Erlang.
First you 'compile' the schema, and after that you can parse XML
documents that conform to the schema. The result is a structure of
Erlang records, based on the types that are defined by the Schema.
Or, the other way around, a structure of records can be translated
to an XML document.


%prep
%setup -q -c %{realname}-%{version}
find -type f -regex ".*\(xsd\|erl\|hrl\|xml\|src\|htm\)" -exec dos2unix {} \;
find -type f -name Makefile -exec dos2unix {} \;
find -type f -name "config*" -exec dos2unix {} \;
dos2unix include.mk.in install-sh make-release make-upload vsn.mk COPYING COPYING.LESSER
chmod 755 configure
rm -f ebin/.empty
iconv -f iso8859-1 -t UTF-8 examples/example1/example1.erl > examples/example1/example1.utf8 && mv examples/example1/example1.{utf8,erl}


%build
%configure
make %{?_smp_mflags}


%install
rm -rf %{buildroot}
make DESTDIR=%{buildroot} install


%clean
rm -rf %{buildroot}


%files
%defattr(-, root, root)
%doc examples COPYING COPYING.LESSER doc/erlsom.doc doc/erlsom.htm doc/image001.gif
%dir %{_libdir}/erlang/lib/%{realname}-%{version}
%dir %{_libdir}/erlang/lib/%{realname}-%{version}/ebin
%dir %{_libdir}/erlang/lib/%{realname}-%{version}/include
%{_libdir}/erlang/lib/%{realname}-%{version}/ebin/%{realname}.app
%{_libdir}/erlang/lib/%{realname}-%{version}/ebin/*.beam
%{_libdir}/erlang/lib/%{realname}-%{version}/include/%{realname}.hrl


%changelog
* Fri May 28 2010 Peter Lemenkov <lemenkov@gmail.com> 1.2.1-5
- Narrow explicit requires

* Mon Jul  6 2009 Peter Lemenkov <lemenkov@gmail.com> 1.2.1-4
- Stop using macros for 'rm' and 'make'
- Corrected license field

* Thu Jun  4 2009 Peter Lemenkov <lemenkov@gmail.com> 1.2.1-3
- Added missing BR dos2unix

* Tue Apr 21 2009 Peter Lemenkov <lemenkov@gmail.com> 1.2.1-2
- Get rid of unnecessary source files

* Thu May  8 2008 Peter Lemenkov <lemenkov@gmail.com> 1.2.1-1
- Ver. 1.2.1

* Fri Oct 26 2007 Peter Lemenkov <lemenkov@gmail.com> 1.0.0-1
- Initial build for Fedora