###############################################################################
# Paul Gampe - <[email protected]>
# TODO: Localize language names when rpm supports utf-8 spec files
###############################################################################
%define lang_code it
%define lang_name Italian

Copyright: distributable
Source: rhl-cg-%{lang_code}-%{version}.tbz
Release: 2
Name: rhl-cg-%{lang_code}
Group: Documentation
Version: 9
Summary: The %{lang_name} Red Hat Linux %{version} Customization Guide in HTML format.
BuildArchitectures: noarch
Buildroot: %{_tmppath}/%{name}-%{version}-buildroot
Requires: htmlview

%description
The %{lang_name} Red Hat Linux %{version} Customization Guide contains
information on how to customize your Red Hat Linux system to fit your needs.
Step-by-step guides include setting up a network interface card, configuring
shared files and directories, managing software using RPM, configuring a
printer, configuring a Web server, and gathering system information.

The %{name} package contains the %{lang_name} Red Hat Linux %{version}
Customization Guide in HTML format.  PDF, RPM, HTML tarball, and browsable HTML
formats are available from the Red Hat Docs webpage at
http://www.redhat.com/docs/.

%prep
%define _builddir %(mkdir -p %{buildroot}%{_defaultdocdir} ; echo %{buildroot}%{_defaultdocdir})
%setup -q -c
for i in *
do
if [ -d $i ]; then
  cd $i
  mv -f * ../
  cd ..
  rmdir $i
fi
done

%build

%install

mkdir -p $RPM_BUILD_ROOT/usr/share/applications/

cat > $RPM_BUILD_ROOT/usr/share/applications/%{name}.desktop <<'EOF'
[Desktop Entry]
Name=Customization Guide (%{lang_code})
Comment=Read about customizing Red Hat Linux (%{lang_name})
Exec=htmlview file:%{_defaultdocdir}/%{name}-%{version}/index.html
Icon=/%{_defaultdocdir}/%{name}-%{version}/docs.png
Categories=Documentation;X-Red-Hat-Base;
Type=Application
Encoding=UTF-8
Terminal=false
EOF

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(644,root,root,755)
%{_datadir}/applications/%{name}.desktop
/%{_defaultdocdir}/%{name}-%{version}

%changelog
* Thu Mar 06 2003 Paul Gampe <[email protected]>
- Initial spec file