[packages/direnv] new, version 2.20.1

glen glen at pld-linux.org
Fri Nov 22 15:59:35 CET 2019


commit 053d6429483e1c6db1293280972c1cbfaad1d2a6
Author: Elan Ruusamäe <glen at pld-linux.org>
Date:   Fri Nov 22 16:58:53 2019 +0200

    new, version 2.20.1
    
    based on fedora package, aac29e6

 direnv-fix-manpage.patch | 12 +++++++++
 direnv.spec              | 64 ++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 76 insertions(+)
---
diff --git a/direnv.spec b/direnv.spec
new file mode 100644
index 0000000..70f6456
--- /dev/null
+++ b/direnv.spec
@@ -0,0 +1,64 @@
+Summary:	Per-directory shell configuration tool
+Name:		direnv
+Version:	2.20.1
+Release:	1
+License:	MIT
+Group:		Applications/Shells
+Source0:	https://github.com/direnv/direnv/archive/v%{version}/%{name}-%{version}.tar.gz
+# Source0-md5:	52590d44575e0f6a21663da3dccf5b03
+URL:		https://direnv.net
+# Work around bug in markdown->man generation
+# https://github.com/direnv/direnv/pull/113
+Patch0:		%{name}-fix-manpage.patch
+BuildRequires:	golang
+BuildRequires:	rpmbuild(macros) >= 1.647
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+# go stuff
+%define _enable_debug_packages 0
+%define gobuild(o:) go build -ldflags "${LDFLAGS:-} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n')" -a -v %{?debug:-x} %{?**};
+%define import_path	github.com/direnv/direnv
+
+%description
+direnv augments existing shells with a new feature that can load and
+unload environment variables depending on the current directory.
+
+%prep
+%setup -qc
+mv %{name}-*/man .
+mv %{name}-*/docs .
+mv %{name}-*/*.md .
+mv %{name}-*/*.txt .
+
+%patch0 -p1
+
+# don't you love go?
+install -d src/$(dirname %{import_path})
+mv %{name}-* src/%{import_path}
+cd src/%{import_path}
+
+%build
+export GOPATH=$(pwd)
+cd src/%{import_path}
+export PATH=$(pwd):$PATH
+%gobuild -o $GOPATH/bin/%{name} %{import_path}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT%{_bindir}
+install -p bin/* $RPM_BUILD_ROOT%{_bindir}
+
+install -d $RPM_BUILD_ROOT%{_mandir}/man1
+install -p man/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc LICENSE.md
+%doc docs CHANGELOG.md README.md version.txt
+%attr(755,root,root) %{_bindir}/direnv
+%{_mandir}/man1/direnv-stdlib.1*
+%{_mandir}/man1/direnv.1*
+%{_mandir}/man1/direnv.toml.1*
diff --git a/direnv-fix-manpage.patch b/direnv-fix-manpage.patch
new file mode 100644
index 0000000..890d80e
--- /dev/null
+++ b/direnv-fix-manpage.patch
@@ -0,0 +1,12 @@
+diff -urN direnv-2.20.1.orig/man/direnv.1 direnv-2.20.1/man/direnv.1
+--- direnv-2.20.1.orig/man/direnv.1	2019-03-31 12:20:39.000000000 -0700
++++ direnv-2.20.1/man/direnv.1	2019-11-08 14:11:35.256168388 -0800
+@@ -34,7 +34,7 @@
+ $ echo ${FOO\-nope}
+ nope
+ $ echo export FOO=foo > .envrc
+-.envrc is not allowed
++\&.envrc is not allowed
+ $ direnv allow .
+ direnv: reloading
+ direnv: loading .envrc
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/direnv.git/commitdiff/053d6429483e1c6db1293280972c1cbfaad1d2a6



More information about the pld-cvs-commit mailing list