From Fedora Project Wiki
(Created page with '= 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 1...') |
No edit summary |
||
Line 40: | Line 40: | ||
# First, the html in /usr/share/doc/HTML | # First, the html in /usr/share/doc/HTML | ||
# | # | ||
LANG=${LANGDIR#% | LANG=${LANGDIR#%document/} | ||
# Target for release notes html | # Target for release notes html | ||
NOTETARG=$RPM_BUILD_ROOT%{_defaultdocdir}/HTML/%{name}/${LANG} | NOTETARG=$RPM_BUILD_ROOT%{_defaultdocdir}/HTML/%{name}/${LANG} | ||
Line 46: | Line 46: | ||
mkdir -p ${NOTETARG} | mkdir -p ${NOTETARG} | ||
install -m 644 ${SRCBASE}/*.html ${NOTETARG} | install -m 644 ${SRCBASE}/*.html ${NOTETARG} | ||
# Now the various subdirectories | |||
mkdir -p ${NOTETARG}/Common_Content | mkdir -p ${NOTETARG}/Common_Content | ||
mkdir -p ${NOTETARG}/Common_Content/css | mkdir -p ${NOTETARG}/Common_Content/css |
Revision as of 17:22, 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 URL: http://fedoraproject.org/wiki/Documentation_Beats Group: System Environment/Base License: Open Publication Source0: f-r-n-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch Requires: htmlview Provides: fedora-release-notes = %{version}-%{release} %description This is a test rpm to demonstrate installing a pure html implementation of fedora release notes. %prep %setup -q %build %install rm -rf $RPM_BUILD_ROOT 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 # LANG=${LANGDIR#%document/} # Target for release notes html NOTETARG=$RPM_BUILD_ROOT%{_defaultdocdir}/HTML/%{name}/${LANG} SRCBASE=${LANGDIR} 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 done # # 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 SRCBASE=applications 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 %clean rm -rf $RPM_BUILD_ROOT %post if [ -x /usr/bin/update-desktop-database ]; then update-desktop-database &> /dev/null; fi %postun 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 %files %defattr(-,root,root,-) %{_defaultdocdir}/HTML %{_datadir}/applications/fedora-release-notes.desktop %{_datadir}/applications/kde4/fedora-release-notes.desktop %changelog * Wed Dec 2 2009 John J. McDonough <jjmcd@fedoraproject.org> - 12.0.1-1 - initial * Thu Dec 3 2009 John J. McDonough <jjmcd@fedoraproject.org> - 12.0.1-1 - some cleanup