File erlang-rebar_vsn_plugin.spec of Package erlang-rebar_vsn_plugin

#
# spec file for package erlang-rebar_vsn_plugin
#
# 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-rebar_vsn_plugin
Version:        0.0.4+git20140214.fd40c96
%define mod_ver %(echo "%{version}" | cut -d "+" -f1)
Release:        0
License:        Apache-2.0
Summary:        Provides a more reasonable versioning scheme
Url:            https://github.com/erlware/rebar_vsn_plugin
Group:          Development/Libraries/Other
Source:         rebar_vsn_plugin-%{version}.tar.gz
Patch01:        PATCH01-remove-version-check-with-git.patch
BuildRequires:  erlang-rebar
Requires:       erlang
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Provides a more reasonable versioning scheme then the rebar standard 'git' vsn extension.


%prep
%setup -n rebar_vsn_plugin-%{version}
%patch01

%build
%rebar compile escriptize

%install
for dir in ebin ; do
  install -d %{buildroot}%{erlang_libdir}/rebar_vsn_plugin-%{mod_ver}/${dir}
  cp -r ${dir}/* %{buildroot}%{erlang_libdir}/rebar_vsn_plugin-%{mod_ver}/${dir}/
done

%files
%defattr(-,root,root)
%dir %{erlang_libdir}/rebar_vsn_plugin-%{mod_ver}
%{erlang_libdir}/rebar_vsn_plugin-%{mod_ver}/ebin
openSUSE Build Service is sponsored by