summaryrefslogtreecommitdiffstats
path: root/indexhtml.spec
diff options
context:
space:
mode:
authorLaurent Montel <lmontel@mandriva.org>2003-03-06 18:05:13 +0000
committerLaurent Montel <lmontel@mandriva.org>2003-03-06 18:05:13 +0000
commitc53ed66816125d53e1ed439b9dfcd8446f80c40d (patch)
treede61d8482652b84ca15463a173ff144168e24526 /indexhtml.spec
parent59955fc1cef549279a048de737875d78ae779d46 (diff)
downloadindexhtml-c53ed66816125d53e1ed439b9dfcd8446f80c40d.tar
indexhtml-c53ed66816125d53e1ed439b9dfcd8446f80c40d.tar.gz
indexhtml-c53ed66816125d53e1ed439b9dfcd8446f80c40d.tar.bz2
indexhtml-c53ed66816125d53e1ed439b9dfcd8446f80c40d.tar.xz
indexhtml-c53ed66816125d53e1ed439b9dfcd8446f80c40d.zip
Update
Diffstat (limited to 'indexhtml.spec')
-rw-r--r--indexhtml.spec70
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