File direnv.spec of Package direnv

# spec file for package direnv
# Copyright (c) 2018 SUSE LINUX 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

%define gopackagepath
Name:           direnv
Version:        2.15.2
Release:        0
Summary:        Unclutter a .profile
License:        MIT
Group:          Productivity/File utilities
BuildRequires:  go >= 1.5
BuildRequires:  make

direnv is an environment switcher for the shell. It knows how to hook into
bash, zsh, tcsh and fish shell to load or unload environment variables depending
on the current directory. This allows to have project-specific environment
variables and not clutter the "~/.profile" file.

%setup -q
mkdir -p "$HOME/go/src/$(dirname "%{gopackagepath}")"
cd ..
ln -sf `pwd`/%{name}-%{version} "$HOME/go/src/%{gopackagepath}"

cd "$HOME/go/src/%{gopackagepath}"
make %{?_smp_mflags}

cd "$HOME/go/src/%{gopackagepath}"
%make_install DESTDIR=%{buildroot}%{_prefix}


openSUSE Build Service is sponsored by