1 |
Name: indexhtml |
2 |
Epoch: 1 |
3 |
Version: 7.0 |
4 |
Release: %mkrel 3 |
5 |
Summary: Mageia html welcome page |
6 |
Group: System/Base |
7 |
License: GPLv3+ |
8 |
URL: https://mageia.org/ |
9 |
Source0: https://gitweb.mageia.org/software/indexhtml/snapshot/%{name}-%{version}.tar.xz |
10 |
|
11 |
BuildArch: noarch |
12 |
BuildRequires: intltool |
13 |
Requires(pre): mageia-release-common |
14 |
Requires(post): coreutils sed mageia-release-Default |
15 |
|
16 |
%description |
17 |
Mageia index.html welcome page displayed by web browsers |
18 |
when they are launched, first mail displayed on mail clients |
19 |
after installation and "about" information. |
20 |
|
21 |
%prep |
22 |
%autosetup |
23 |
|
24 |
%build |
25 |
cd about |
26 |
./create_html.sh |
27 |
|
28 |
%install |
29 |
install -d -m 0755 %{buildroot}%{_datadir}/indexhtml/ |
30 |
tar c -C HTML . | tar x -C %{buildroot}%{_datadir}/indexhtml/ |
31 |
|
32 |
install -d -m 0755 %{buildroot}%{_datadir}/mga/mail/text/ |
33 |
install -d -m 0755 %{buildroot}%{_datadir}/mga/mail/html/ |
34 |
for lang in $(find mail/header-* -type f | sed "s|mail/header-||" ); do |
35 |
cat mail/header-$lang &> tmpfile |
36 |
cat mail/mail-$lang.txt >> tmpfile |
37 |
install -m 0644 tmpfile %{buildroot}%{_datadir}/mga/mail/text/mail-$lang |
38 |
|
39 |
cat mail/header-$lang &> tmpfile |
40 |
echo "Content-Type: multipart/related; type=\"multipart/alternative\";" >>tmpfile |
41 |
echo " boundary=\"=-tThpx1YEZqL4gn53WjQ1\"" >> tmpfile |
42 |
echo "" >> tmpfile |
43 |
echo "--=-tThpx1YEZqL4gn53WjQ1" >> tmpfile |
44 |
echo "Content-Type: multipart/alternative; boundary=\"=-aFPGjTr5jUHhXPWxbLcT\"" >>tmpfile |
45 |
echo "" >> tmpfile |
46 |
echo "--=-aFPGjTr5jUHhXPWxbLcT" >> tmpfile |
47 |
cat mail/mail-$lang.txt >> tmpfile |
48 |
cat mail/mail-$lang.html >> tmpfile |
49 |
# cat mail/mail-images >> tmpfile |
50 |
install -m 0644 tmpfile %{buildroot}%{_datadir}/mga/mail/html/mail-$lang |
51 |
|
52 |
done |
53 |
|
54 |
# about Mageia |
55 |
install -d -m 0755 %{buildroot}%{_bindir} |
56 |
install -d -m 0755 %{buildroot}%{_datadir}/applications |
57 |
cp about/about-mageia.desktop %{buildroot}%{_datadir}/applications |
58 |
install -m 0755 about/about-mageia %{buildroot}%{_bindir}/about-mageia |
59 |
|
60 |
%post |
61 |
# adapt to the LANG and PRODUCT_ID of the installation |
62 |
mkdir -p %{_datadir}/indexhtml |
63 |
sed -i -e "s/#PRODUCT_ID/`cat /etc/product.id`/" \ |
64 |
-e "s/#LANG/${LC_NAME/[-_]*}/g" \ |
65 |
%{_datadir}/indexhtml/index.html |
66 |
|
67 |
%files |
68 |
%{_bindir}/about-mageia |
69 |
%{_datadir}/mga/mail/ |
70 |
%{_datadir}/indexhtml/ |
71 |
%{_datadir}/applications/about-mageia.desktop |