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

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

%description

The %{lang_name} Red Hat Linux %{version} Getting Started Guide is
designed to help new users begin using Red Hat Linux in a short amount
of time. Topics include managing files and directories, customizing
the desktop, working with diskettes and CD-ROMs, and configuring email
clients.

The %{name} package contains the %{lang_name} Red Hat Linux %{version}
Getting Started 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=Getting Started Guide (%{lang_code})
Comment=Read about how to use Red Hat Linux (in %{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