hello.spec:
Name: hello
Version: 2.10
Release: %autorelease
Summary: Produces a familiar, friendly greeting
License: GPL-3.0-or-later
URL: https://www.gnu.org/software/hello/
Source: http://ftp.gnu.org/gnu/hello/hello-%{version}.tar.gz
BuildRequires: gcc
BuildRequires: make
BuildRequires: gettext
BuildRequires: sed
BuildRequires: bash
BuildRequires: coreutils
BuildRequires: glibc-common
%description
The GNU Hello program produces a familiar, friendly greeting. Yes, this is
another implementation of the classic program that prints "Hello, world!" when
you run it.
%prep
%autosetup
mv THANKS THANKS.old
iconv --from-code=ISO-8859-1 --to-code=UTF-8 --output=THANKS THANKS.old
%build
%configure \
--enable-nls \
--disable-rpath
%make_build
%install
%make_install
test -f %{buildroot}/%{_infodir}/dir && rm %{buildroot}/%{_infodir}/dir
%check
make check
%files
%{_bindir}/hello
%{_mandir}/man1/hello.1.*
%{_infodir}/hello.info.*
%{_datadir}/locale/*/LC_MESSAGES/hello.mo
%doc AUTHORS ChangeLog NEWS README THANKS TODO
%license COPYING
%changelog
%autochangelog
fetch code:
spectool -g hello.spec
test package:
sudo fedpkg --release f39 mockbuild
install package:
sudo dnf -C -y install ./results_hello/2.10/1.fc38/hello-2.10-1.fc38.x86_64.rpm
undo:
sudo dnf -C -y history undo last