- subpackage for arial black; rel 10
[packages/fonts-TTF-microsoft.git] / fonts-TTF-microsoft.spec
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.
5 #
6 # Conditional build:
7 %bcond_with     license_agreement       # generates package
8
9 %define         base_name       fonts-TTF-microsoft
10 %define         rel     10
11 Summary:        Microsoft TrueType fonts
12 Summary(pl.UTF-8):      Fonty TrueType firmy Microsoft
13 %if %{with license_agreement}
14 Name:           %{base_name}
15 %else
16 Name:           %{base_name}-installer
17 %endif
18 Version:        20020525
19 Release:        %{rel}%{?with_license_agreement:wla}
20 License:        Microsoft EULA (for non-commercial use)
21 Group:          Fonts
22 %if %{with license_agreement}
23 Source0:        http://downloads.sourceforge.net/corefonts/andale32.exe
24 # Source0-md5:  cbdc2fdd7d2ed0832795e86a8b9ee19a
25 Source1:        http://downloads.sourceforge.net/corefonts/arial32.exe
26 # Source1-md5:  9637df0e91703179f0723ec095a36cb5
27 Source2:        http://downloads.sourceforge.net/corefonts/arialb32.exe
28 # Source2-md5:  c9089ae0c3b3d0d8c4b0a95979bb9ff0
29 Source3:        http://downloads.sourceforge.net/corefonts/comic32.exe
30 # Source3-md5:  2b30de40bb5e803a0452c7715fc835d1
31 Source4:        http://downloads.sourceforge.net/corefonts/courie32.exe
32 # Source4-md5:  4e412c772294403ab62fb2d247d85c60
33 Source5:        http://downloads.sourceforge.net/corefonts/georgi32.exe
34 # Source5-md5:  4d90016026e2da447593b41a8d8fa8bd
35 Source6:        http://downloads.sourceforge.net/corefonts/impact32.exe
36 # Source6-md5:  7907c7dd6684e9bade91cff82683d9d7
37 Source7:        http://downloads.sourceforge.net/corefonts/times32.exe
38 # Source7-md5:  ed39c8ef91b9fb80f76f702568291bd5
39 Source8:        http://downloads.sourceforge.net/corefonts/trebuc32.exe
40 # Source8-md5:  0d7ea16cac6261f8513a061fbfcdb2b5
41 Source9:        http://downloads.sourceforge.net/corefonts/verdan32.exe
42 # Source9-md5:  12d2a75f8156e10607be1eaa8e8ef120
43 Source10:       http://downloads.sourceforge.net/corefonts/webdin32.exe
44 # Source10-md5: 230a1d13a365b22815f502eb24d9149b
45 %else
46 Source21:       http://svn.pld-linux.org/svn/license-installer/license-installer.sh
47 # Source21-md5: 4fb1600353dd57fe088e0b12fb0ecac2
48 # extracted from one of the above
49 Source20:       Microsoft-EULA.txt
50 %endif
51 URL:            http://corefonts.sourceforge.net/
52 %if %{with license_agreement}
53 BuildRequires:  cabextract
54 Requires(post,postun):  fontpostinst
55 Requires:       %{_fontsdir}/TTF
56 Requires:       %{name}-ariblk
57 Requires:       fontpostinst
58 %else
59 Requires:       cabextract
60 Requires:       mktemp > 1.5-18
61 Requires:       rpm-build-tools >= 4.4.35
62 %endif
63 BuildArch:      noarch
64 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
65
66 %define         ttffontsdir     %{_fontsdir}/TTF
67
68 %description
69 Microsoft free TrueType fonts collection.
70
71 %description -l pl.UTF-8
72 Kolekcja darmowych fontów TrueType firmy Microsoft.
73
74 %package ariblk
75 Summary:        Microsoft TrueType fonts - Arial Black
76 Group:          Fonts
77 Requires(post,postun):  fontpostinst
78 Requires:       %{_fontsdir}/TTF
79 Requires:       fontpostinst
80
81 %description ariblk
82 Microsoft TrueType fonts - Arial Black.
83
84 %prep
85 %if %{with license_agreement}
86 %setup -q -c -T
87 %{_bindir}/cabextract -L %{SOURCE0} %{SOURCE1} %{SOURCE2} %{SOURCE3} \
88 %{SOURCE4} %{SOURCE5} %{SOURCE6} %{SOURCE7} %{SOURCE8} %{SOURCE9} \
89 %{SOURCE10}
90 mv licen.txt Microsoft-EULA.txt
91 %endif
92
93 %install
94 rm -rf $RPM_BUILD_ROOT
95 %if %{without license_agreement}
96 install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}/%{base_name}}
97
98 sed -e '
99         s/@BASE_NAME@/%{base_name}/g
100         s/@TARGET_CPU@/%{_target_cpu}/g
101         s-@VERSION@-%{version}-g
102         s-@RELEASE@-%{release}-g
103         s,@SPECFILE@,%{_datadir}/%{base_name}/%{base_name}.spec,g
104         s,@DATADIR@,%{_datadir}/%{base_name},g
105         s,@LICENSE@,%{_datadir}/%{base_name}/Microsoft-EULA.txt,
106 ' %{SOURCE21} > $RPM_BUILD_ROOT%{_bindir}/%{base_name}.install
107
108 cp -a %{_specdir}/%{base_name}.spec $RPM_BUILD_ROOT%{_datadir}/%{base_name}
109 install -p %{SOURCE20} $RPM_BUILD_ROOT%{_datadir}/%{base_name}
110
111 %else
112 install -d $RPM_BUILD_ROOT%{ttffontsdir}
113 cp -a *.ttf $RPM_BUILD_ROOT%{ttffontsdir}
114 %endif
115
116 %clean
117 rm -rf $RPM_BUILD_ROOT
118
119 %if %{with license_agreement}
120 %post
121 fontpostinst TTF
122
123 %postun
124 fontpostinst TTF
125
126 %post ariblk
127 fontpostinst TTF
128
129 %postun ariblk
130 fontpostinst TTF
131
132 %else
133 %post
134 echo "
135 If you accept the license enclosed in the file
136 %{_datadir}/%{base_name}/Microsoft-EULA.txt
137 and want to install real fonts, then rebuild the package with the
138 following command:
139
140 %{_bindir}/%{base_name}.install --with license_agreement %{_datadir}/%{base_name}/%{base_name}.spec
141 "
142 %endif
143
144 %files
145 %defattr(644,root,root,755)
146 %if %{with license_agreement}
147 %doc Microsoft-EULA.txt
148 %{ttffontsdir}/andalemo.ttf
149 %{ttffontsdir}/arial.ttf
150 %{ttffontsdir}/arialbd.ttf
151 %{ttffontsdir}/arialbi.ttf
152 %{ttffontsdir}/ariali.ttf
153 %{ttffontsdir}/comic*.ttf
154 %{ttffontsdir}/cour*.ttf
155 %{ttffontsdir}/georgia*.ttf
156 %{ttffontsdir}/impact.ttf
157 %{ttffontsdir}/times*.ttf
158 %{ttffontsdir}/trebuc*.ttf
159 %{ttffontsdir}/verdana*.ttf
160 %{ttffontsdir}/webdings.ttf
161 %else
162 %attr(755,root,root) %{_bindir}/%{base_name}.install
163 %{_datadir}/%{base_name}
164 %endif
165
166 %if %{with license_agreement}
167 %files ariblk
168 %defattr(644,root,root,755)
169 %{ttffontsdir}/ariblk.ttf
170 %endif
This page took 0.086668 seconds and 3 git commands to generate.