]>
Commit | Line | Data |
---|---|---|
427e4904 ER |
1 | # NOTE |
2 | # according to EULA we *can* store the .exe's in distfiles in | |
3 | # unaltered form (that is those .exe files), while can't distribute | |
4 | # resulting rpm. | |
ad7883a7 | 5 | # |
6 | # Conditional build: | |
e9cdd5ee | 7 | %bcond_with license_agreement # generates package |
737a0423 | 8 | |
427e4904 | 9 | %define base_name fonts-TTF-microsoft |
a78c593b | 10 | %define rel 9 |
96a3b669 JB |
11 | Summary: Microsoft TrueType fonts |
12 | Summary(pl.UTF-8): Fonty TrueType firmy Microsoft | |
7152a5cf | 13 | %if %{with license_agreement} |
14 | Name: %{base_name} | |
15 | %else | |
16 | Name: %{base_name}-installer | |
17 | %endif | |
5e6fde32 | 18 | Version: 20020525 |
737a0423 | 19 | Release: %{rel}%{?with_license_agreement:wla} |
ad7883a7 | 20 | License: Microsoft EULA (for non-commercial use) |
0dd2af23 | 21 | Group: Fonts |
7152a5cf | 22 | %if %{with license_agreement} |
46c3747c | 23 | Source0: http://dl.sourceforge.net/corefonts/andale32.exe |
427e4904 | 24 | # Source0-md5: cbdc2fdd7d2ed0832795e86a8b9ee19a |
46c3747c | 25 | Source1: http://dl.sourceforge.net/corefonts/arial32.exe |
427e4904 | 26 | # Source1-md5: 9637df0e91703179f0723ec095a36cb5 |
46c3747c | 27 | Source2: http://dl.sourceforge.net/corefonts/arialb32.exe |
427e4904 | 28 | # Source2-md5: c9089ae0c3b3d0d8c4b0a95979bb9ff0 |
46c3747c | 29 | Source3: http://dl.sourceforge.net/corefonts/comic32.exe |
427e4904 | 30 | # Source3-md5: 2b30de40bb5e803a0452c7715fc835d1 |
46c3747c | 31 | Source4: http://dl.sourceforge.net/corefonts/courie32.exe |
427e4904 | 32 | # Source4-md5: 4e412c772294403ab62fb2d247d85c60 |
46c3747c | 33 | Source5: http://dl.sourceforge.net/corefonts/georgi32.exe |
427e4904 | 34 | # Source5-md5: 4d90016026e2da447593b41a8d8fa8bd |
46c3747c | 35 | Source6: http://dl.sourceforge.net/corefonts/impact32.exe |
427e4904 | 36 | # Source6-md5: 7907c7dd6684e9bade91cff82683d9d7 |
46c3747c | 37 | Source7: http://dl.sourceforge.net/corefonts/times32.exe |
427e4904 | 38 | # Source7-md5: ed39c8ef91b9fb80f76f702568291bd5 |
46c3747c | 39 | Source8: http://dl.sourceforge.net/corefonts/trebuc32.exe |
427e4904 | 40 | # Source8-md5: 0d7ea16cac6261f8513a061fbfcdb2b5 |
46c3747c | 41 | Source9: http://dl.sourceforge.net/corefonts/verdan32.exe |
427e4904 | 42 | # Source9-md5: 12d2a75f8156e10607be1eaa8e8ef120 |
46c3747c | 43 | Source10: http://dl.sourceforge.net/corefonts/webdin32.exe |
427e4904 | 44 | # Source10-md5: 230a1d13a365b22815f502eb24d9149b |
7152a5cf | 45 | %else |
209acadd | 46 | Source21: http://svn.pld-linux.org/svn/license-installer/license-installer.sh |
47 | # Source21-md5: 4fb1600353dd57fe088e0b12fb0ecac2 | |
7152a5cf | 48 | # extracted from one of the above |
49 | Source20: Microsoft-EULA.txt | |
ad7883a7 | 50 | %endif |
d9d5f319 | 51 | URL: http://corefonts.sourceforge.net/ |
7152a5cf | 52 | %if %{with license_agreement} |
5e6fde32 | 53 | BuildRequires: cabextract |
7152a5cf | 54 | Requires(post,postun): fontpostinst |
427e4904 | 55 | Requires: %{_fontsdir}/TTF |
f515789a | 56 | Requires: fontpostinst |
7152a5cf | 57 | %else |
4b0c12c9 | 58 | Requires: cabextract |
0410e77e | 59 | Requires: mktemp > 1.5-18 |
0ed15fb7 | 60 | Requires: rpm-build-tools >= 4.4.35 |
7152a5cf | 61 | %endif |
fb613dbd | 62 | BuildArch: noarch |
5e6fde32 | 63 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
64 | ||
65 | %define ttffontsdir %{_fontsdir}/TTF | |
66 | ||
5e6fde32 | 67 | %description |
96a3b669 | 68 | Microsoft free TrueType fonts collection. |
1ed1a3e7 | 69 | |
7fed25b6 | 70 | %description -l pl.UTF-8 |
96a3b669 | 71 | Kolekcja darmowych fontów TrueType firmy Microsoft. |
5e6fde32 | 72 | |
73 | %prep | |
7152a5cf | 74 | %if %{with license_agreement} |
5e6fde32 | 75 | %setup -q -c -T |
427e4904 | 76 | %{_bindir}/cabextract -L %{SOURCE0} %{SOURCE1} %{SOURCE2} %{SOURCE3} \ |
5e6fde32 | 77 | %{SOURCE4} %{SOURCE5} %{SOURCE6} %{SOURCE7} %{SOURCE8} %{SOURCE9} \ |
78 | %{SOURCE10} | |
7152a5cf | 79 | %endif |
5e6fde32 | 80 | |
7152a5cf | 81 | %install |
82 | rm -rf $RPM_BUILD_ROOT | |
5e6fde32 | 83 | |
3d45beeb | 84 | %if !%{with license_agreement} |
7152a5cf | 85 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}/%{base_name}} |
ad7883a7 | 86 | |
11e9721d ER |
87 | sed -e ' |
88 | s/@BASE_NAME@/%{base_name}/g | |
89 | s/@TARGET_CPU@/%{_target_cpu}/g | |
90 | s-@VERSION@-%{version}-g | |
91 | s-@RELEASE@-%{release}-g | |
92 | s,@SPECFILE@,%{_datadir}/%{base_name}/%{base_name}.spec,g | |
a78c593b | 93 | s,@DATADIR@,%{_datadir}/%{base_name},g |
11e9721d | 94 | s,@LICENSE@,%{_datadir}/%{base_name}/Microsoft-EULA.txt, |
066d48b7 | 95 | ' %{SOURCE21} > $RPM_BUILD_ROOT%{_bindir}/%{base_name}.install |
5e6fde32 | 96 | |
7152a5cf | 97 | install %{_specdir}/%{base_name}.spec $RPM_BUILD_ROOT%{_datadir}/%{base_name} |
98 | install %{SOURCE20} $RPM_BUILD_ROOT%{_datadir}/%{base_name} | |
99 | ||
100 | %else | |
5e6fde32 | 101 | install -d $RPM_BUILD_ROOT%{ttffontsdir} |
46c3747c | 102 | install *.ttf $RPM_BUILD_ROOT%{ttffontsdir} |
7152a5cf | 103 | %endif |
1ed1a3e7 | 104 | |
5e6fde32 | 105 | %clean |
106 | rm -rf $RPM_BUILD_ROOT | |
107 | ||
7152a5cf | 108 | %if %{with license_agreement} |
5e6fde32 | 109 | %post |
c9e67209 | 110 | fontpostinst TTF |
5e6fde32 | 111 | |
112 | %postun | |
c9e67209 | 113 | fontpostinst TTF |
5e6fde32 | 114 | |
7152a5cf | 115 | %else |
2d6092d3 | 116 | %post |
7152a5cf | 117 | echo " |
118 | If you accept the license enclosed in the file | |
119 | %{_datadir}/%{base_name}/Microsoft-EULA.txt | |
120 | and want to install real fonts, then rebuild the package with the | |
121 | following command: | |
122 | ||
427e4904 | 123 | %{_bindir}/%{base_name}.install --with license_agreement %{_datadir}/%{base_name}/%{base_name}.spec |
7152a5cf | 124 | " |
125 | %endif | |
126 | ||
5e6fde32 | 127 | %files |
128 | %defattr(644,root,root,755) | |
7152a5cf | 129 | %if %{with license_agreement} |
5a547390 | 130 | %doc licen.txt |
5e6fde32 | 131 | %{ttffontsdir}/* |
7152a5cf | 132 | %else |
133 | %attr(755,root,root) %{_bindir}/%{base_name}.install | |
134 | %{_datadir}/%{base_name} | |
135 | %endif |