11
0
forked from pool/erlang-rebar

Accepting request 394479 from home:matwey:erlang-rebar

OBS-URL: https://build.opensuse.org/request/show/394479
OBS-URL: https://build.opensuse.org/package/show/devel:languages:erlang/erlang-rebar?expand=0&rev=24
This commit is contained in:
2016-05-09 14:21:14 +00:00
committed by Git OBS Bridge
parent b1fc726771
commit c38b5b0d0c
14 changed files with 112 additions and 338 deletions

View File

@@ -1,48 +0,0 @@
From 19a4fb0ecb48a4cbc48626133f54da9cd17962ba Mon Sep 17 00:00:00 2001
From: "Matwey V. Kornilov" <matwey.kornilov@gmail.com>
Date: Wed, 16 Apr 2014 20:22:56 +0400
Subject: [PATCH 1/2] Find all deps locally first.
In Open Build Service we don't have internet access, we have to find all the deps locally.
---
src/rebar_deps.erl | 19 ++++++-------------
1 file changed, 6 insertions(+), 13 deletions(-)
Index: rebar-2.6.1+git20150928.365ac64/src/rebar_deps.erl
===================================================================
--- rebar-2.6.1+git20150928.365ac64.orig/src/rebar_deps.erl
+++ rebar-2.6.1+git20150928.365ac64/src/rebar_deps.erl
@@ -373,27 +373,20 @@ find_deps(_Config, _Mode, [Other | _Rest
?ABORT("Invalid dependency specification ~p in ~s\n",
[Other, rebar_utils:get_cwd()]).
+%%
+%% In Open Build Service we don't have internet access,
+%% we have to find all the deps locally.
+%%
find_dep(Config, Dep) ->
- %% Find a dep based on its source,
- %% e.g. {git, "https://github.com/mochi/mochiweb.git", "HEAD"}
- %% Deps with a source must be found (or fetched) locally.
- %% Those without a source may be satisfied from lib dir (get_lib_dir).
find_dep(Config, Dep, Dep#dep.source).
-find_dep(Config, Dep, undefined) ->
- %% 'source' is undefined. If Dep is not satisfied locally,
- %% go ahead and find it amongst the lib_dir's.
+find_dep(Config, Dep, Source) ->
case find_dep_in_dir(Config, Dep, get_deps_dir(Config, Dep#dep.app)) of
{_Config1, {avail, _Dir}} = Avail ->
Avail;
{Config1, {missing, _}} ->
find_dep_in_dir(Config1, Dep, get_lib_dir(Dep#dep.app))
- end;
-find_dep(Config, Dep, _Source) ->
- %% _Source is defined. Regardless of what it is, we must find it
- %% locally satisfied or fetch it from the original source
- %% into the project's deps
- find_dep_in_dir(Config, Dep, get_deps_dir(Config, Dep#dep.app)).
+ end.
find_dep_in_dir(Config, _Dep, {false, Dir}) ->
{Config, {missing, Dir}};

View File

@@ -1,34 +0,0 @@
From fdf0a67adaa06a36d8c0b619c7c265ba7dad5a88 Mon Sep 17 00:00:00 2001
From: "Matwey V. Kornilov" <matwey.kornilov@gmail.com>
Date: Wed, 16 Apr 2014 20:25:30 +0400
Subject: [PATCH 2/2] Read vsn from file.
In Open Build Service we don't have git history, all we have is single one revision.
---
src/rebar_utils.erl | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
Index: rebar-2.6.1+git20150928.365ac64/src/rebar_utils.erl
===================================================================
--- rebar-2.6.1+git20150928.365ac64.orig/src/rebar_utils.erl
+++ rebar-2.6.1+git20150928.365ac64/src/rebar_utils.erl
@@ -628,12 +628,13 @@ vcs_vsn_1(Vcs, Dir) ->
end
end.
-vcs_vsn_cmd(git) -> "git describe --always --tags";
-vcs_vsn_cmd(p4) -> "echo #head";
-vcs_vsn_cmd(hg) -> "hg identify -i";
-vcs_vsn_cmd(bzr) -> "bzr revno";
-vcs_vsn_cmd(svn) -> "svnversion";
-vcs_vsn_cmd(fossil) -> "fossil info";
+vcs_vsn_cmd(git) -> vcs_vsn_cmd(obs);
+vcs_vsn_cmd(p4) -> vcs_vsn_cmd(obs);
+vcs_vsn_cmd(hg) -> vcs_vsn_cmd(obs);
+vcs_vsn_cmd(bzr) -> vcs_vsn_cmd(obs);
+vcs_vsn_cmd(svn) -> vcs_vsn_cmd(obs);
+vcs_vsn_cmd(fossil) -> vcs_vsn_cmd(obs);
+vcs_vsn_cmd(obs) -> "cat .rebar_vsn_obs";
vcs_vsn_cmd({cmd, _Cmd}=Custom) -> Custom;
vcs_vsn_cmd(Version) when is_list(Version) -> {plain, Version};
vcs_vsn_cmd(_) -> unknown.

View File

@@ -1,4 +1,4 @@
<servicedata>
<service name="tar_scm">
<param name="url">git://github.com/rebar/rebar.git</param>
<param name="changesrevision">c534f8a903c10bf330c0b819fd75e1495a7e1d39</param></service></servicedata>
<param name="changesrevision">ef73556df92dd3b31daaf1cc6d97fb220dfcaa0c</param></service></servicedata>

View File

@@ -1,3 +1,36 @@
-------------------------------------------------------------------
Sat Mar 19 16:48:58 UTC 2016 - matwey.kornilov@gmail.com
- Update to version 2.6.1+git20160318.ef73556:
+ Optionally look for ct .spec files in the ct_dir that was specified
+ Introduce REBAR_VSN_CACHE_FILE env variable to load/save vsn cache
-------------------------------------------------------------------
Fri Mar 18 08:24:17 UTC 2016 - matwey.kornilov@gmail.com
- Remove 0001-Find-all-deps-locally-first.patch:
+ use upstreamed alternative
- Remove 0002-Read-vsn-from-file.patch:
+ use upstreamed alternative
-------------------------------------------------------------------
Fri Mar 18 08:23:57 UTC 2016 - matwey.kornilov@gmail.com
- Update to version 2.6.1+git20160317.384af7e:
+ Add support for Windows integration testing
+ Update retest dependency url
+ Add neotoma regression test
+ Automatically clean neotoma-generated erl files Add myself to THANKS
+ Ensure ebin created for dia compiler
+ Add tests for dia compiler
+ Update regexp to account for newer OTP versions
+ Treat port env vars as expandable only if they self reference
+ Additional Common Test regression tests
+ Fix eunit_surefire crash with rebar eunit tests=...
+ Provide additional test coverage for surefire enabled eunit testing
+ Fix bug when running gcc in cross_sizeof
+ Introduce REBAR_DEPS_PREFER_LIBS env variable to alter search behaviour
-------------------------------------------------------------------
Sun Jan 17 17:25:39 UTC 2016 - matwey.kornilov@gmail.com

View File

@@ -1,5 +1,5 @@
#
# spec file for package erlang-rebar-obs
# spec file for package erlang-rebar-testsuite
#
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
@@ -16,10 +16,10 @@
#
%define obs 1
Name: erlang-rebar-obs
Version: 2.6.1+git20160115.c534f8a
Name: erlang-rebar-testsuite
%define normal_build ("%{name}" == "erlang-rebar")
%define testsuite_build ("%{name}" == "erlang-rebar-testsuite")
Version: 2.6.1+git20160318.ef73556
Release: 0
%define mod_ver %(echo "%{version}" | cut -d "+" -f1)
Summary: A sophisticated build-tool for Erlang projects that follows OTP principles
@@ -29,28 +29,20 @@ Url: https://github.com/rebar/rebar
Source: rebar-%{version}.tar.bz2
Source1: macros.erlang-rebar
Source98: %{name}.rpmlintrc
Source99: spec.in
Patch1: no-rebar-deps.patch
Patch2: tdeps_update-retest.patch
Patch3: 0001-Find-all-deps-locally-first.patch
Patch4: 0002-Read-vsn-from-file.patch
Patch5: erlc_dep_graph-timeout.patch
BuildRequires: erlang >= R13B01
Requires: erlang >= R13B01
Provides: rebar = %{version}
Obsoletes: rebar < %{version}
%if 0%{?obs}
Conflicts: erlang-rebar
Requires: this-is-only-for-build-envs
%else
Conflicts: erlang-rebar-obs
%if %{testsuite_build}
# for 'make test'
BuildRequires: erlang-reltool
BuildRequires: erlang-retest
BuildRequires: git
BuildRequires: mercurial
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%endif
%if 0%{?suse_version}
%if 1%{?erlang_libdir:0}
@@ -75,12 +67,6 @@ Group: Development/Libraries/Other
Requires: %{name} = %{version}
Provides: %{name}-devel = %{version}
Obsoletes: %{name}-devel < %{version}
%if 0%{?obs}
Conflicts: erlang-rebar-src
Requires: this-is-only-for-build-envs
%else
Conflicts: erlang-rebar-obs-src
%endif
%description src
rebar is an Erlang build tool that makes it easy to compile and
@@ -88,19 +74,18 @@ test Erlang applications, port drivers and releases.
%prep
%setup -q -n rebar-%{version}
%patch1 -p1
%patch2 -p1
%if 0%{?obs}
%patch3 -p1
%patch4 -p1
%endif
%patch5 -p1
%build
export REBAR_DEPS_PREFER_LIBS=1
make
%if %{testsuite_build}
make deps
%endif
%install
%if %{normal_build}
install -Dm755 rebar %{buildroot}%{_bindir}/rebar
# Install RPM macros:
install -Dm644 %{SOURCE1} %{buildroot}%{_sysconfdir}/rpm/macros.erlang-rebar
@@ -110,8 +95,10 @@ for dir in include ebin priv src ; do
done
mkdir -p %{buildroot}%{_sysconfdir}/bash_completion.d
ln -s %{erlang_libdir}/rebar-%{mod_ver}/priv/shell-completion/bash/rebar %{buildroot}%{_sysconfdir}/bash_completion.d/rebar.sh
%endif
%check
%if %{testsuite_build}
# test is broken inside OBS environment due to lack of FQDN
rm -rf inttest/ct3
rm -rf inttest/ct_cover
@@ -123,13 +110,9 @@ rm -rf inttest/proto_gpb
rm -rf inttest/tdeps1
rm -rf inttest/tdeps2
%endif
%if 0%{?obs}
# do not run tests for erlang-rebar-obs
true
%else
make test
%endif
%if %{normal_build}
%files
%defattr(-,root,root)
%doc README.md THANKS LICENSE rebar.config.sample
@@ -144,5 +127,6 @@ make test
%files src
%defattr(-,root,root)
%{erlang_libdir}/rebar-%{mod_ver}/src
%endif
%changelog

View File

@@ -1,3 +1,36 @@
-------------------------------------------------------------------
Sat Mar 19 16:48:58 UTC 2016 - matwey.kornilov@gmail.com
- Update to version 2.6.1+git20160318.ef73556:
+ Optionally look for ct .spec files in the ct_dir that was specified
+ Introduce REBAR_VSN_CACHE_FILE env variable to load/save vsn cache
-------------------------------------------------------------------
Fri Mar 18 08:24:17 UTC 2016 - matwey.kornilov@gmail.com
- Remove 0001-Find-all-deps-locally-first.patch:
+ use upstreamed alternative
- Remove 0002-Read-vsn-from-file.patch:
+ use upstreamed alternative
-------------------------------------------------------------------
Fri Mar 18 08:23:57 UTC 2016 - matwey.kornilov@gmail.com
- Update to version 2.6.1+git20160317.384af7e:
+ Add support for Windows integration testing
+ Update retest dependency url
+ Add neotoma regression test
+ Automatically clean neotoma-generated erl files Add myself to THANKS
+ Ensure ebin created for dia compiler
+ Add tests for dia compiler
+ Update regexp to account for newer OTP versions
+ Treat port env vars as expandable only if they self reference
+ Additional Common Test regression tests
+ Fix eunit_surefire crash with rebar eunit tests=...
+ Provide additional test coverage for surefire enabled eunit testing
+ Fix bug when running gcc in cross_sizeof
+ Introduce REBAR_DEPS_PREFER_LIBS env variable to alter search behaviour
-------------------------------------------------------------------
Sun Jan 17 17:25:39 UTC 2016 - matwey.kornilov@gmail.com

View File

@@ -16,10 +16,10 @@
#
%define obs 0
Name: erlang-rebar
Version: 2.6.1+git20160115.c534f8a
%define normal_build ("%{name}" == "erlang-rebar")
%define testsuite_build ("%{name}" == "erlang-rebar-testsuite")
Version: 2.6.1+git20160318.ef73556
Release: 0
%define mod_ver %(echo "%{version}" | cut -d "+" -f1)
Summary: A sophisticated build-tool for Erlang projects that follows OTP principles
@@ -29,28 +29,20 @@ Url: https://github.com/rebar/rebar
Source: rebar-%{version}.tar.bz2
Source1: macros.erlang-rebar
Source98: %{name}.rpmlintrc
Source99: spec.in
Patch1: no-rebar-deps.patch
Patch2: tdeps_update-retest.patch
Patch3: 0001-Find-all-deps-locally-first.patch
Patch4: 0002-Read-vsn-from-file.patch
Patch5: erlc_dep_graph-timeout.patch
BuildRequires: erlang >= R13B01
Requires: erlang >= R13B01
Provides: rebar = %{version}
Obsoletes: rebar < %{version}
%if 0%{?obs}
Conflicts: erlang-rebar
Requires: this-is-only-for-build-envs
%else
Conflicts: erlang-rebar-obs
%if %{testsuite_build}
# for 'make test'
BuildRequires: erlang-reltool
BuildRequires: erlang-retest
BuildRequires: git
BuildRequires: mercurial
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%endif
%if 0%{?suse_version}
%if 1%{?erlang_libdir:0}
@@ -75,12 +67,6 @@ Group: Development/Libraries/Other
Requires: %{name} = %{version}
Provides: %{name}-devel = %{version}
Obsoletes: %{name}-devel < %{version}
%if 0%{?obs}
Conflicts: erlang-rebar-src
Requires: this-is-only-for-build-envs
%else
Conflicts: erlang-rebar-obs-src
%endif
%description src
rebar is an Erlang build tool that makes it easy to compile and
@@ -88,19 +74,18 @@ test Erlang applications, port drivers and releases.
%prep
%setup -q -n rebar-%{version}
%patch1 -p1
%patch2 -p1
%if 0%{?obs}
%patch3 -p1
%patch4 -p1
%endif
%patch5 -p1
%build
export REBAR_DEPS_PREFER_LIBS=1
make
%if %{testsuite_build}
make deps
%endif
%install
%if %{normal_build}
install -Dm755 rebar %{buildroot}%{_bindir}/rebar
# Install RPM macros:
install -Dm644 %{SOURCE1} %{buildroot}%{_sysconfdir}/rpm/macros.erlang-rebar
@@ -110,8 +95,10 @@ for dir in include ebin priv src ; do
done
mkdir -p %{buildroot}%{_sysconfdir}/bash_completion.d
ln -s %{erlang_libdir}/rebar-%{mod_ver}/priv/shell-completion/bash/rebar %{buildroot}%{_sysconfdir}/bash_completion.d/rebar.sh
%endif
%check
%if %{testsuite_build}
# test is broken inside OBS environment due to lack of FQDN
rm -rf inttest/ct3
rm -rf inttest/ct_cover
@@ -123,13 +110,9 @@ rm -rf inttest/proto_gpb
rm -rf inttest/tdeps1
rm -rf inttest/tdeps2
%endif
%if 0%{?obs}
# do not run tests for erlang-rebar-obs
true
%else
make test
%endif
%if %{normal_build}
%files
%defattr(-,root,root)
%doc README.md THANKS LICENSE rebar.config.sample
@@ -144,5 +127,6 @@ make test
%files src
%defattr(-,root,root)
%{erlang_libdir}/rebar-%{mod_ver}/src
%endif
%changelog

View File

@@ -5,19 +5,26 @@
# SUSE-style macros:
%__rebar_vsn_cache_file %{_builddir}/vsn_cache_file
%__rebar /usr/bin/rebar
%rebar_set_vsn_cache(v:p:) \
REBAR_VSN_CACHE_FILE="%{__rebar_vsn_cache_file}" ; export REBAR_VSN_CACHE_FILE ; \
echo "{{%{-v:%{-n*}}%{!-n:git}, \\"%{-p:%{-p*}}%{!-p:$PWD}\\"}, \\"%1\\"}." >> $REBAR_VSN_CACHE_FILE \
%{nil}
%rebar() \
CFLAGS="${CFLAGS:-%optflags}" \
CXXFLAGS="${CXXFLAGS:-%optflags}" \
FFLAGS="${FFLAGS:-%optflags}" %{__rebar} %* \
CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; \
CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; \
FFLAGS="${FFLAGS:-%optflags}" ; export FFLAGS ; \
REBAR_DEPS_PREFER_LIBS=1 ; export REBAR_DEPS_PREFER_LIBS ; \
%{__rebar} %* \
%{nil}
%rebar_compile() \
%{rebar} compile -v %* \
%{nil}
# Fedora compat:
%__rebar_compile %{rebar_compile}

View File

@@ -1,34 +0,0 @@
Index: rebar-2.6.1+git20160115.c534f8a/Makefile
===================================================================
--- rebar-2.6.1+git20160115.c534f8a.orig/Makefile
+++ rebar-2.6.1+git20160115.c534f8a/Makefile
@@ -1,7 +1,7 @@
.PHONY: clean xref_warnings deps test test_eunit test_inttest
REBAR=$(PWD)/rebar
-RETEST=$(PWD)/deps/retest/retest
+RETEST=/usr/bin/retest
LOG_LEVEL?=debug
RT_TARGETS?=inttest
@@ -35,7 +35,6 @@ binary: clean all
deps:
@REBAR_EXTRA_DEPS=1 $(REBAR) get-deps
- @(cd deps/retest && $(REBAR) compile escriptize)
test: test_eunit test_inttest
Index: rebar-2.6.1+git20160115.c534f8a/rebar.config.script
===================================================================
--- rebar-2.6.1+git20160115.c534f8a.orig/rebar.config.script
+++ rebar-2.6.1+git20160115.c534f8a/rebar.config.script
@@ -1,7 +1,7 @@
%% -*- mode: erlang;erlang-indent-level: 4;indent-tabs-mode: nil -*-
%% ex: ts=4 sw=4 ft=erlang et
-ExtraDeps = [{retest, ".*", {git, "git://github.com/dizzyd/retest.git", {tag, "4590941a"}}}],
+ExtraDeps = [],
case os:getenv("REBAR_EXTRA_DEPS") of
false ->

View File

@@ -1,9 +1,6 @@
#!/bin/sh
cp erlang-rebar.changes erlang-rebar-obs.changes
cp erlang-rebar.rpmlintrc erlang-rebar-obs.rpmlintrc
m4 -D OBS=0 -D PKGNAME=erlang-rebar spec.in > erlang-rebar.spec
m4 -D OBS=1 -D PKGNAME=erlang-rebar-obs spec.in > erlang-rebar-obs.spec
osc service disabledrun
sed -e 's/^Name:.*erlang-rebar/&-testsuite/' erlang-rebar.spec > erlang-rebar-testsuite.spec
cp erlang-rebar.changes erlang-rebar-testsuite.changes
cp erlang-rebar.rpmlintrc erlang-rebar-testsuite.rpmlintrc
osc service localrun format_spec_file

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:343809313458fc68ea348e262e5268a78b4f006b169de554ac986bb91f2d24c4
size 145491

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:09a2fb34f59aeea6f7385fa4ec02623b2c2aacbe6253cb5ed8a7257cb62fc531
size 160696

148
spec.in
View File

@@ -1,148 +0,0 @@
#
# spec file for package erlang-rebar
#
# Copyright (c) 2014 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/
#
%define obs OBS
Name: PKGNAME
Version: 2.6.1+git20160115.c534f8a
Release: 0
%define mod_ver %(echo "%{version}" | cut -d "+" -f1)
Summary: A sophisticated build-tool for Erlang projects that follows OTP principles
License: Apache-2.0
Group: Development/Tools/Building
Url: https://github.com/rebar/rebar
Source: rebar-%{version}.tar.bz2
Source1: macros.erlang-rebar
Source98: %{name}.rpmlintrc
Source99: spec.in
Patch1: no-rebar-deps.patch
Patch2: tdeps_update-retest.patch
Patch3: 0001-Find-all-deps-locally-first.patch
Patch4: 0002-Read-vsn-from-file.patch
Patch5: erlc_dep_graph-timeout.patch
BuildRequires: erlang >= R13B01
Requires: erlang >= R13B01
Provides: rebar = %{version}
Obsoletes: rebar < %{version}
%if 0%{?obs}
Conflicts: erlang-rebar
Requires: this-is-only-for-build-envs
%else
Conflicts: erlang-rebar-obs
# for 'make test'
BuildRequires: erlang-reltool
BuildRequires: erlang-retest
BuildRequires: git
BuildRequires: mercurial
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version}
%if 1%{?erlang_libdir:0}
%define erlang_libdir %{_libdir}/erlang/lib
%endif
%endif
%description
rebar is an Erlang build tool that makes it easy to compile and
test Erlang applications, port drivers and releases.
rebar is a self-contained Erlang script, so it's easy to distribute or even
embed directly in a project. Where possible, rebar uses standard Erlang/OTP
conventions for project structures, thus minimizing the amount of build
configuration work. rebar also provides dependency management, enabling
application writers to easily re-use common libraries from a variety of
locations (git, hg, etc).
%package src
Summary: A sophisticated build-tool for Erlang projects that follows OTP principles
Group: Development/Libraries/Other
Requires: %{name} = %{version}
Provides: %{name}-devel = %{version}
Obsoletes: %{name}-devel < %{version}
%if 0%{?obs}
Conflicts: erlang-rebar-src
Requires: this-is-only-for-build-envs
%else
Conflicts: erlang-rebar-obs-src
%endif
%description src
rebar is an Erlang build tool that makes it easy to compile and
test Erlang applications, port drivers and releases.
%prep
%setup -q -n rebar-%{version}
%patch1 -p1
%patch2 -p1
%if 0%{?obs}
%patch3 -p1
%patch4 -p1
%endif
%patch5 -p1
%build
make
make deps
%install
install -Dm755 rebar %{buildroot}%{_bindir}/rebar
# Install RPM macros:
install -Dm644 %{SOURCE1} %{buildroot}%{_sysconfdir}/rpm/macros.erlang-rebar
for dir in include ebin priv src ; do
install -d %{buildroot}%{erlang_libdir}/rebar-%{mod_ver}/${dir}
cp -r ${dir}/* %{buildroot}%{erlang_libdir}/rebar-%{mod_ver}/${dir}/
done
mkdir -p %{buildroot}%{_sysconfdir}/bash_completion.d
ln -s %{erlang_libdir}/rebar-%{mod_ver}/priv/shell-completion/bash/rebar %{buildroot}%{_sysconfdir}/bash_completion.d/rebar.sh
%check
# test is broken inside OBS environment due to lack of FQDN
rm -rf inttest/ct3
rm -rf inttest/ct_cover
# test is broken due to library path resolution problem
rm -rf inttest/proto_gpb
# rebar is not compatible with hg 1.0.2 delivered by SLE <= 11
# these checks will thus fail -> delete them
%if 0%{?sles_version} > 0 && 0%{?sles_version} <= 11
rm -rf inttest/tdeps1
rm -rf inttest/tdeps2
%endif
%if 0%{?obs}
# do not run tests for erlang-rebar-obs
true
%else
make test
%endif
%files
%defattr(-,root,root)
%doc README.md THANKS LICENSE rebar.config.sample
%{_bindir}/rebar
%config %{_sysconfdir}/rpm/macros.erlang-rebar
%dir %{erlang_libdir}/rebar-%{mod_ver}
%{erlang_libdir}/rebar-%{mod_ver}/ebin
%{erlang_libdir}/rebar-%{mod_ver}/include
%{erlang_libdir}/rebar-%{mod_ver}/priv
%{_sysconfdir}/bash_completion.d/rebar.sh
%files src
%defattr(-,root,root)
%{erlang_libdir}/rebar-%{mod_ver}/src
%changelog