File erlang-mochiweb.spec of Package erlang-mochiweb
#
# spec file for package erlang-mochiweb
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: erlang-mochiweb
Version: v2.4.2+git.1363748048.15bc558
%define mod_ver %(echo "%{version}" | cut -d "+" -f1)
Release: 0
Summary: Erlang library for building lightweight HTTP servers
License: MIT
Group: Development/Libraries/Other
Url: http://tonyg.github.com/erlang-mochiweb/
Source: mochiweb-%{version}.tar.gz
BuildRequires: erlang-rebar
Requires: erlang
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
MochiWeb is an Erlang library for building lightweight HTTP servers.
%package devel
Summary: Erlang library for building lightweight HTTP servers
Group: Development/Libraries/Other
Requires: %{name} = %{version}
Provides: %{name}-src = %{version}
#TODO: Change back to '<' after next version update:
Obsoletes: %{name}-src <= %{version}
%description devel
MochiWeb is an Erlang library for building lightweight HTTP servers
%prep
%setup -n mochiweb-%{version}
%build
%rebar compile escriptize
%install
for dir in include ebin src support ; do
install -d %{buildroot}%{erlang_libdir}/mochiweb-%{mod_ver}/${dir}
cp -r ${dir}/* %{buildroot}%{erlang_libdir}/mochiweb-%{mod_ver}/${dir}/
done
%check
%rebar ct
%files
%defattr(-,root,root)
%doc README LICENSE examples
%dir %{erlang_libdir}/mochiweb-%{mod_ver}
%{erlang_libdir}/mochiweb-%{mod_ver}/ebin
%{erlang_libdir}/mochiweb-%{mod_ver}/support
%files devel
%defattr(-,root,root)
%{erlang_libdir}/mochiweb-%{mod_ver}/include
%{erlang_libdir}/mochiweb-%{mod_ver}/src