From Fedora Project Wiki

Line 12: Line 12:
  Group: System Environment/Base
  Group: System Environment/Base
  License: CC-by-SA
  License: CC-by-SA
  Source0: Fedora-release-notes-%{version}.tar.gz
  Source0: fedora-release-notes-%{version}.tar.gz
  BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
  BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

Latest revision as of 17:33, 3 December 2009

Example spec file for multi-language html

# Documentation Specfile

Name:		fedora-release-notes
Version:	12.0.1
Release:	2%{?dist}
Summary:	Release Notes for Fedora 12

Group:		System Environment/Base
License:	CC-by-SA
Source0:	fedora-release-notes-%{version}.tar.gz
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildArch:	noarch
Requires:	htmlview
Provides:	fedora-release-notes = %{version}-%{release}

This is a test rpm to demonstrate installing a pure
html implementation of fedora release notes.

%setup -q


mkdir -p $RPM_BUILD_ROOT%{_defaultdocdir}/HTML
mkdir -p $RPM_BUILD_ROOT%{_defaultdocdir}/HTML/%{name}

# Loop through the languages
for LANGDIR in document/* ; do
  # First, the html in /usr/share/doc/HTML
  # Target for release notes html
  mkdir -p ${NOTETARG}
  install -m 644 ${SRCBASE}/*.html ${NOTETARG}
  # Now the various subdirectories
  mkdir -p ${NOTETARG}/Common_Content
  mkdir -p ${NOTETARG}/Common_Content/css
  mkdir -p ${NOTETARG}/Common_Content/images
  mkdir -p ${NOTETARG}/images
  install -m 644 ${SRCBASE}/Common_Content/css/* ${NOTETARG}/Common_Content/css
  install -m 644 ${SRCBASE}/Common_Content/images/* ${NOTETARG}/Common_Content/images
  install -m 644 ${SRCBASE}/images/* ${NOTETARG}/images

# index.html that selects languages
install -m 644 applications/index.html $RPM_BUILD_ROOT%{_defaultdocdir}/HTML/%{name}
# Now the desktop files
mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications
mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications/kde4
install -m 644 ${SRCBASE}/fedora-release-notes.desktop $RPM_BUILD_ROOT%{_datadir}/applications
install -m 644 ${SRCBASE}/kde4/fedora-release-notes.desktop $RPM_BUILD_ROOT%{_datadir}/applications/kde4


if [ -x /usr/bin/update-desktop-database ]; then update-desktop-database &> /dev/null; fi

if [ -x /usr/bin/scrollkeeper-update ]; then scrollkeeper-update -q; fi
if [ -x /usr/bin/update-desktop-database ]; then update-desktop-database &> /dev/null; fi


* Wed Dec 2 2009 John J. McDonough <> - 12.0.1-1
- initial

* Thu Dec 3 2009 John J. McDonough <> - 12.0.1-1
- some cleanup