File bluefish-doc.spec of Package bluefish-doc

#
# spec file for package bluefish-doc
#
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#

# norootforbuild

Name:           bluefish-doc
Summary:        Bluefish: The Definitive Guide
License:        GNU Free Documentation License, Version 1.1 (GFDL), GNU Library General Public License v. 2.0 and 2.1 (LGPL)
Url:            http://bluefish.openoffice.nl/
Group:          Documentation/Other
Version:        1.0
Release:        9
Vendor:         openSUSE-Education
%define         real_name bluefish-doc-html-bigfile
%define         real_version 1.0-6
BuildArch:      noarch
BuildRequires:  apache2-devel update-desktop-files
Source:         %{real_name}-%{real_version}.tar.bz2
Source1:        %{name}.desktop
Source2:        %{name}.xpm
Source3:        bluefish-doc_apache.conf
Source4:        bluefish-doc.README.SuSE
%define         apxs    /usr/sbin/apxs2
%define         apache_sysconfdir   %(%{apxs} -q SYSCONFDIR)
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
User's, Developer's, and Documentarian's Guide for Bluefish version 1.0.6.

You can find the tutorial under /usr/share/doc/bluefish-doc/.


Authors:
--------
	Daniel Blair
	Michèle Garoche
	Anita Lewis
	Alastair Porter
	Denny Reeh
	Olivier Sessink
	Scott White

	Logo art: Dave Lyon


%prep
%setup -q -n %{real_name}-%{real_version}

%build

%install
install -d -m 755 $RPM_BUILD_ROOT/usr/share/doc/%{name}
cp -a $RPM_BUILD_DIR/%{real_name}-%{real_version}/* $RPM_BUILD_ROOT/usr/share/doc/%{name}
# create desktop entries
mkdir -p $RPM_BUILD_ROOT/usr/share/pixmaps
mkdir -p $RPM_BUILD_ROOT/usr/share/applications
install -m 644 %{SOURCE2} $RPM_BUILD_ROOT/usr/share/pixmaps/
install -m 644 %{SOURCE1} $RPM_BUILD_ROOT/usr/share/applications/
%suse_update_desktop_file -i %{name}
# create link for index.html
pushd $RPM_BUILD_ROOT/usr/share/doc/%{name} 1>/dev/null
ln book.html index.html
popd 1>/dev/null
# create apache configuration
mkdir -p $RPM_BUILD_ROOT/%{apache_sysconfdir}/conf.d
cp -av %{S:3} $RPM_BUILD_ROOT/%{apache_sysconfdir}/conf.d/%{name}.conf
# create defaultdocdir for README.SuSE
mkdir -p %buildroot%{_defaultdocdir}/%name
install -m644 %{SOURCE4} %buildroot%{_defaultdocdir}/%name/README.SuSE


%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
%doc %{_defaultdocdir}/%name
/usr/share/doc/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/pixmaps/%{name}.xpm
%config (noreplace) %{apache_sysconfdir}/conf.d/%{name}.conf

%changelog