Files
erlang-depsolver/erlang-depsolver.spec

75 lines
2.6 KiB
RPMSpec

#
# spec file for package erlang-depsolver
#
# Copyright (c) 2013 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/
#
Name: erlang-depsolver
Version: 0.0.0+git.1355763627.f61b95a
%define mod_ver %(echo "%{version}" | cut -d "+" -f1)
Release: 0
License: Apache-2.0
Summary: Chef recipe dependency solver
Url: http://github.com/opscode/depsolver/
Group: Development/Libraries/Other
Source: depsolver-%{version}.tar.gz
BuildRequires: erlang-rebar
Requires: erlang
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
Depsolver is a dependency solver package for erlang. You supply it with a list
of versioned objects that are in the world and then you can solve for different
version constraints.
If no solution can be found, detailed back tracking information is returned that
can be used to detect what exact dependencies are causing the problem.
%package devel
Summary: Chef recipe dependency solver
Group: Development/Libraries/Other
Requires: %{name} = %{version}
Provides: %{name}-src = %{version}
#TODO: Change back to '<' after next version update:
Obsoletes: %{name}-src <= %{version}
%description devel
Depsolver is a dependency solver package for erlang. You supply it with a list
of versioned objects that are in the world and then you can solve for different
version constraints.
If no solution can be found, detailed back tracking information is returned that
can be used to detect what exact dependencies are causing the problem.
%prep
%setup -n depsolver-%{version}
%build
%rebar compile escriptize
%install
for dir in ebin src ; do
install -d %{buildroot}%{erlang_libdir}/depsolver-%{mod_ver}/${dir}
cp -r ${dir}/* %{buildroot}%{erlang_libdir}/depsolver-%{mod_ver}/${dir}/
done
%files
%defattr(-,root,root)
%dir %{erlang_libdir}/depsolver-%{mod_ver}
%{erlang_libdir}/depsolver-%{mod_ver}/ebin
%files devel
%defattr(-,root,root)
%{erlang_libdir}/depsolver-%{mod_ver}/src