File hello.spec of Package hello

%{?configure2_5x:%global configure %configure2_5x}
%{!?make_build:%global make_build %{__make} %{?_smp_mflags}}

Name:            hello
Version:         2.10
Release:         0%{?dist}
Summary:         A Hello World application from the GNU Project

License:         GPLv3+
URL:             https://www.gnu.org/software/hello/
Source0:         http://ftp.gnu.org/gnu/hello/%{name}-%{version}.tar.gz

%if %{_vendor} == "debbuild"
Group:           misc
Packager:        Neal Gompa <ngompa13@gmail.com>
%endif

BuildRequires:   gettext

Requires(post):  info
Requires(preun): info

%description
The GNU Hello program is a Free Software take on
the classical Hello World application. It uses autotools
and offers extensive language support. It is often used
as an example of how Free Software can be written and packaged.

%prep
%setup -q

%build
%configure
%make_build

%install
%make_install
rm -f %{buildroot}%{_infodir}/dir

%if 0%{?ubuntu} >= 1504 || 0%{?debian} >= 8 || 0%{?rhel} >= 7 || 0%{?suse_version} >= 1230 || 0%{?fedora} >= 15
mkdir -p %{buildroot}%{_sysconfdir}/helloconf
touch %{buildroot}%{_sysconfdir}/helloconf/systemd
%else
mkdir -p %{buildroot}%{_sysconfdir}/helloconf
touch %{buildroot}%{_sysconfdir}/helloconf/sysvinit
%endif

%post
/sbin/install-info %{_infodir}/%{name}.info %{_infodir}/dir || :

%preun
# Run only on final removal
%if 0%{?debian} || 0%{?ubuntu}
if [ $1 = "remove" || $1 = "purge" ]; then
%else
if [ $1 = 0 ]; then
%endif
/sbin/install-info --delete %{_infodir}/%{name}.info %{_infodir}/dir || :
fi

%files
%{_bindir}/%{name}
%{_infodir}/*
%{_mandir}/*
%{_datadir}/locale/*
%dir %{_sysconfdir}/helloconf
%{_sysconfdir}/helloconf/*
%doc README NEWS ChangeLog AUTHORS TODO THANKS
%if %{_vendor} == "redhat" || %{_vendor} == "mageia"
%license COPYING
%else
%doc COPYING
%endif

%changelog
openSUSE Build Service is sponsored by