Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
DISCONTINUED:openSUSE:11.2
lessons4lizards_en
lessons4lizards_en.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File lessons4lizards_en.spec of Package lessons4lizards_en
# # spec file for package lessons4lizards_en (Version 0.2) # # Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # # norootforbuild Name: lessons4lizards_en Url: http://developer.novell.com/wiki/index.php/Lessons_for_Lizards %define my_lang en %define my_book lessons4lizards Version: 0.2 Release: 72 #OBS Source0: lessons4lizards_en-html.tar.bz2 Source1: lessons4lizards_en-desktop.tar.bz2 Source2: lessons4lizards_en.pdf #Source3: lessons4lizards_en-graphics.tar.bz2 #Source4: lessons4lizards_en.tar.bz2 #SOURCES BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch Group: Documentation/Other License: GNU Free Documentation License, Version 1.1 (GFDL 1.1) Summary: Lessons for Lizards - Understanding openSUSE %define _defaultdocdir %{_datadir}/doc/manual %define _docdir %{_datadir}/doc/manual %define PDFDOC %{_defaultdocdir}/%{name}-pdf %description Lessons for Lizards (LfL) is a community cookbook-style book project for the openSUSE distribution licensed under the GNU Free Documentation License (GFDL). Lessons for Lizards covers more specific or exotic topics than the internally produced manuals, such as * Experimental software * Third party software * Third party drivers * Complex setups (such as a router for the home network) If you want to contribute, please look at http://developer.novell.com/wiki/index.php/Lessons_for_Lizards %prep #%setup -c -q %setup -c -q -a 1 #PREP cp %{S:2} . #PDFPREP %build # make sure index.html exists for f in $(find html -type f -name 'book.*'); do pushd ${f%/*} ln -sf ${f##*/} index.html popd done %install mkdir -p $RPM_BUILD_ROOT%{_defaultdocdir} # is set for sles or sled as /sles or /sled %define my_desktopdir /usr/share/susehelp/meta echo %{my_desktopdir} | sed 's:\(\|xyzy\)::' >filelist # mkdir -p desktop/{startup,reference,application,apparmor-admin-guide} ### install -d $RPM_BUILD_ROOT%{my_desktopdir}/%{name} # product is name without language code #%define gnome_dir /opt/gnome/share/gnome/help/lessons4lizards #install -d $RPM_BUILD_ROOT/%{gnome_dir} # if [ -d html/%my_book -o %name = sled-desktop-qs_%{my_lang} ]; then if [ %name = sled-desktop-qs_%{my_lang} ]; then tar xvf %{S:1} sed 's:@PATH@:@PATH@/gnomequick:' desktop/.directory > desktop/gnome.desktop # mv desktop gnome tar xvf %{S:11} sed 's:@PATH@:@PATH@/kdequick:' desktop/.directory > desktop/kde.desktop sed -i 's:\(KDE\|GNOME\) *:: s/^\(DocPath\)/;\1/' desktop/.directory # mv desktop kde # mkdir desktop # mv gnome kde desktop mkdir -p html/manual for d in html/SLED-*; do mv $d html/manual/${d#html/SLED-} done else mv html/%my_book html/manual fi pushd desktop for dir in $(find . -maxdepth 1 -type d) nixxx; do case $dir in ./book.heartbeat) mv index/*.desktop $dir/.directory $dir/*.desktop . rm -fr index $dir ;; ./stor_evms) mv index/*.desktop $dir/.directory $dir/*.desktop . rm -fr index $dir ;; #./index) # mv index/*.desktop $dir/.directory $dir/*.desktop . # rm -fr index $dir # ;; *) true ;; esac done case %name in sles-preparation*|apparmor-admin*) mv -f bk0*/*desktop .; rm -fr bk0* ;; esac for f in $(find . -type f -name '*desktop'); do # /usr/share/doc/manual/suselinux-manual_en/manual sed -i "s|@PATH@|%{_defaultdocdir}/%{name}/manual| s/\[\]//" $f if ! grep -q -e '^Name *=' $f; then # requiered if no "Name=" is present sed -i "s|^Name\[.*\]\(=.*\)|Name\1\\ &|" $f fi done for d in $(find . -maxdepth 1 -type d -name 'book*'); do id=${d//\./} id=${id//\//}%{my_lang} pushd $d for f in $(find . -name '.directory'); do sed -i "s|@PATH@|%{_defaultdocdir}/%{name}/manual| s/\[\]// s|@id@|$id|" $f done popd done # Why not checking deeply hidden files (again?) # Probably useful for stand-alone books # for f in $(find . -maxdepth 1 -name '*.directory'); do for f in $(find . -name '*.directory'); do id=%{name} id=${id//_/} sed -i "s|@PATH@|%{_defaultdocdir}/%{name}/manual| s/\[\]// s|@id@|$id|" $f # Fix the index.html reference if [ $f = ./.directory ]; then sed -i 's:\(^DocPath.*/\).*:\1index.html: s/^\(Name\|Comment\)\(.*\)/\1\2 (%{my_lang})/' $f fi # make sure to sort startup guide first case %name in sles-startup*) [ $f = "./.directory" ] \ && sed -i "s|^\(X-DOC-Weight\).*|\1=-2000|" $f ;; esac done # if [ %name = sled-desktop-qs_%{my_lang} ]; then # # Probably useful for quick books # for f in $(find . -maxdepth 2 -name '*.directory'); do # id=%{name} # id=${id//_/} # sed -i "s|@PATH@|%{_defaultdocdir}/%{name}/manual| # s/\[\]// # s|@id@|$id|" $f # # Fix the index.html reference # if [ $f = ./.directory ]; then # sed -i 's:\(^DocPath.*/\).*:\1index.html: # s/^\(Name\|Comment\)\(.*\)/\1\2 (%{my_lang})/' $f # fi # done # fi # remove the dots from the file names for f in $(find . -type f -name '*desktop'); do d=${f%/*} n=${f##*/}; n=${n/\.desktop}; n=${n//\./_}; n=${n}.desktop [ $f = $d/$n ] || mv -v $f $d/$n done ren_dir () { for d in $(find . -maxdepth $1 -mindepth $1 -type d); do n=${d#*/}; n=${n//\./_} [ ${d#*/} = $n ] || mv -v $d $n done } ren_dir 1 ren_dir 2 # cp -a . $RPM_BUILD_ROOT%{my_desktopdir}/%{name} #obsolete with slash_flavor #mkdir -p $RPM_BUILD_ROOT/usr/share/susehelp/meta/sled # cp %{S:100} $RPM_BUILD_ROOT%{my_desktopdir}/.directory || : popd # Link it into the Gnome help system (must be found by calling # susehelp help://suselinux-manual/ #pushd $RPM_BUILD_ROOT/%{gnome_dir} if [ %{my_lang} = "en" ]; then target=$RPM_BUILD_ROOT%{_defaultdocdir}/%{name}/manual install -d $target ln -sf %{_defaultdocdir}/%{name}/manual C else target=$RPM_BUILD_ROOT%{_defaultdocdir}/%{name}/manual install -d $target ln -sf %{_defaultdocdir}/%{name}/manual %{my_lang} fi #popd else # PDF only books install -d html/manual echo PDF only > html/manual/%{name} fi %clean rm -rf %{buildroot} %files -f filelist %defattr(-, root, root) %dir %{_defaultdocdir} %doc *.pdf %doc html/manual # %{my_desktopdir} %dir %{_datadir}/susehelp #%{gnome_dir} #%dir /opt/gnome #%dir /opt/gnome/share #%dir /opt/gnome/share/gnome #%dir /opt/gnome/share/gnome/help %changelog * Mon Jul 30 2007 toms@suse.de - New release for Beta 1: * Updated Virtualization chapter from Alexey * New article about kover from ta-ro (from Hackweek) * New article about digikam-css from jjaeger1 (from Hackweek) * New article SCPM for PCMCIA jjaeger1 * Fri Mar 23 2007 lrupp@suse.de - don't remove BUILD_ROOT in %%install and "mkdir -p BUILD_ROOT/foo" directly afterwards - added %%clean section * Fri Mar 23 2007 toms@suse.de - Disabled source3 and source4 * Thu Mar 22 2007 toms@suse.de - First release 0.1
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor