summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--indexhtml.spec22
1 files changed, 18 insertions, 4 deletions
diff --git a/indexhtml.spec b/indexhtml.spec
index d811e0f..e82f900 100644
--- a/indexhtml.spec
+++ b/indexhtml.spec
@@ -1,6 +1,6 @@
%define name indexhtml
%define version 2007.0
-%define release %mkrel 1
+%define release %mkrel 2
Summary: Mandriva Linux html welcome page
Name: %{name}
@@ -64,24 +64,38 @@ install -m 0644 HTML/index.html %buildroot/%_datadir/doc/HTML/index.html
#cd %buildroot/etc/sysconfig/network-scripts/ifup.d
#ln -s ../../../../%_datadir/mdk/indexhtml/update-indexhtml indexhtml
+# add a default
+cat %_datadir/mdk/indexhtml/index.html | \
+ sed "s/#MDV_RELEASE/`cat /etc/release`/" | \
+ sed "s/#MDV_PRODUCT/`gawk -F= '/META_CLASS/ { print $2 }' /etc/sysconfig/system`/" | \
+ sed "s/#MDV_PACK//" | \
+ sed "s/#LANG/en/g" \
+ > %buildroot/%_datadir/doc/HTML/index.html
+
+
%clean
rm -fr %buildroot
%post
cat %_datadir/mdk/indexhtml/index.html | \
sed "s/#MDV_RELEASE/`cat /etc/release`/" | \
- sed "s/#MDV_PRODUCT/`cat /etc/sysconfig/system |grep META_CLASS |gawk -F= '{print $2}'`/" | \
+ sed "s/#MDV_PRODUCT/`gawk -F= '/META_CLASS/ { print $2 }' /etc/sysconfig/system`/" | \
sed "s/#MDV_PACK//" | \
- sed "s/#LANG/`locale |grep LANG|gawk -F= '{print $2}'|sed 's/_/-/'`/g" \
+ sed "s/#LANG/${LC_NAME/[-_]*}/g" \
> %_datadir/doc/HTML/index.html
%files
%defattr(-,root,root,-)
%_datadir/mdk/
-%ghost %_datadir/doc/HTML/index.html
+%_datadir/doc/HTML/index.html
#/etc/sysconfig/network-scripts/ifup.d/indexhtml
%changelog
+* Thu Aug 31 2006 Warly <warly@mandriva.com> 2007.0-2mdv2007.0
+- add a default index.html so that /usr/share/doc/HTML is created and
+ in case of --noscripts install
+- simplify somewhat the script
+
* Mon Aug 21 2006 Romain d'Alverny <rdalverny@mandriva.com> 2007.0-1mdk
- updated background image, CSS and links