3 %bcond_with license_agreement
4 # _with_license_agreement - generates package (may require Windows license?)
6 Summary: Microsoft Arial Unicode True Type font
7 Summary(pl): Font True Type Arial Unicode firmy Microsoft
8 %define base_name fonts-TTF-Microsoft-ArialUnicode
9 %if %{with license_agreement}
12 Name: %{base_name}-installer
15 Release: 1%{?with_license_agreement:wla}
16 # part of MS Office - may require Office license to use
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
24 Requires: %{_fontsdir}/TTF
25 Requires(post,postun): fontpostinst
28 Requires: rpm-build-tools
32 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34 %define ttffontsdir %{_fontsdir}/TTF
37 Microsoft Arial Unicode True Type font.
38 %if ! %{with license_agreement}
39 License issues made us not to include inherent files into this package
40 by default (it probably requires MS Office license). If you want to
41 create full working package please build it with one of the following
44 %{base_name}.install --with license_agreement %{_datadir}/%{base_name}/%{base_name}.spec
45 %{base_name}.install --with license_agreement ftp://ftp.pld-linux.org/dists/ac/PLD/<your_arch>/PLD/RPMS/%{base_name}-{version}-{release}.src.rpm
49 Font True Type Arial Unicode firmy Microsoft.
50 %if ! %{with license_agreement}
51 Kwestie licencji zmusi³y nas do niedo³±czania do tego pakietu istotnych
52 plików (prawdopodobnie wymaga licencji na MS Office). Je¶li chcesz stworzyæ
53 w pe³ni funkcjonalny pakiet, zbuduj go za pomoc± polecenia:
55 %{base_name}.install --with license_agreement %{_datadir}/%{base_name}/%{base_name}.spec
56 %{base_name}.install --with license_agreement ftp://ftp.pld-linux.org/dists/ac/PLD/<your_arch>/PLD/RPMS/%{base_name}-{version}-{release}.src.rpm
60 %if %{with license_agreement}
62 /usr/bin/cabextract -L %{SOURCE0}
66 rm -rf $RPM_BUILD_ROOT
67 %if ! %{with license_agreement}
68 install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}/%{base_name}}
70 cat <<EOF >$RPM_BUILD_ROOT%{_bindir}/%{base_name}.install
72 if [ "\$1" = "--with" -a "\$2" = "license_agreement" ]
74 TMPDIR=\`rpm --eval "%%{tmpdir}"\`; export TMPDIR
75 SPECDIR=\`rpm --eval "%%{_specdir}"\`; export SPECDIR
76 SRPMDIR=\`rpm --eval "%%{_srcrpmdir}"\`; export SRPMDIR
77 SOURCEDIR=\`rpm --eval "%%{_sourcedir}"\`; export SOURCEDIR
78 BUILDDIR=\`rpm --eval "%%{_builddir}"\`; export BUILDDIR
79 RPMDIR=\`rpm --eval "%%{_rpmdir}"\`; export RPMDIR
81 mkdir -p \$TMPDIR \$SPECDIR \$SRPMDIR \$RPMDIR \$SRPMDIR \$SOURCEDIR \$BUILDDIR
82 if [ -f \$SPECDIR/%{base_name}.spec ]; then
84 mv -f \$SPECDIR/%{base_name}.spec \$SPECDIR/%{base_name}.spec.prev
86 if echo "\$3" | grep '\.src\.rpm$' >/dev/null; then
88 if echo "\$3" | grep '://' >/dev/null; then
89 wget --passive-ftp -t0 "\$3"
93 rpm2cpio \`basename "\$3"\` | ( cd \$TMPDIR; cpio -i %{base_name}.spec ) )
94 if ! cp -i \$TMPDIR/%{base_name}.spec \$SPECDIR/%{base_name}.spec; then
98 if ! cp -i "\$3" \$SPECDIR; then
103 %{_bindir}/builder -nc -ncs --with license_agreement --opts --target=%{_target_cpu} %{base_name}.spec
104 if [ "\$?" -ne 0 ]; then
107 RPMNAME=%{base_name}-%{version}-%{release}wla.noarch.rpm
108 rpm -U \$RPMDIR/\$RPMNAME || \
109 echo -e Install manually the file:\\\n \$RPMDIR/\$RPMNAME )
110 if [ "\$BACKUP_SPEC" -eq 1 ]; then
111 mv -f \$SPECDIR/%{base_name}.spec.prev \$SPECDIR/%{base_name}.spec
114 cat %{_datadir}/%{base_name}/Microsot-EULA.txt
116 License issues made us not to include inherent files into this package
117 by default (it probably requires Windows license). If you want to
118 create full working package please build it with the following command:
120 \$0 --with license_agreement %{_datadir}/%{base_name}/%{base_name}.spec
125 install %{_specdir}/%{base_name}.spec $RPM_BUILD_ROOT%{_datadir}/%{base_name}
128 install -d $RPM_BUILD_ROOT%{ttffontsdir}
129 install *.ttf $RPM_BUILD_ROOT%{ttffontsdir}
133 rm -rf $RPM_BUILD_ROOT
135 %if %{with license_agreement}
145 License issues made us not to include inherent files into this package
146 by default (it probably requires Windows license). If you want to
147 create full working package please build it with the following command:
149 %{base_name}.install --with license_agreement %{_datadir}/%{base_name}/%{base_name}.spec
154 %defattr(644,root,root,755)
155 %if %{with license_agreement}
158 %attr(755,root,root) %{_bindir}/%{base_name}.install
159 %{_datadir}/%{base_name}