Skip to content

Distribute CLI via RPM (Fedora/RHEL/CentOS) #125

@cardmagic

Description

@cardmagic

Summary

Add RPM distribution for the classifier CLI to make installation easier for Fedora/RHEL/CentOS users.

Background

Currently users must install via RubyGems (gem install classifier), which requires Ruby environment setup. An RPM package would provide a simpler installation path.

Tasks

  • Create RPM spec file
  • Set up Copr repository or custom YUM/DNF repo
  • Submit to Fedora official repositories (long-term)

Options

  1. Fedora Copr - Easy personal repository, similar to PPA
  2. Custom YUM/DNF repo - Host on rubyclassifier.com
  3. Official Fedora repo - Submit package to Fedora (requires sponsorship)

Example spec file

Name:           classifier
Version:        2.2.0
Release:        1%{?dist}
Summary:        Text classification with Bayesian and LSI algorithms

License:        LGPL
URL:            https://rubyclassifier.com
Source0:        https://rubygems.org/downloads/%{name}-%{version}.gem

BuildArch:      noarch
BuildRequires:  ruby-devel
BuildRequires:  rubygems-devel
Requires:       ruby >= 3.1
Requires:       rubygem-fast-stemmer

%description
A Ruby library for text classification featuring Naive Bayes,
LSI (Latent Semantic Indexing), and more.

%prep
%setup -q -c -T

%build
gem install --local --no-document --install-dir .%{gem_dir} %{SOURCE0}

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

%files
%{_bindir}/classifier
%{gem_dir}/gems/%{name}-%{version}/
%{gem_dir}/specifications/%{name}-%{version}.gemspec

Installation (Goal)

# Copr approach
sudo dnf copr enable cardmagic/classifier
sudo dnf install classifier

# Custom repo approach
sudo dnf config-manager --add-repo https://rubyclassifier.com/rpm/classifier.repo
sudo dnf install classifier

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions