]>
Commit | Line | Data |
---|---|---|
430dc27d JB |
1 | # |
2 | # Conditional build: | |
ed7d13f3 | 3 | %bcond_with license_agreement # generates package (requires Windows license) |
430dc27d | 4 | # |
ed7d13f3 | 5 | %define base_name fonts-TTF-microsoft-tahoma |
bff50e90 JB |
6 | Summary: Microsoft Tahoma TrueType font |
7 | Summary(pl.UTF-8): Font TrueType Tahoma firmy Microsoft | |
d9e263e2 | 8 | %if %{with license_agreement} |
9 | Name: %{base_name} | |
10 | %else | |
11 | Name: %{base_name}-installer | |
12 | %endif | |
430dc27d | 13 | Version: 20020525 |
03f2fcfe | 14 | %define _rel 3 |
ed7d13f3 ER |
15 | Release: %{_rel}%{?with_license_agreement:wla} |
16 | # part of IE update - requires Windows license to use | |
17 | License: Windows EULA | |
430dc27d | 18 | Group: Fonts |
d9e263e2 | 19 | %if %{with license_agreement} |
430dc27d JB |
20 | Source0: http://download.microsoft.com/download/ie6sp1/finrel/6_sp1/W98NT42KMeXP/EN-US/IELPKTH.CAB |
21 | # NoSource0-md5: 358584cddb75ac90472c25f01b308ebe | |
ed7d13f3 | 22 | NoSource: 0 |
430dc27d | 23 | BuildRequires: cabextract |
d9e263e2 | 24 | Requires(post,postun): fontpostinst |
ed7d13f3 | 25 | Requires: %{_fontsdir}/TTF |
d9e263e2 | 26 | %else |
ed7d13f3 | 27 | Source1: license-installer.sh |
635688be | 28 | Requires: cabextract |
d9e263e2 | 29 | Requires: rpm-build-tools |
d9e263e2 | 30 | %endif |
430dc27d JB |
31 | BuildArch: noarch |
32 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
33 | ||
34 | %define ttffontsdir %{_fontsdir}/TTF | |
35 | ||
36 | %description | |
bff50e90 | 37 | Microsoft Tahoma TrueType font. |
430dc27d | 38 | |
0c72036f | 39 | %description -l pl.UTF-8 |
bff50e90 | 40 | Font TrueType Tahoma firmy Microsoft. |
430dc27d JB |
41 | |
42 | %prep | |
d9e263e2 | 43 | %if %{with license_agreement} |
430dc27d | 44 | %setup -q -c -T |
ed7d13f3 | 45 | %{_bindir}/cabextract -L %{SOURCE0} |
d9e263e2 | 46 | %endif |
430dc27d JB |
47 | |
48 | %install | |
49 | rm -rf $RPM_BUILD_ROOT | |
0bae8f75 | 50 | %if !%{with license_agreement} |
d9e263e2 | 51 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}/%{base_name}} |
52 | ||
5cb78f9a ER |
53 | sed -e ' |
54 | s/@BASE_NAME@/%{base_name}/g | |
55 | s/@TARGET_CPU@/%{_target_cpu}/g | |
56 | s-@VERSION@-%{version}-g | |
57 | s-@RELEASE@-%{release}-g | |
ed7d13f3 | 58 | s,@USE_DISTFILES@,no,g |
5cb78f9a | 59 | s,@SPECFILE@,%{_datadir}/%{base_name}/%{base_name}.spec,g |
ed7d13f3 | 60 | ' %{SOURCE1} > $RPM_BUILD_ROOT%{_bindir}/%{base_name}.install |
d9e263e2 | 61 | |
62 | install %{_specdir}/%{base_name}.spec $RPM_BUILD_ROOT%{_datadir}/%{base_name} | |
63 | ||
64 | %else | |
430dc27d JB |
65 | install -d $RPM_BUILD_ROOT%{ttffontsdir} |
66 | install *.ttf $RPM_BUILD_ROOT%{ttffontsdir} | |
d9e263e2 | 67 | %endif |
430dc27d JB |
68 | |
69 | %clean | |
70 | rm -rf $RPM_BUILD_ROOT | |
71 | ||
d9e263e2 | 72 | %if %{with license_agreement} |
430dc27d JB |
73 | %post |
74 | fontpostinst TTF | |
75 | ||
76 | %postun | |
77 | fontpostinst TTF | |
78 | ||
d9e263e2 | 79 | %else |
498ed5b5 | 80 | %post |
d9e263e2 | 81 | echo " |
82 | License issues made us not to include inherent files into this package | |
ed7d13f3 ER |
83 | by default (You need Windows license). If you want to create full |
84 | working package please build it with the following command: | |
d9e263e2 | 85 | |
ed7d13f3 | 86 | %{_bindir}/%{base_name}.install --with license_agreement %{_datadir}/%{base_name}/%{base_name}.spec |
d9e263e2 | 87 | " |
88 | %endif | |
89 | ||
430dc27d JB |
90 | %files |
91 | %defattr(644,root,root,755) | |
d9e263e2 | 92 | %if %{with license_agreement} |
430dc27d | 93 | %{ttffontsdir}/* |
d9e263e2 | 94 | %else |
95 | %attr(755,root,root) %{_bindir}/%{base_name}.install | |
96 | %{_datadir}/%{base_name} | |
97 | %endif |