%define LANG ru %define longLANG Russian %define formathtml HTML/%LANG %define formatpdf PDF/%LANG Name: howto-%LANG Version: 1.1 Release: alt2 Summary: HOWTO documents in %longLANG from the Linux Documentation Project Group: Books/Howtos Source0: %name-src.tar.bz2 Source1: howto-html-%{LANG}_menuentries Source2: howto-ru-src.patch #Patch1: $name-src.patch Url: http://www.linuxdoc.org/docs.html#howto Copyright: GPL BuildArchitectures: noarch BuildRequires: howto-utils >= 0.2.3-alt3, sgmltools-lite, sgml-tools, sed, grep, perl-base Obsoletes: ldp, howto-html Requires: howto-utils, howto-icons AutoReq: no %package -n howto-html-%LANG Summary: HOWTO documents (html format, in %longLANG) from the Linux Documentation Project Group: Books/Howtos %description Linux HOWTOs are detailed documents which describe a specific aspect of configuring or using Linux. Linux HOWTOs are a great source of practical information about your system. The latest versions of these documents are located at http://www.linuxdoc.org/docs.html#howto In this package, you can find HOWTOs written in %longLANG. This is probably not the most full collection of them (as comapred to other languages) and some howtos may be outdated, so you may wish to install English HOWTOs from howto-html-en package. %description -n howto-html-%LANG Linux HOWTOs are detailed documents which describe a specific aspect of configuring or using Linux. Linux HOWTOs are a great source of practical information about your system. The latest versions of these documents are located at http://www.linuxdoc.org/docs.html#howto In this package, you can find HOWTOs written in %longLANG. This is probably not the most full collection of them (as comapred to other languages) and some howtos may be outdated, so you may wish to install English HOWTOs from howto-html-en package. %prep #rootdir=$RPM_BUILD_ROOT #mkdir -p $rootdir #pushd $rootdir #bzcat %SOURCE0 | tar xv #%patch1 -p0 #popd %install rootdir=$RPM_BUILD_ROOT mkdir -p $rootdir pushd $rootdir bzcat %SOURCE0 | tar xv cat %SOURCE2| patch -p0 htmlbase=$rootdir%_docdir/HOWTO/%formathtml pdfbase=$rootdir%_docdir/HOWTO/%formatpdf mkdir -p $htmlbase #process SGML for srcfile in `find howtosrc -name \*.sgml`; do dstdir=`echo $srcfile | sed -e "s/\.sgml//" | sed -e "s/howtosrc\///"` howtoname=`echo $dstdir| sed -e "s/[^\/]*\///"` mkdir -p $htmlbase/$dstdir if [ `cat $srcfile | grep -i "<\!doctype linuxdoc"` = ]; then #docbook sgmltools -b html $srcfile sdir=`echo $srcfile | sed -e "s/\.sgml]*//"` cp $sdir/* $htmlbase/$dstdir else # linuxdoc pushd $htmlbase/$dstdir sgml2html $rootdir/$srcfile ln -s $howtoname.html index.html popd fi done; #unpack HTMLs for srcfile in `find howtosrc -name \*.tar`; do subdir=`echo $srcfile| sed -e "s/howtosrc//"|sed -e "s/\/[^\/]*$//"` pushd $htmlbase$subdir tar xf $rootdir/$srcfile popd done #insert meta for htmlfile in `find $htmlbase -type f -name \*.html`; do perl -p -i -e '$/=">"; s///i' $htmlfile done #make index cd howtosrc rm -f index.html makehowtoindex2 %longLANG '' mv -f index.html $htmlbase popd; unset rootdir install -m 755 -d $RPM_BUILD_ROOT%_menudir install -m 644 %SOURCE1 $RPM_BUILD_ROOT%_menudir/howto-html-%LANG %files -n howto-html-%LANG %_docdir/HOWTO/%formathtml %_menudir/* %post %update_menus %postun %clean_menus %changelog * Sun Mar 17 2002 Maxim Dzumanenko 1.1-alt1 - spec file update. - some new howtos added * Sun Mar 17 2002 Maxim Dzumanenko 1.1-alt1 - spec file rewritten. - many howtos added and updated * Fri Mar 1 2002 Maxim Dzumanenko 1.0-ipl10 - Bootdisk-HOWTO and Diskless-HOWTO updated * Mon Jan 28 2002 Maxim Dzumanenko 1.0-ipl9 - LDAP-HOWTO added. * Fri Jan 18 2002 Maxim Dzumanenko 1.0-ipl8 - Diskless-HOWTO added. * Wed Jan 09 2002 Stanislav Ievlev 1.0-ipl7 - s/parpart/parport, bug #0000265. * Fri Dec 14 2001 Maxim Dzumanenko 1.0-ipl6 - remove banner entries and reduce size of some howtos. * Thu Dec 06 2001 Stanislav Ievlev 1.0-ipl5 - update to new versions of some howtos. * Sat Mar 10 2001 Ivan Zakharyaschev 1.0-ipl4 - rebuilt with newer html-utils * Fri Mar 9 2001 Ivan Zakharyaschev 1.0-ipl3 - add some info on the language of the HOWTOs into Summary and Description - use BROWSER environment variable in the menu entry * Fri Mar 9 2001 Ivan Zakharyaschev 1.0-ipl2 - common HOWTO icons removed (they are in howto-utils now) - inserted charset meta-information into the index * Wed Jan 17 2001 AEN - new spec