]>
Commit | Line | Data |
---|---|---|
f2dd53b0 | 1 | # |
2 | # Conditional build: | |
d9fe5f79 | 3 | %bcond_with license_agreement # generates package (may require MS Office license?) |
f2dd53b0 | 4 | # |
1e7b57a9 | 5 | %define base_name fonts-TTF-Microsoft-ArialUnicode |
6 | %define rel 3 | |
c2e26013 JB |
7 | Summary: Microsoft Arial Unicode TrueType font |
8 | Summary(pl.UTF-8): Font TrueType Arial Unicode firmy Microsoft | |
f2dd53b0 | 9 | %if %{with license_agreement} |
10 | Name: %{base_name} | |
11 | %else | |
12 | Name: %{base_name}-installer | |
13 | %endif | |
14 | Version: 1.0 | |
1e7b57a9 | 15 | Release: %{rel}%{?with_license_agreement:wla} |
f2dd53b0 | 16 | # part of MS Office - may require Office license to use |
17 | License: ? | |
18 | Group: Fonts | |
19 | %if %{with license_agreement} | |
20 | # also at http://dl.sourceforge.net/corefonts/ | |
21 | Source0: http://orwell.ru/download/aruniupd.exe | |
22 | # NoSource0-md5: 1bef548eb449a0b24ad1c0b8e9d5f2ba | |
23 | BuildRequires: cabextract | |
f2dd53b0 | 24 | Requires(post,postun): fontpostinst |
43679cf4 | 25 | Requires: %{_fontsdir}/TTF |
f2dd53b0 | 26 | %else |
748ca643 | 27 | Source0: http://svn.pld-linux.org/svn/license-installer/license-installer.sh |
7fcf08c1 | 28 | # Source0-md5: 329c25f457fea66ec502b7ef70cb9ede |
f2dd53b0 | 29 | Requires: cabextract |
7fcf08c1 | 30 | Requires: rpm-build-tools >= 4.4.37 |
43679cf4 | 31 | Requires: rpmbuild(macros) >= 1.544 |
f2dd53b0 | 32 | %endif |
33 | BuildArch: noarch | |
34 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
35 | ||
36 | %define ttffontsdir %{_fontsdir}/TTF | |
37 | ||
38 | %description | |
c2e26013 | 39 | Microsoft Arial Unicode TrueType font. |
5b7ab2ca | 40 | %if !%{with license_agreement} |
f2dd53b0 | 41 | License issues made us not to include inherent files into this package |
14f93690 | 42 | by default (it probably requires MS Office license). If you want to |
f2dd53b0 | 43 | create full working package please build it with one of the following |
44 | command: | |
45 | ||
46 | %{base_name}.install --with license_agreement %{_datadir}/%{base_name}/%{base_name}.spec | |
f2dd53b0 | 47 | %endif |
48 | ||
bcb6f4b5 | 49 | %description -l pl.UTF-8 |
c2e26013 | 50 | Font TrueType Arial Unicode firmy Microsoft. |
5b7ab2ca | 51 | %if !%{with license_agreement} |
bcb6f4b5 JR |
52 | Kwestie licencji zmusiły nas do niedołączania do tego pakietu istotnych |
53 | plików (prawdopodobnie wymaga licencji na MS Office). Jeśli chcesz stworzyć | |
54 | w pełni funkcjonalny pakiet, zbuduj go za pomocą polecenia: | |
f2dd53b0 | 55 | |
56 | %{base_name}.install --with license_agreement %{_datadir}/%{base_name}/%{base_name}.spec | |
f2dd53b0 | 57 | %endif |
58 | ||
59 | %prep | |
60 | %if %{with license_agreement} | |
61 | %setup -q -c -T | |
62 | /usr/bin/cabextract -L %{SOURCE0} | |
63 | %endif | |
64 | ||
65 | %install | |
66 | rm -rf $RPM_BUILD_ROOT | |
5b7ab2ca | 67 | %if !%{with license_agreement} |
f2dd53b0 | 68 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}/%{base_name}} |
69 | ||
f72a06dd ER |
70 | sed -e ' |
71 | s/@BASE_NAME@/%{base_name}/g | |
72 | s/@TARGET_CPU@/%{_target_cpu}/g | |
73 | s-@VERSION@-%{version}-g | |
74 | s-@RELEASE@-%{release}-g | |
75 | s,@SPECFILE@,%{_datadir}/%{base_name}/%{base_name}.spec,g | |
748ca643 | 76 | s,@DATADIR@,%{_datadir}/%{base_name},g |
f72a06dd | 77 | ' %{SOURCE0} > $RPM_BUILD_ROOT%{_bindir}/%{base_name}.install |
f2dd53b0 | 78 | |
79 | install %{_specdir}/%{base_name}.spec $RPM_BUILD_ROOT%{_datadir}/%{base_name} | |
80 | ||
81 | %else | |
82 | install -d $RPM_BUILD_ROOT%{ttffontsdir} | |
83 | install *.ttf $RPM_BUILD_ROOT%{ttffontsdir} | |
84 | %endif | |
85 | ||
86 | %clean | |
87 | rm -rf $RPM_BUILD_ROOT | |
88 | ||
89 | %if %{with license_agreement} | |
90 | %post | |
91 | fontpostinst TTF | |
92 | ||
93 | %postun | |
94 | fontpostinst TTF | |
95 | ||
96 | %else | |
fb8127d0 | 97 | %post |
f2dd53b0 | 98 | echo " |
99 | License issues made us not to include inherent files into this package | |
100 | by default (it probably requires Windows license). If you want to | |
101 | create full working package please build it with the following command: | |
102 | ||
103 | %{base_name}.install --with license_agreement %{_datadir}/%{base_name}/%{base_name}.spec | |
104 | " | |
105 | %endif | |
106 | ||
107 | %files | |
108 | %defattr(644,root,root,755) | |
109 | %if %{with license_agreement} | |
110 | %{ttffontsdir}/* | |
111 | %else | |
112 | %attr(755,root,root) %{_bindir}/%{base_name}.install | |
113 | %{_datadir}/%{base_name} | |
114 | %endif |