Accepting request 650202 from home:XRevan86
An autojump package. OBS-URL: https://build.opensuse.org/request/show/650202 OBS-URL: https://build.opensuse.org/package/show/utilities/autojump?expand=0&rev=1
This commit is contained in:
commit
5086eae4dc
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
.osc
|
3
autojump-22.5.1.tar.gz
Normal file
3
autojump-22.5.1.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:765fabda130eb4df70d1c1e5bc172e1d18f8ec22c6b89ff98f1674335292e99f
|
||||
size 54721
|
4
autojump.changes
Normal file
4
autojump.changes
Normal file
@ -0,0 +1,4 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Nov 14 19:01:41 UTC 2018 - sor.alexei@meowr.ru
|
||||
|
||||
- Initial package.
|
89
autojump.spec
Normal file
89
autojump.spec
Normal file
@ -0,0 +1,89 @@
|
||||
#
|
||||
# spec file for package autojump
|
||||
#
|
||||
# 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 https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
Name: autojump
|
||||
Version: 22.5.1
|
||||
Release: 0
|
||||
Summary: A faster way to navigate the filesystem from a shell
|
||||
License: GPL-3.0-or-later
|
||||
Group: System/Console
|
||||
URL: https://github.com/wting/autojump
|
||||
Source: https://github.com/wting/autojump/archive/release-v%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-mock
|
||||
BuildRequires: python3-pytest
|
||||
BuildArch: noarch
|
||||
|
||||
%description
|
||||
autojump is a faster way to navigate one's filesystem. It works by
|
||||
maintaining a database of the directories one uses the most from
|
||||
the command line.
|
||||
|
||||
Directories must be visited first before they can be jumped to.
|
||||
|
||||
%prep
|
||||
%setup -q -n %{name}-release-v%{version}
|
||||
sed -i 's/env python$/python3/' bin/%{name}
|
||||
sed -i '/env python$/s|^.*$|# -*- python -*-|' bin/%{name}_*.py
|
||||
|
||||
%build
|
||||
# Nothing to build.
|
||||
|
||||
%install
|
||||
python3 install.py \
|
||||
--destdir=%{buildroot} \
|
||||
--prefix=.%{_prefix} \
|
||||
--zshshare=.%{_datadir}/zsh/site-functions
|
||||
|
||||
# Fix the path.
|
||||
sed -i 's|%{buildroot}/.%{_prefix}|%{_prefix}|' \
|
||||
%{buildroot}%{_sysconfdir}/profile.d/%{name}.sh
|
||||
|
||||
# Redundant on Python 3.
|
||||
rm %{buildroot}%{_bindir}/%{name}_argparse.py
|
||||
sed -i 's/autojump_argparse/argparse/' %{buildroot}%{_bindir}/%{name}*
|
||||
|
||||
# Make it a proper Python module instead of polluting bindir.
|
||||
mkdir -p %{buildroot}%{python3_sitelib}/%{name}/
|
||||
echo "# -*- python -*-" > %{buildroot}%{python3_sitelib}/%{name}/__init__.py
|
||||
for m in data match utils; do
|
||||
mv "%{buildroot}%{_bindir}/%{name}_$m.py" \
|
||||
"%{buildroot}%{python3_sitelib}/%{name}/$m.py"
|
||||
done
|
||||
for m in data match utils; do
|
||||
sed -i "s/^from %{name}_$m import/from %{name}.$m import/" \
|
||||
%{buildroot}%{_bindir}/%{name} %{buildroot}%{python3_sitelib}/%{name}/*.py
|
||||
done
|
||||
%py3_compile %{buildroot}%{python3_sitelib}/%{name}/
|
||||
|
||||
%check
|
||||
python3 -m pytest tests
|
||||
|
||||
%files
|
||||
%license LICENSE
|
||||
%doc AUTHORS README.md
|
||||
%config %{_sysconfdir}/profile.d/%{name}.sh
|
||||
%{_bindir}/%{name}
|
||||
%{_datadir}/%{name}/
|
||||
%{python3_sitelib}/%{name}/
|
||||
%dir %{_datadir}/zsh/
|
||||
%dir %{_datadir}/zsh/site-functions/
|
||||
%{_datadir}/zsh/site-functions/_j
|
||||
%{_mandir}/man1/%{name}.1%{?ext_man}
|
||||
|
||||
%changelog
|
Loading…
Reference in New Issue
Block a user