File howto.spec of Package howto
#
# spec file for package howto
#
# Copyright (c) 2020 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/
#
Name: howto
Version: 2007.1.1
Release: 0
Summary: A Collection of How-Tos
License: SUSE-Permissive AND SUSE-LDPL-2.0 AND GPL-2.0-or-later AND GFDL-1.2-or-later AND CC-BY-SA-3.0 AND CC-BY-3.0 AND MIT AND BSD-2-Clause AND OPL-1.0
Group: Documentation/Howto
URL: https://tldp.org/
Source: Linux-HOWTOs.tar.bz2
Source1: Linux-html-HOWTOs.tar.bz2
BuildRequires: dos2unix
BuildRequires: fdupes
BuildArch: noarch
%description -n howto
This package contains documentation on many tasks relating to the setup
and operation of Linux software. This is the English version in ASCII
format.
These documents are installed to %{_datadir}/doc/howto. They can be read
with less <filename>.
%package -n howtoenh
Version: 2007.1.1
Release: 0
Summary: A Collection of HOWTOs from the Linux Documentation Project (HTML Format)
License: Any permissive AND GPL-2.0-or-later AND Linux Documentation Project License (LDPL) AND No license agreement found in package
Group: Documentation/Howto
%description -n howtoenh
This package contains documentation on many tasks relating to the setup
and operation of Linux software. This is the English version in HTML
format.
%prep
%setup -q -c -a 1
%build
mkdir -p .en/txt
mv * .en/txt
mv .en en
mv en/txt/HOWTO en/html
gzip -9f en/txt/*
%install
rm -rf %{buildroot}%{_datadir}/doc/howto
mkdir -p %{buildroot}%{_datadir}/doc/howto
mv en %{buildroot}%{_datadir}/doc/howto
# fix attributes
find %{buildroot}%{_datadir}/doc/howto -type f | xargs chmod 644
find %{buildroot}%{_datadir}/doc/howto -type d | xargs chmod 755
# fix encoding in .c files
find %{buildroot}%{_datadir}/doc/howto -type f -name '*.c' | xargs dos2unix -c ascii
# remove unpackaged stuff - historical reason for removing Quake stuff?
find %{buildroot}%{_datadir}/doc/howto -name "*Quake*" | xargs rm -rfv
# remove rhcd-scripts directory: /html/RedHat-CD-HOWTO/rhcd-scripts
rm -rf %{buildroot}%{_datadir}/doc/howto/en/html/RedHat-CD-HOWTO/rhcd-scripts
%fdupes %{buildroot}%{_datadir}
%files
%defattr (644,root,root,755)
%dir %{_datadir}/doc/howto
%dir %{_datadir}/doc/howto/en
%{_datadir}/doc/howto/en/txt
%files -n howtoenh
%defattr (644,root,root,755)
%dir %{_datadir}/doc/howto
%dir %{_datadir}/doc/howto/en
%{_datadir}/doc/howto/en/html
%changelog