summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorent Villard <warly@mandriva.com>2006-08-31 10:00:02 +0000
committerFlorent Villard <warly@mandriva.com>2006-08-31 10:00:02 +0000
commit85cfa56330651c55be88b131bfb8b3947483a1a9 (patch)
treee27ac15524e839c991fb7f276d152a14e56a504d
parentde4632171ac50fdfeba8586c290ff77c626d77c9 (diff)
downloadindexhtml-85cfa56330651c55be88b131bfb8b3947483a1a9.tar
indexhtml-85cfa56330651c55be88b131bfb8b3947483a1a9.tar.gz
indexhtml-85cfa56330651c55be88b131bfb8b3947483a1a9.tar.bz2
indexhtml-85cfa56330651c55be88b131bfb8b3947483a1a9.tar.xz
indexhtml-85cfa56330651c55be88b131bfb8b3947483a1a9.zip
update generation script; add a default index.html page
-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