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

  ViewVC Help
Powered by ViewVC 1.1.28