]> git.pld-linux.org Git - packages/direnv.git/blame - direnv.spec
Update to 2.21.3
[packages/direnv.git] / direnv.spec
CommitLineData
053d6429
ER
1Summary: Per-directory shell configuration tool
2Name: direnv
bede7d4d 3Version: 2.21.3
053d6429
ER
4Release: 1
5License: MIT
6Group: Applications/Shells
7Source0: https://github.com/direnv/direnv/archive/v%{version}/%{name}-%{version}.tar.gz
bede7d4d 8# Source0-md5: afab222f7406f90726733f99c095eb0a
053d6429 9URL: https://direnv.net
053d6429
ER
10BuildRequires: golang
11BuildRequires: rpmbuild(macros) >= 1.647
12BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
13
14# go stuff
15%define _enable_debug_packages 0
16%define gobuild(o:) go build -ldflags "${LDFLAGS:-} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n')" -a -v %{?debug:-x} %{?**};
17%define import_path github.com/direnv/direnv
18
19%description
20direnv augments existing shells with a new feature that can load and
21unload environment variables depending on the current directory.
22
23%prep
24%setup -qc
25mv %{name}-*/man .
26mv %{name}-*/docs .
27mv %{name}-*/*.md .
28mv %{name}-*/*.txt .
29
053d6429
ER
30# don't you love go?
31install -d src/$(dirname %{import_path})
32mv %{name}-* src/%{import_path}
33cd src/%{import_path}
34
35%build
36export GOPATH=$(pwd)
37cd src/%{import_path}
38export PATH=$(pwd):$PATH
39%gobuild -o $GOPATH/bin/%{name} %{import_path}
40
41%install
42rm -rf $RPM_BUILD_ROOT
43install -d $RPM_BUILD_ROOT%{_bindir}
44install -p bin/* $RPM_BUILD_ROOT%{_bindir}
45
46install -d $RPM_BUILD_ROOT%{_mandir}/man1
47install -p man/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
48
49%clean
50rm -rf $RPM_BUILD_ROOT
51
52%files
53%defattr(644,root,root,755)
053d6429
ER
54%doc docs CHANGELOG.md README.md version.txt
55%attr(755,root,root) %{_bindir}/direnv
56%{_mandir}/man1/direnv-stdlib.1*
57%{_mandir}/man1/direnv.1*
58%{_mandir}/man1/direnv.toml.1*
This page took 0.058439 seconds and 4 git commands to generate.