]> git.pld-linux.org Git - packages/fonts-TTF-microsoft.git/blob - fonts-TTF-microsoft.spec
- run script in %post
[packages/fonts-TTF-microsoft.git] / fonts-TTF-microsoft.spec
1 #
2 # Conditional build:
3 %bcond_with     license_agreement       # generates package
4 #
5 Summary:        Microsoft True Type fonts
6 Summary(pl):    Fonty True Type firmy Microsoft
7 %define         base_name       fonts-TTF-microsoft
8 %if %{with license_agreement}
9 Name:           %{base_name}
10 %else
11 Name:           %{base_name}-installer
12 %endif
13 Version:        20020525
14 Release:        6%{?with_license_agreement:wla}
15 License:        Microsoft EULA (for non-commercial use)
16 Group:          Fonts
17 %if %{with license_agreement}
18 Source0:        http://dl.sourceforge.net/corefonts/andale32.exe
19 # NoSource0-md5:        cbdc2fdd7d2ed0832795e86a8b9ee19a
20 Source1:        http://dl.sourceforge.net/corefonts/arial32.exe
21 # NoSource1-md5:        9637df0e91703179f0723ec095a36cb5
22 Source2:        http://dl.sourceforge.net/corefonts/arialb32.exe
23 # NoSource2-md5:        c9089ae0c3b3d0d8c4b0a95979bb9ff0
24 Source3:        http://dl.sourceforge.net/corefonts/comic32.exe
25 # NoSource3-md5:        2b30de40bb5e803a0452c7715fc835d1
26 Source4:        http://dl.sourceforge.net/corefonts/courie32.exe
27 # NoSource4-md5:        4e412c772294403ab62fb2d247d85c60
28 Source5:        http://dl.sourceforge.net/corefonts/georgi32.exe
29 # NoSource5-md5:        4d90016026e2da447593b41a8d8fa8bd
30 Source6:        http://dl.sourceforge.net/corefonts/impact32.exe
31 # NoSource6-md5:        7907c7dd6684e9bade91cff82683d9d7
32 Source7:        http://dl.sourceforge.net/corefonts/times32.exe
33 # NoSource7-md5:        ed39c8ef91b9fb80f76f702568291bd5
34 Source8:        http://dl.sourceforge.net/corefonts/trebuc32.exe
35 # NoSource8-md5:        0d7ea16cac6261f8513a061fbfcdb2b5
36 Source9:        http://dl.sourceforge.net/corefonts/verdan32.exe
37 # NoSource9-md5:        12d2a75f8156e10607be1eaa8e8ef120
38 Source10:       http://dl.sourceforge.net/corefonts/webdin32.exe
39 # NoSource10-md5:       230a1d13a365b22815f502eb24d9149b
40 %else
41 Source0:        license-installer.sh
42 # extracted from one of the above
43 Source20:       Microsoft-EULA.txt
44 %endif
45 URL:            http://corefonts.sourceforge.net/
46 %if %{with license_agreement}
47 BuildRequires:  cabextract
48 Requires:       %{_fontsdir}/TTF
49 Requires(post,postun):  fontpostinst
50 %else
51 Requires:       cabextract
52 Requires:       rpm-build-tools
53 Requires:       wget
54 %endif
55 BuildArch:      noarch
56 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
57
58 %define         ttffontsdir     %{_fontsdir}/TTF
59
60 %description
61 Microsoft free True Type fonts collection.
62 %if %{without license_agreement}
63 License issues made us not to include inherent files into this package
64 by default. If you want to create full working package please build it
65 with one of the following command:
66
67 %{base_name}.install --with license_agreement %{_datadir}/%{base_name}/%{base_name}.spec
68 %endif
69
70 %description -l pl
71 Kolekcja darmowych fontów True Type firmy Microsoft.
72 %if %{without license_agreement}
73 Kwestie licencji zmusi³y nas do niedo³±czania do tego pakietu istotnych
74 plików. Je¶li chcesz stworzyæ w pe³ni funkcjonalny pakiet, zbuduj go za
75 pomoc± polecenia:
76
77 %{base_name}.install --with license_agreement %{_datadir}/%{base_name}/%{base_name}.spec
78 %endif
79
80 %prep
81 %if %{with license_agreement}
82 %setup -q -c -T
83 /usr/bin/cabextract -L %{SOURCE0} %{SOURCE1} %{SOURCE2} %{SOURCE3} \
84 %{SOURCE4} %{SOURCE5} %{SOURCE6} %{SOURCE7} %{SOURCE8} %{SOURCE9} \
85 %{SOURCE10}
86 %endif
87
88 %install
89 rm -rf $RPM_BUILD_ROOT
90
91 %if %{without license_agreement}
92 install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}/%{base_name}}
93
94 sed -e '
95         s/@BASE_NAME@/%{base_name}/g
96         s/@TARGET_CPU@/%{_target_cpu}/g
97         s-@VERSION@-%{version}-g
98         s-@RELEASE@-%{release}-g
99         s,@SPECFILE@,%{_datadir}/%{base_name}/%{base_name}.spec,g
100         s,@LICENSE@,%{_datadir}/%{base_name}/Microsoft-EULA.txt,
101 ' %{SOURCE0} > $RPM_BUILD_ROOT%{_bindir}/%{base_name}.install
102
103 install %{_specdir}/%{base_name}.spec $RPM_BUILD_ROOT%{_datadir}/%{base_name}
104 install %{SOURCE20} $RPM_BUILD_ROOT%{_datadir}/%{base_name}
105
106 %else
107 install -d $RPM_BUILD_ROOT%{ttffontsdir}
108 install *.ttf $RPM_BUILD_ROOT%{ttffontsdir}
109 %endif
110
111 %clean
112 rm -rf $RPM_BUILD_ROOT
113
114 %if %{with license_agreement}
115 %post
116 fontpostinst TTF
117
118 %postun
119 fontpostinst TTF
120
121 %else
122 %post
123 echo "
124 If you accept the license enclosed in the file
125 %{_datadir}/%{base_name}/Microsoft-EULA.txt
126 and want to install real fonts, then rebuild the package with the
127 following command:
128
129 %{base_name}.install --with license_agreement %{_datadir}/%{base_name}/%{base_name}.spec
130 "
131 %endif
132
133 %files
134 %defattr(644,root,root,755)
135 %if %{with license_agreement}
136 %doc licen.txt
137 %{ttffontsdir}/*
138 %else
139 %attr(755,root,root) %{_bindir}/%{base_name}.install
140 %{_datadir}/%{base_name}
141 %endif
This page took 0.126217 seconds and 4 git commands to generate.