diff options
Diffstat (limited to 'indexhtml.spec')
-rw-r--r-- | indexhtml.spec | 70 |
1 files changed, 45 insertions, 25 deletions
diff --git a/indexhtml.spec b/indexhtml.spec index a2b0cc6..d7658dc 100644 --- a/indexhtml.spec +++ b/indexhtml.spec @@ -1,7 +1,7 @@ Summary: Mandrake html welcome page Name: indexhtml Version: 9.1 -Release: 3mdk +Release: 4mdk Source: indexhtml.tar.bz2 Group: System/Base License: GPL @@ -39,36 +39,52 @@ rm -fr %buildroot %post if [ -r /etc/sysconfig/i18n ] ; then - . /etc/sysconfig/i18n - if [ -n "$LANGUAGE" ]; then - LISTLANG="`echo $LANGUAGE | tr ':' ' '`" ; - else - if [ -n "$LANG" ]; then - LISTLANG="$LANG" - else - LISTLANG=en - fi - fi - for i in $LISTLANG - do - if [ -r %_datadir/mdk/indexhtml/index-$i.html ]; then - ln -sf %_datadir/mdk/indexhtml/index-$i.html %{_defaultdocdir}/HTML/index.html - break - else - lang=`echo $i | cut -b-2` - if [ -r %_datadir/mdk/indexhtml/index-$lang.html ]; then - ln -sf %_datadir/mdk/indexhtml/index-$lang.html %{_defaultdocdir}/HTML/index.html - break; - - fi - fi - done + . /etc/sysconfig/i18n + if [ -n "$LANGUAGE" ]; then + LISTLANG="`echo $LANGUAGE | tr ':' ' '`" ; + else + if [ -n "$LANG" ]; then + LISTLANG="$LANG" + else + LISTLANG=en + fi + fi +else + LISTLANG=en +fi + +for i in $LISTLANG +do + if [ -r %_datadir/mdk/indexhtml/index-$i.html ]; then + cat %_datadir/mdk/indexhtml/index-$i.html > \ + %_datadir/mdk/indexhtml/index.html + break + else + lang=`echo $i | cut -b-2` + if [ -r %_datadir/mdk/indexhtml/index-$lang.html ]; then + cat %_datadir/mdk/indexhtml/index-$lang.html > \ + %_datadir/mdk/indexhtml/index.html + break; + + fi + fi +done + +if [ ! -r %_datadir/mdk/indexhtml/index.html ]; then + cat %_datadir/mdk/indexhtml/index-en.html > \ + %_datadir/mdk/indexhtml/index.html fi %postun rm -f %{_defaultdocdir}/HTML/index.html +%preun +if [ $1 = 0 ]; then + rm -f %_datadir/mdk/indexhtml/index.html +fi + + %files %defattr(-,root,root,-) @@ -78,6 +94,10 @@ rm -f %{_defaultdocdir}/HTML/index.html %changelog +* Thu Mar 06 2003 Laurent MONTEL <lmontel@mandrakesoft.com> 9.1-4mdk +- fix generation of the html file +- cleanup before removal + * Thu Feb 27 2003 David BAUDENS <baudens@mandrakesoft.com> 9.1-3mdk - Move in /usr/share/mdk |