par_text/par_text.spec
Matěj Cepl 21b7105dee
Some checks failed
obs/scm/build
Switch from dead upstream to the current soft fork at
https://git.sr.ht/~mcepl/par, which includes all patches
  available for the program collected from all other
  distributions.
Update to version 1.53.0+git.1721308378.56c5d7a:
  * test: we currently do not support non-UTF8 wide characters
  * fix: use swprintf(3) for wchar_t string.
  * chore: don't ignore existing environmental variables
  * feat: add README.md and LICENSE
  * Add another test case. Karel Hynek Mácha: Cikáni
  * Make tests working even with Latin-1 and UTF-8 texts.
  * add a Makefile that sets up variables for the protoMakefile from upstream
  * fix cross compilation
  * print error messages
  * Add multibyte characters support in par(1)
2024-07-18 15:29:30 +02:00

65 lines
2.1 KiB
RPMSpec

#
# spec file for package par_text
#
# Copyright (c) 2024 SUSE LLC
#
# 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/
#
%define upname par
Name: par_text
Version: 1.53.0+git.1721308378.56c5d7a
Release: 0
Summary: Paragraph reformatter
License: MIT
Group: Productivity/Text/Convertors
URL: http://www.nicemice.net/par/
Source0: par-%{version}.tar.gz
# I hope that these two packages are so specialised, they
# shouldn't be on one system.
Conflicts: par
%description
par is a filter which copies its input to its output, changing all
white characters (except newlines) to spaces, and reformatting
each paragraph. Paragraphs are separated by protected, blank, and
bodiless lines, and optionally delimited by indentation.
Each output paragraph is generated from the corresponding input
paragraph as follows:
1) An optional prefix and/or suffix is removed from each input line.
2) The remainder is divided into words (separated by spaces).
3) The words are joined into lines to make an eye-pleasing paragraph.
4) The prefixes and suffixes are reattached.
If there are suffixes, spaces are inserted before them so that they all
end in the same column.
%prep
%autosetup -p1 -n %{upname}-%{version}
%build
%make_build -f protoMakefile CFLAGS="%{optflags}" $*
%install
install -D -t %{buildroot}/%{_bindir} par
install -p -m 0644 -D -t %{buildroot}/%{_mandir}/man1 par.1
%files
%{_bindir}/par
%doc par.doc releasenotes
%{_mandir}/man1/par.1%{?ext_man}
%changelog