OBS-URL: https://build.opensuse.org/package/show/devel:languages:erlang/erlang-rebar-obs?expand=0&rev=1
This commit is contained in:
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.osc
|
51
0001-Find-all-deps-locally-first.patch
Normal file
51
0001-Find-all-deps-locally-first.patch
Normal file
@@ -0,0 +1,51 @@
|
||||
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(-)
|
||||
|
||||
diff --git a/src/rebar_deps.erl b/src/rebar_deps.erl
|
||||
index 43bde04..c1e853f 100644
|
||||
--- a/src/rebar_deps.erl
|
||||
+++ b/src/rebar_deps.erl
|
||||
@@ -370,27 +370,20 @@ find_deps(_Config, _Mode, [Other | _Rest], _Acc) ->
|
||||
?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}};
|
||||
--
|
||||
1.8.1.4
|
||||
|
35
0002-Read-vsn-from-file.patch
Normal file
35
0002-Read-vsn-from-file.patch
Normal file
@@ -0,0 +1,35 @@
|
||||
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(-)
|
||||
|
||||
diff --git a/src/rebar_utils.erl b/src/rebar_utils.erl
|
||||
index 2d227b6..c85ae1b 100644
|
||||
--- a/src/rebar_utils.erl
|
||||
+++ b/src/rebar_utils.erl
|
||||
@@ -477,11 +477,12 @@ vcs_vsn_1(Vcs, Dir) ->
|
||||
end
|
||||
end.
|
||||
|
||||
-vcs_vsn_cmd(git) -> "git describe --always --tags";
|
||||
-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(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.
|
||||
--
|
||||
1.8.1.4
|
||||
|
17
_service
Normal file
17
_service
Normal file
@@ -0,0 +1,17 @@
|
||||
<services>
|
||||
<service name="tar_scm" mode="disabled">
|
||||
<param name="url">git://github.com/rebar/rebar.git</param>
|
||||
<param name="scm">git</param>
|
||||
<param name="versionformat">@PARENT_TAG@+git%cd.%h</param>
|
||||
</service>
|
||||
|
||||
<service name="recompress" mode="disabled">
|
||||
<param name="file">rebar-*.tar</param>
|
||||
<param name="compression">bz2</param>
|
||||
</service>
|
||||
|
||||
<service name="set_version" mode="disabled">
|
||||
<param name="basename">rebar</param>
|
||||
</service>
|
||||
</services>
|
||||
|
85
erlang-rebar-obs.changes
Normal file
85
erlang-rebar-obs.changes
Normal file
@@ -0,0 +1,85 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Apr 16 16:42:28 UTC 2014 - matwey.kornilov@gmail.com
|
||||
|
||||
- Add erlang-rebar-obs package to use it in OBS only.
|
||||
It does not require Internet.
|
||||
- prjconf should be something like that:
|
||||
Substitute: erlang-rebar erlang-rebar-obs
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Apr 16 12:56:47 UTC 2014 - matwey.kornilov@gmail.com
|
||||
|
||||
- Version 2.2.0
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Mar 1 08:11:54 UTC 2014 - nkrinner@suse.com
|
||||
|
||||
- Added rpmlintc file to allow build to succeed with a file with
|
||||
source code
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Feb 2 17:33:07 UTC 2014 - matwey.kornilov@gmail.com
|
||||
|
||||
- updated to latest master (2.1.0 release)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Sep 30 12:15:47 UTC 2013 - matwey.kornilov@gmail.com
|
||||
|
||||
- updated to latest master. some minor bugfixes
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jun 26 11:50:03 UTC 2013 - matwey.kornilov@gmail.com
|
||||
|
||||
- add bash autocompletion, rename -devel to -src
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jun 26 09:52:45 UTC 2013 - kruber@zib.de
|
||||
|
||||
- remove cyclic dependency to erlang-retest
|
||||
(a pre-build version is already bundled with rebar in ./inttest)
|
||||
- fix SLE build (hg version is incompatible thus some tests fail)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jun 26 09:29:26 UTC 2013 - kruber@zib.de
|
||||
|
||||
- fix package build (require erlang-retest package for %check)
|
||||
This dependency is cyclic, as erlang-retest needs rebar to build
|
||||
normally, here rebar is built and then retest (from git) which
|
||||
is only needed for the tests we don't have access to git from
|
||||
OBS though, try this way (or disable %check).
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jun 17 13:08:21 UTC 2013 - speilicke@suse.com
|
||||
|
||||
- Add %changelog section
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Apr 5 12:08:29 UTC 2013 - speilicke@suse.com
|
||||
|
||||
- Fix %rebar and %rebar_compile macros to take further parameters
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Apr 4 08:30:03 UTC 2013 - speilicke@suse.com
|
||||
|
||||
- Move rebar-specific macros from erlang package to erlang-rebar
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Apr 4 07:16:04 UTC 2013 - speilicke@suse.com
|
||||
|
||||
- Added macros.erlang-rebar, which includes the following RPM macros:
|
||||
+ %erlang_rebar
|
||||
- Install ebam and priv files
|
||||
- Added devel package
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Apr 3 13:50:36 UTC 2013 - speilicke@suse.com
|
||||
|
||||
- Rename to erlang-rebar
|
||||
- Use mode="disabled" source service and properly create a tarball
|
||||
- General cleanup for Factory
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Oct 06 06:36:08 UTC 2012 - matwey.kornilov@gmail.com
|
||||
|
||||
- Cleaned up initial version
|
||||
|
137
erlang-rebar-obs.spec
Normal file
137
erlang-rebar-obs.spec
Normal file
@@ -0,0 +1,137 @@
|
||||
#
|
||||
# spec file for package erlang-rebar-obs
|
||||
#
|
||||
# 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 1
|
||||
|
||||
%if 0%{?obs}
|
||||
Name: erlang-rebar-obs
|
||||
%else
|
||||
Name: erlang-rebar
|
||||
%endif
|
||||
Version: 2.2.0+git20140416.8edaa08
|
||||
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
|
||||
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
|
||||
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}
|
||||
|
||||
%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
|
||||
|
||||
%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
|
||||
# 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 && %{?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
|
85
erlang-rebar.changes
Normal file
85
erlang-rebar.changes
Normal file
@@ -0,0 +1,85 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Apr 16 16:42:28 UTC 2014 - matwey.kornilov@gmail.com
|
||||
|
||||
- Add erlang-rebar-obs package to use it in OBS only.
|
||||
It does not require Internet.
|
||||
- prjconf should be something like that:
|
||||
Substitute: erlang-rebar erlang-rebar-obs
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Apr 16 12:56:47 UTC 2014 - matwey.kornilov@gmail.com
|
||||
|
||||
- Version 2.2.0
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Mar 1 08:11:54 UTC 2014 - nkrinner@suse.com
|
||||
|
||||
- Added rpmlintc file to allow build to succeed with a file with
|
||||
source code
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Feb 2 17:33:07 UTC 2014 - matwey.kornilov@gmail.com
|
||||
|
||||
- updated to latest master (2.1.0 release)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Sep 30 12:15:47 UTC 2013 - matwey.kornilov@gmail.com
|
||||
|
||||
- updated to latest master. some minor bugfixes
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jun 26 11:50:03 UTC 2013 - matwey.kornilov@gmail.com
|
||||
|
||||
- add bash autocompletion, rename -devel to -src
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jun 26 09:52:45 UTC 2013 - kruber@zib.de
|
||||
|
||||
- remove cyclic dependency to erlang-retest
|
||||
(a pre-build version is already bundled with rebar in ./inttest)
|
||||
- fix SLE build (hg version is incompatible thus some tests fail)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jun 26 09:29:26 UTC 2013 - kruber@zib.de
|
||||
|
||||
- fix package build (require erlang-retest package for %check)
|
||||
This dependency is cyclic, as erlang-retest needs rebar to build
|
||||
normally, here rebar is built and then retest (from git) which
|
||||
is only needed for the tests we don't have access to git from
|
||||
OBS though, try this way (or disable %check).
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jun 17 13:08:21 UTC 2013 - speilicke@suse.com
|
||||
|
||||
- Add %changelog section
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Apr 5 12:08:29 UTC 2013 - speilicke@suse.com
|
||||
|
||||
- Fix %rebar and %rebar_compile macros to take further parameters
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Apr 4 08:30:03 UTC 2013 - speilicke@suse.com
|
||||
|
||||
- Move rebar-specific macros from erlang package to erlang-rebar
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Apr 4 07:16:04 UTC 2013 - speilicke@suse.com
|
||||
|
||||
- Added macros.erlang-rebar, which includes the following RPM macros:
|
||||
+ %erlang_rebar
|
||||
- Install ebam and priv files
|
||||
- Added devel package
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Apr 3 13:50:36 UTC 2013 - speilicke@suse.com
|
||||
|
||||
- Rename to erlang-rebar
|
||||
- Use mode="disabled" source service and properly create a tarball
|
||||
- General cleanup for Factory
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Oct 06 06:36:08 UTC 2012 - matwey.kornilov@gmail.com
|
||||
|
||||
- Cleaned up initial version
|
||||
|
1
erlang-rebar.rpmlintrc
Normal file
1
erlang-rebar.rpmlintrc
Normal file
@@ -0,0 +1 @@
|
||||
addFilter("devel-file-in-non-devel-package *")
|
137
erlang-rebar.spec
Normal file
137
erlang-rebar.spec
Normal file
@@ -0,0 +1,137 @@
|
||||
#
|
||||
# spec file for package erlang-rebar-obs
|
||||
#
|
||||
# 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 0
|
||||
|
||||
%if 0%{?obs}
|
||||
Name: erlang-rebar-obs
|
||||
%else
|
||||
Name: erlang-rebar
|
||||
%endif
|
||||
Version: 2.2.0+git20140416.8edaa08
|
||||
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
|
||||
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
|
||||
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}
|
||||
|
||||
%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
|
||||
|
||||
%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
|
||||
# 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 && %{?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
|
23
macros.erlang-rebar
Normal file
23
macros.erlang-rebar
Normal file
@@ -0,0 +1,23 @@
|
||||
# Macros for erlang-rebar module building.
|
||||
#
|
||||
# Copyright: (c) 2013 Sascha Peilicke <saschpe@gmx.de>
|
||||
#
|
||||
|
||||
# SUSE-style macros:
|
||||
|
||||
%__rebar /usr/bin/rebar
|
||||
|
||||
%rebar() \
|
||||
CFLAGS="${CFLAGS:-%optflags}" \
|
||||
CXXFLAGS="${CXXFLAGS:-%optflags}" \
|
||||
FFLAGS="${FFLAGS:-%optflags}" %{__rebar} %* \
|
||||
%{nil}
|
||||
|
||||
%rebar_compile() \
|
||||
%{rebar} compile -v %* \
|
||||
%{nil}
|
||||
|
||||
|
||||
# Fedora compat:
|
||||
|
||||
%__rebar_compile %{rebar_compile}
|
34
no-rebar-deps.patch
Normal file
34
no-rebar-deps.patch
Normal file
@@ -0,0 +1,34 @@
|
||||
Index: rebar-2.1.0+git.1389913905.af91604/Makefile
|
||||
===================================================================
|
||||
--- rebar-2.1.0+git.1389913905.af91604.orig/Makefile
|
||||
+++ rebar-2.1.0+git.1389913905.af91604/Makefile
|
||||
@@ -1,7 +1,7 @@
|
||||
.PHONY: clean dialyzer_warnings xref_warnings deps test
|
||||
|
||||
REBAR=$(PWD)/rebar
|
||||
-RETEST=$(PWD)/deps/retest/retest
|
||||
+RETEST=/usr/bin/retest
|
||||
|
||||
all:
|
||||
./bootstrap
|
||||
@@ -35,7 +35,6 @@ binary: clean all
|
||||
|
||||
deps:
|
||||
@REBAR_EXTRA_DEPS=1 ./rebar get-deps
|
||||
- @(cd deps/retest && $(REBAR) compile escriptize)
|
||||
|
||||
test:
|
||||
@$(REBAR) eunit
|
||||
Index: rebar-2.1.0+git.1389913905.af91604/rebar.config.script
|
||||
===================================================================
|
||||
--- rebar-2.1.0+git.1389913905.af91604.orig/rebar.config.script
|
||||
+++ rebar-2.1.0+git.1389913905.af91604/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"}}],
|
||||
+ExtraDeps = [],
|
||||
|
||||
case os:getenv("REBAR_EXTRA_DEPS") of
|
||||
false ->
|
8
pre_checkin.sh
Normal file
8
pre_checkin.sh
Normal file
@@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
|
||||
cp erlang-rebar.changes erlang-rebar-obs.changes
|
||||
m4 -D OBS=0 spec.in > erlang-rebar.spec
|
||||
m4 -D OBS=1 spec.in > erlang-rebar-obs.spec
|
||||
osc service disabledrun
|
||||
osc service localrun format_spec_file
|
||||
|
3
rebar-2.2.0+git20140416.8edaa08.tar.bz2
Normal file
3
rebar-2.2.0+git20140416.8edaa08.tar.bz2
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:cf8a3afb5017d7bc5b3581c904d67d5a22b945ec36ecb4f1153639ce1b1dd36c
|
||||
size 112569
|
137
spec.in
Normal file
137
spec.in
Normal file
@@ -0,0 +1,137 @@
|
||||
#
|
||||
# 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
|
||||
|
||||
%if 0%{?obs}
|
||||
Name: erlang-rebar-obs
|
||||
%else
|
||||
Name: erlang-rebar
|
||||
%endif
|
||||
Version: 2.2.0+git20140416.8edaa08
|
||||
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
|
||||
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
|
||||
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}
|
||||
|
||||
%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
|
||||
|
||||
%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
|
||||
# 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 && %{?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
|
6
tdeps_update-retest.patch
Normal file
6
tdeps_update-retest.patch
Normal file
@@ -0,0 +1,6 @@
|
||||
Index: rebar-2.1.0+git.1389913905.af91604/inttest/tdeps_update/retest.config
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ rebar-2.1.0+git.1389913905.af91604/inttest/tdeps_update/retest.config
|
||||
@@ -0,0 +1 @@
|
||||
+{timeout, 120000}.
|
Reference in New Issue
Block a user