# # spec file for package erlang-meck # # Copyright (c) 2022 SUSE LLC # # 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 https://bugs.opensuse.org/ # %define mod_ver %(echo "%{version}" | cut -d "+" -f1) Name: erlang-meck Version: 0.9.2+git20211002.cc47aab Release: 0 Summary: A mocking library for Erlang License: Apache-2.0 Group: Development/Libraries/Other URL: https://github.com/eproxus/meck/ Source: meck-%{version}.tar.bz2 BuildRequires: erlang-rebar Requires: erlang %description A mocking Library for Erlang. With meck you can easily mock modules in Erlang. You can also perform some basic validations on the mocked modules, such as making sure no unexpected exceptions occurred or looking at the call history. %prep %setup -q -n meck-%{version} %build %rebar compile %rebar doc %install for dir in ebin ; do install -d %{buildroot}%{erlang_libdir}/meck-%{mod_ver}/${dir} cp -r ${dir}/* %{buildroot}%{erlang_libdir}/meck-%{mod_ver}/${dir}/ done %files %license LICENSE %doc doc README.md CHANGELOG.md %dir %{erlang_libdir}/meck-%{mod_ver} %{erlang_libdir}/meck-%{mod_ver}/ebin %changelog