]> git.pld-linux.org Git - packages/erlang-rebar.git/commitdiff
new package
authorJacek Konieczny <j.konieczny@eggsoft.pl>
Wed, 25 Mar 2015 14:08:13 +0000 (15:08 +0100)
committerJacek Konieczny <j.konieczny@eggsoft.pl>
Wed, 25 Mar 2015 14:08:13 +0000 (15:08 +0100)
erlang-rebar.spec [new file with mode: 0644]
rebar.escript [new file with mode: 0644]

diff --git a/erlang-rebar.spec b/erlang-rebar.spec
new file mode 100644 (file)
index 0000000..7382fbf
--- /dev/null
@@ -0,0 +1,64 @@
+
+%bcond_with    bootstrap       # bootstrap build
+%bcond_without tests           # build without tests
+
+Summary:       Erlang Build Tools
+Name:          erlang-rebar
+Version:       2.5.1
+Release:       0.1
+License:       MIT
+Group:         Development/Tools
+Source0:       https://github.com/rebar/rebar/tarball/%{version}/rebar-%{version}.tar.bz2
+# Source0-md5: b9b21756f56902b339559f3833d2c544
+Source1:       rebar.escript
+URL:           https://github.com/rebar/rebar
+%if %{with bootstrap}
+BuildRequires: erlang
+%else
+BuildRequires: erlang-rebar
+%endif
+Requires:      erlang
+Provides:      rebar = %{version}-%{release}
+BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+Erlang Build Tools.
+
+%prep
+%setup -qc
+mv rebar-rebar-*/* .
+%{__rm} -r rebar-rebar-*
+
+%build
+%if %{with bootstrap}
+./bootstrap
+./rebar compile -v
+%else
+rebar compile -v
+install %{SOURCE1} ./rebar
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT%{_bindir} \
+       $RPM_BUILD_ROOT%{_libdir}/erlang/lib/rebar-%{version}/{ebin,include}
+
+cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/rebar
+cp -p ebin/rebar.app $RPM_BUILD_ROOT%{_libdir}/erlang/lib/rebar-%{version}/ebin
+cp -p ebin/*.beam $RPM_BUILD_ROOT%{_libdir}/erlang/lib/rebar-%{version}/ebin
+cp -p include/*.hrl $RPM_BUILD_ROOT%{_libdir}/erlang/lib/rebar-%{version}/include
+cp -a priv $RPM_BUILD_ROOT%{_libdir}/erlang/lib/rebar-%{version}
+
+%if %{with tests}
+./rebar eunit -v
+%endif
+
+%files
+%defattr(644,root,root,755)
+%doc LICENSE NOTES.org README.md THANKS rebar.config.sample
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/rebar
+%{_libdir}/erlang/lib/rebar-%{version}
+
+%clean
+rm -rf $RPM_BUILD_ROOT
diff --git a/rebar.escript b/rebar.escript
new file mode 100644 (file)
index 0000000..b0f8c62
--- /dev/null
@@ -0,0 +1,5 @@
+#!/usr/bin/env escript
+%%! -noshell -noinput
+
+main (Args) ->
+       rebar:main(Args).
This page took 0.092046 seconds and 4 git commands to generate.