]> git.pld-linux.org Git - packages/fonts-TTF-microsoft.git/blob - fonts-TTF-microsoft.spec
- don't confuse distfiles with duplicate source0
[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 Summary:        Microsoft True Type fonts
11 Summary(pl):    Fonty True Type firmy Microsoft
12 %if %{with license_agreement}
13 Name:           %{base_name}
14 %else
15 Name:           %{base_name}-installer
16 %endif
17 %define         _rel    6
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://dl.sourceforge.net/corefonts/andale32.exe
24 # Source0-md5:  cbdc2fdd7d2ed0832795e86a8b9ee19a
25 Source1:        http://dl.sourceforge.net/corefonts/arial32.exe
26 # Source1-md5:  9637df0e91703179f0723ec095a36cb5
27 Source2:        http://dl.sourceforge.net/corefonts/arialb32.exe
28 # Source2-md5:  c9089ae0c3b3d0d8c4b0a95979bb9ff0
29 Source3:        http://dl.sourceforge.net/corefonts/comic32.exe
30 # Source3-md5:  2b30de40bb5e803a0452c7715fc835d1
31 Source4:        http://dl.sourceforge.net/corefonts/courie32.exe
32 # Source4-md5:  4e412c772294403ab62fb2d247d85c60
33 Source5:        http://dl.sourceforge.net/corefonts/georgi32.exe
34 # Source5-md5:  4d90016026e2da447593b41a8d8fa8bd
35 Source6:        http://dl.sourceforge.net/corefonts/impact32.exe
36 # Source6-md5:  7907c7dd6684e9bade91cff82683d9d7
37 Source7:        http://dl.sourceforge.net/corefonts/times32.exe
38 # Source7-md5:  ed39c8ef91b9fb80f76f702568291bd5
39 Source8:        http://dl.sourceforge.net/corefonts/trebuc32.exe
40 # Source8-md5:  0d7ea16cac6261f8513a061fbfcdb2b5
41 Source9:        http://dl.sourceforge.net/corefonts/verdan32.exe
42 # Source9-md5:  12d2a75f8156e10607be1eaa8e8ef120
43 Source10:       http://dl.sourceforge.net/corefonts/webdin32.exe
44 # Source10-md5: 230a1d13a365b22815f502eb24d9149b
45 %else
46 Source21:       license-installer.sh
47 # extracted from one of the above
48 Source20:       Microsoft-EULA.txt
49 %endif
50 URL:            http://corefonts.sourceforge.net/
51 %if %{with license_agreement}
52 BuildRequires:  cabextract
53 Requires(post,postun):  fontpostinst
54 Requires:       %{_fontsdir}/TTF
55 %else
56 Requires:       cabextract
57 Requires:       rpm-build-tools
58 %endif
59 BuildArch:      noarch
60 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
61
62 %define         ttffontsdir     %{_fontsdir}/TTF
63
64 %description
65 Microsoft free True Type fonts collection.
66
67 %description -l pl
68 Kolekcja darmowych fontów True Type firmy Microsoft.
69
70 %prep
71 %if %{with license_agreement}
72 %setup -q -c -T
73 %{_bindir}/cabextract -L %{SOURCE0} %{SOURCE1} %{SOURCE2} %{SOURCE3} \
74 %{SOURCE4} %{SOURCE5} %{SOURCE6} %{SOURCE7} %{SOURCE8} %{SOURCE9} \
75 %{SOURCE10}
76 %endif
77
78 %install
79 rm -rf $RPM_BUILD_ROOT
80
81 %if %{without license_agreement}
82 install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}/%{base_name}}
83
84 sed -e '
85         s/@BASE_NAME@/%{base_name}/g
86         s/@TARGET_CPU@/%{_target_cpu}/g
87         s-@VERSION@-%{version}-g
88         s-@RELEASE@-%{release}-g
89         s,@SPECFILE@,%{_datadir}/%{base_name}/%{base_name}.spec,g
90         s,@LICENSE@,%{_datadir}/%{base_name}/Microsoft-EULA.txt,
91 ' %{SOURCE21} > $RPM_BUILD_ROOT%{_bindir}/%{base_name}.install
92
93 install %{_specdir}/%{base_name}.spec $RPM_BUILD_ROOT%{_datadir}/%{base_name}
94 install %{SOURCE20} $RPM_BUILD_ROOT%{_datadir}/%{base_name}
95
96 %else
97 install -d $RPM_BUILD_ROOT%{ttffontsdir}
98 install *.ttf $RPM_BUILD_ROOT%{ttffontsdir}
99 %endif
100
101 %clean
102 rm -rf $RPM_BUILD_ROOT
103
104 %if %{with license_agreement}
105 %post
106 fontpostinst TTF
107
108 %postun
109 fontpostinst TTF
110
111 %else
112 %post
113 echo "
114 If you accept the license enclosed in the file
115 %{_datadir}/%{base_name}/Microsoft-EULA.txt
116 and want to install real fonts, then rebuild the package with the
117 following command:
118
119 %{_bindir}/%{base_name}.install --with license_agreement %{_datadir}/%{base_name}/%{base_name}.spec
120 "
121 %endif
122
123 %files
124 %defattr(644,root,root,755)
125 %if %{with license_agreement}
126 %doc licen.txt
127 %{ttffontsdir}/*
128 %else
129 %attr(755,root,root) %{_bindir}/%{base_name}.install
130 %{_datadir}/%{base_name}
131 %endif
This page took 0.107552 seconds and 3 git commands to generate.