LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File ibrowse.spec of Package ibrowse (Project home:Ledest:erlang:20)

%define bname ibrowse
Name: %bname
Version: 4.4.0
Release: 1
Summary: A HTTP client written in Erlang
License: LGPL-2.1+
Group: Development/Tools/Other
URL: https://github.com/cmullaparthi/%bname
Source: %bname-%version.tar.xz
#Patch: %bname-%version-git.patch
BuildArch: noarch
Provides: erlang-%bname = %version-%release

BuildRequires: rpm-macros-erlang rpm-build-erlang
BuildRequires: rebar >= 2.6.1-7
BuildRequires: erlang-otp-base-devel

%description
%Name is a HTTP client written in Erlang.


%package devel
Summary: Headers for %name
Group: Development/Tools/Other

%description devel
%Name is a HTTP client written in Erlang.
This package contains headers for %name.


%package doc
Summary: Headers for %name
Group: Documentation/HTML

%description doc
%Name is a HTTP client written in Erlang.
This package contains HTML documentation for %name and examples.


%prep
%setup -q -n %bname-%version
#patch -p1


%build
erl -noshell -eval '
{ok, L} = file:consult("rebar.config"),
file:write_file("%bname.rebar.config",
                lists:map(fun(E) -> [io_lib:print(E), ".\n"] end,
                          [{erl_opts, [slim, inline, no_debug_info, nowarn_deprecated_function|lists:delete(debug_info, proplists:get_value(erl_opts, L, []))]}|lists:foldl(fun proplists:delete/2, L, [erl_opts])])),
halt().'
rebar -C %bname.rebar.config compile -v
rebar -C %bname.rebar.config doc -v


%install
for i in ebin include priv; do
	install -d -m 0755 %buildroot%_otplibdir/%bname-%version/$i
	install -p -m 0644 $i/* %buildroot%_otplibdir/%bname-%version/$i/
done
install -d -m 0755 %buildroot%_otplibdir/%bname-%version/doc
install -p -m 0644 doc/*.{css,html,png} %buildroot%_otplibdir/%bname-%version/doc/
install -d -m 0755 %buildroot%_docdir/%name
ln -sf %_otplibdir/%bname-%version/doc %buildroot%_docdir/%name/html


%check
rebar -C %bname.rebar.config eunit


%files
%defattr(-,root,root)
%dir %_otplibdir/*
%_otplibdir/*/ebin
%_otplibdir/*/priv


%files devel
%defattr(-,root,root)
%_otplibdir/*/include


%files doc
%defattr(-,root,root)
%doc %dir %_otplibdir/*
%doc %_otplibdir/*/doc
%doc %_docdir/%name


%changelog
* Thu Feb 09 2017 Led <ledest@gmail.com> 4.4.0-1
- 4.4.0

* Sun Dec 18 2016 Led <ledest@gmail.com> 4.3-4
- git 303bc1f

* Fri Jul 15 2016 Led <ledest@gmail.com> 4.3-3
- add nowarn_deprecated_function compile option

* Fri Jul 15 2016 Led <ledest@gmail.com> 4.3-2
- add nowarn_deprecated_function eunit option

* Fri Jul 15 2016 Led <ledest@gmail.com> 4.3-1
- 4.3

* Wed Jun 08 2016 Led <ledest@gmail.com> 4.2.4-1
- 4.2.4

* Wed Jun 08 2016 Led <ledest@gmail.com> 4.2.2-3
- clean up BuildRequires

* Sun Feb 21 2016 Led <ledest@gmail.com> 4.2.2-2
- git b5c705c

* Mon Nov 30 2015 Led <ledest@gmail.com> 4.2.2-1
- 4.2.2

* Sun Sep 13 2015 Led <ledest@gmail.com> 4.2-1
- 4.2
- disable debug_info

* Sun Sep 13 2015 Led <ledest@gmail.com> 4.1.2-1
- 4.1.2
- remove patches:
  + ibrowse-4.1.1-git.patch

* Sat Jul 04 2015 Led <ledest@gmail.com> 4.1.1-3
- update patches:
  + ibrowse-4.1.1-git.patch

* Thu Jul 02 2015 Led <ledest@gmail.com> 4.1.1-2
- fix build with Erlang 18

* Sun Apr 12 2015 Led <ledest@gmail.com> 4.1.1-1
- 4.1.1
- clean up spec

* Tue Apr 03 2012 Led <led@massivesolutions.co.uk> 3.0.3-1
- initial build