%global realname etorrent %global debug_package %{nil} %global git_tag 229f2de Name: erlang-%{realname} Version: 1.1.2 Release: 1%{?dist} Summary: Erlang BitTorrent client and library Group: Development/Languages License: BSD URL: http://github.com/jlouis/etorrent # wget --no-check-certificate https://github.com/jlouis/etorrent/tarball/v1.1.2 Source0: jlouis-%{realname}-v%{version}-0-g%{git_tag}.tar.gz Patch1: erlang-etorrent-0001-Fix-required-Erlang-OTP-version.patch BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) BuildRequires: erlang-erts BuildRequires: erlang-eunit BuildRequires: erlang-gproc BuildRequires: erlang-rebar Requires: erlang-crypto Requires: erlang-erts Requires: erlang-gproc Requires: erlang-inets Requires: erlang-kernel Requires: erlang-mnesia Requires: erlang-stdlib Provides: %{realname} = %{version}-%{release} %description This is a BitTorrent client and a library written in Erlang. The focus is on robustness and scalability in number of torrents rather than in pure speed. Etorrent is mostly meant for unattended operation, where one just specifies what files to download and gets a notification when they are. %prep %setup -q -n jlouis-%{realname}-1a16d56 %patch1 -p1 -b .fix_required_otp sed -e 's,%%%%%%BEAMDIR%%%%%%,%{_libdir}/erlang/lib/%{realname}-%{version}/ebin,g;s,%%%%%%CONFIGFILE%%%%%%,%{_sysconfdir}/%{realname}/%{realname}.config,g;s,%%%%%%ERL_FLAGS%%%%%%,,g' \ bin/etorrentctl.in > bin/etorrentctl %build make %{?_smp_mflags} %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT%{_libdir}/erlang/lib/%{realname}-%{version}/{ebin,include,priv} cd apps/%{realname} # Erlang VM binary data and includes install -p -m 644 ebin/%{realname}.app $RPM_BUILD_ROOT%{_libdir}/erlang/lib/%{realname}-%{version}/ebin install -p -m 644 ebin/*.beam $RPM_BUILD_ROOT%{_libdir}/erlang/lib/%{realname}-%{version}/ebin install -p -m 644 include/*.hrl $RPM_BUILD_ROOT%{_libdir}/erlang/lib/%{realname}-%{version}/include # Copy WebUI data cp -r priv/webui $RPM_BUILD_ROOT%{_libdir}/erlang/lib/%{realname}-%{version}/priv # return from apps folder cd - # config files install -D -p -m 0644 rel/files/app.config $RPM_BUILD_ROOT%{_sysconfdir}/%{realname}/app.config # startup script install -D -p -m 0755 bin/etorrentctl $RPM_BUILD_ROOT%{_sbindir}/etorrentctl %clean rm -rf $RPM_BUILD_ROOT %check make eunit %files %defattr(-,root,root,-) %doc AUTHORS COPYING HACKING NEWS README.md documentation/ %config(noreplace) %{_sysconfdir}/%{realname}/app.config %{_libdir}/erlang/lib/%{realname}-%{version} %{_sbindir}/etorrentctl %changelog * Wed Nov 10 2010 Peter Lemenkov - 1.1.2-1 - Ver. 1.1.2 * Wed Sep 29 2010 Peter Lemenkov - 1.1.1-1 - Initial build