# Generated from peter-notes-0.1.5.gem by gem2rpm -*- rpm-spec -*-
%global gem_name peter-notes

Name: rubygem-%{gem_name}
Version: 0.1.5
Release: 1%{?dist}
Summary: Lightweight notes manager
License: MIT
URL: https://github.com/fonsecapeter/peter-notes
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
BuildRequires: ruby(release)
BuildRequires: rubygems-devel
BuildRequires: ruby
# BuildRequires: rubygem(pry) >= 0.10.4
# BuildRequires: rubygem(pry) < 0.11
# BuildRequires: rubygem(ronn) >= 0.7.3
# BuildRequires: rubygem(ronn) < 0.8
# BuildRequires: rubygem(rspec) >= 3.0
# BuildRequires: rubygem(rspec) < 4
# BuildRequires: rubygem(simplecov-console) >= 0.4.2
# BuildRequires: rubygem(simplecov-console) < 0.5
BuildArch: noarch

%description
Manage your notes from the console.
If you're like me, you spend most of your computing time in a terminal, you
have a text-editor set up just to your liking, and you wish you could use it
for everything. Naturally, when it comes time to ditch your paper note-pad,
you refuse to to use the more popular gui-driven apps and want to find a way
to use your editor instead.
But when you start looking for a terminal-based notes framework (or plugin for
your editor) you're blinded by crazy features and unwilling to learn a new
tool. You've also already started keeping your notes in some text files and
don't want to have to start over.
Anyway, I went through the same thing and made this this lightweight tool
(originally from some aliases in my bashrc) to do what I wanted it to do,
which isn't a lot. But, like ruby, it has a nice interface, and it'll stay out
of the way. That means you can choose where you keep your notes, how you
organize them, how you track them (if you do), and what editor you use to
write them. So if you already have your own notes, you can just point
`peter-notes` at them and start using worlds simplest (and coolest)
notes-manager.
This is a cli tool, don't try to import it into some ruby source code.


%package doc
Summary: Documentation for %{name}
Requires: %{name} = %{version}-%{release}
BuildArch: noarch

%description doc
Documentation for %{name}.

%prep
%setup -q -n %{gem_name}-%{version}

%build
# Create the gem as gem install only works on a gem file
gem build ../%{gem_name}-%{version}.gemspec

# %%gem_install compiles any C extensions and installs the gem into ./%%gem_dir
# by default, so that we can move it into the buildroot in %%install
%gem_install

%install
mkdir -p %{buildroot}%{gem_dir}
cp -a .%{gem_dir}/* \
        %{buildroot}%{gem_dir}/


mkdir -p %{buildroot}%{_bindir}
cp -a .%{_bindir}/* \
        %{buildroot}%{_bindir}/

find %{buildroot}%{gem_instdir}/bin -type f | xargs chmod a+x

%check
pushd .%{gem_instdir}
# rspec spec
popd

%files
%dir %{gem_instdir}
%{_bindir}/notes
%exclude %{gem_instdir}/.gitignore
%exclude %{gem_instdir}/.travis.yml
%{gem_instdir}/CODE_OF_CONDUCT.md
%license %{gem_instdir}/LICENSE.txt
%{gem_instdir}/bin
%{gem_libdir}
%{gem_instdir}/man
%exclude %{gem_cache}
%{gem_spec}

%files doc
%doc %{gem_docdir}
%exclude %{gem_instdir}/.rspec
%{gem_instdir}/Gemfile
%doc %{gem_instdir}/README.md
%{gem_instdir}/Rakefile
%{gem_instdir}/peter-notes.gemspec

%changelog
* Tue Sep 14 2021 mockbuilder - 0.1.5-1
- Initial package