/[packages]/cauldron/indexhtml/current/SPECS/indexhtml.spec
ViewVC logotype

Contents of /cauldron/indexhtml/current/SPECS/indexhtml.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 48848 - (show annotations) (download)
Mon Feb 7 22:44:32 2011 UTC (13 years, 2 months ago) by ennael
File size: 3083 byte(s)
update version and clean spec file

1 %define name indexhtml
2 %define version 1
3 %define release %mkrel 1
4 %define epoch 1
5
6 Summary: Mageia html welcome page
7 Name: %{name}
8 Version: %{version}
9 Release: %{release}
10 URL: http://mageia.org
11 Requires(pre): mageia-release-common
12 Requires(post): gawk coreutils sed
13 BuildRequires: intltool
14 Source: %{name}-%{version}.tar.bz2
15 Group: System/Base
16 License: GPL
17 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
18 BuildArch: noarch
19
20
21 %description
22 Mageia index.html welcome page displayed by web browsers
23 when they are launched, first mail displayed on mail clients
24 after installation and "about" information.
25
26 %prep
27
28 %setup -q
29
30 %build
31 cd about
32 ./create_html.sh
33
34 %install
35 rm -fr %buildroot/
36
37 find $RPM_BUILD_DIR/%name -name ".svn" -print | xargs /bin/rm -fr
38
39 install -d -m 0755 %buildroot/%_datadir/mga/indexhtml/
40 tar c -C HTML . | tar x -C %buildroot/%_datadir/mga/indexhtml/
41
42 install -d -m 0755 %buildroot/%_datadir/mga/mail/text/
43 install -d -m 0755 %buildroot/%_datadir/mga/mail/html/
44 for lang in $(find mail/header-* -type f | sed "s|mail/header-||" ); do
45 cat mail/header-$lang &> tmpfile
46 cat mail/mail-$lang.txt >> tmpfile
47 install -m 0644 tmpfile %buildroot/%_datadir/mga/mail/text/mail-$lang
48
49 cat mail/header-$lang &> tmpfile
50 echo "Content-Type: multipart/related; type=\"multipart/alternative\";" >>tmpfile
51 echo " boundary=\"=-tThpx1YEZqL4gn53WjQ1\"" >> tmpfile
52 echo "" >> tmpfile
53 echo "--=-tThpx1YEZqL4gn53WjQ1" >> tmpfile
54 echo "Content-Type: multipart/alternative; boundary=\"=-aFPGjTr5jUHhXPWxbLcT\"" >>tmpfile
55 echo "" >> tmpfile
56 echo "--=-aFPGjTr5jUHhXPWxbLcT" >> tmpfile
57 cat mail/mail-$lang.txt >> tmpfile
58 cat mail/mail-$lang.html >> tmpfile
59 cat mail/mail-images >> tmpfile
60 install -m 0644 tmpfile %buildroot/%_datadir/mga/mail/html/mail-$lang
61
62 done
63
64 install -d -m 0755 %buildroot/%_datadir/doc/HTML/
65 install -m 0644 HTML/index.html %buildroot/%_datadir/doc/HTML/index.html
66
67 # add a default
68 cat %buildroot/%_datadir/mga/indexhtml/index.html | \
69 sed "s/#MDV_RELEASE/`cat /etc/release`/" | \
70 sed "s/#MDV_PRODUCT/download/" | \
71 sed "s/#MDV_PACK//" | \
72 sed "s/#LANG/en/g" \
73 > %buildroot/%_datadir/doc/HTML/index.html
74
75 # about Mandriva
76 install -d -m 0755 %buildroot/%_datadir/mga/about
77 install -d -m 0755 %buildroot/%_datadir/applications
78 install -d -m 0755 %buildroot/%{_bindir}
79 cp about/html/* %buildroot/%_datadir/mga/about
80 cp -r about/style %buildroot/%_datadir/mga/about/
81 cp about/about-mageia.desktop %buildroot/%_datadir/applications
82 cp about/about-mageia %buildroot/%{_bindir}
83
84 %clean
85 rm -fr %buildroot
86
87 %post
88 # done to prevent excludedocs to ignore the doc/HTML
89 mkdir -p %_datadir/doc/HTML
90 cat %_datadir/mga/indexhtml/index.html | \
91 sed "s/#MDV_RELEASE/`cat /etc/release`/" | \
92 sed "s/#MDV_PRODUCT/`gawk -F= '/META_CLASS/ { print $2 }' /etc/sysconfig/system`/" | \
93 sed "s/#MDV_PACK//" | \
94 sed "s/#LANG/${LC_NAME/[-_]*}/g" \
95 > %_datadir/doc/HTML/index.html
96
97 %files
98 %defattr(-,root,root,-)
99 %_datadir/mga/
100 %dir %_datadir/doc/HTML/
101 %_datadir/doc/HTML/index.html
102 %_datadir/applications/about-mageia.desktop
103 %{_bindir}/about-mageia
104
105

  ViewVC Help
Powered by ViewVC 1.1.30