3 %bcond_with license_agreement # generates package
5 Summary: Bitstream Cyberfonts True Type font
6 Summary(pl): Font True Type Cyberfonts firmy Bitstream
7 %define base_name fonts-TTF-Bitstream-Cyberfonts
8 %if %{with license_agreement}
11 Name: %{base_name}-installer
14 Release: 1%{?with_license_agreement:wla}
15 License: Nondistributable but free (See Bitstream-Cyberfonts-licence.txt)
17 %if %{with license_agreement}
18 # also at http://dl.sourceforge.net/corefonts/
19 Source0: ftp://ftp.netscape.com/pub/communicator/extras/fonts/windows/Cyberbit.ZIP
20 # NoSource0-md5: 63a6f607ac5a78d34b67247b893faf5b
21 Source1: ftp://ftp.netscape.com/pub/communicator/extras/fonts/windows/Cyberbase.ZIP
22 # NoSource1-md5: 63a6f607ac5a78d34b67247b893faf5b
23 Source2: ftp://ftp.netscape.com/pub/communicator/extras/fonts/windows/CyberCJK.ZIP
24 # NoSource2-md5: 63a6f607ac5a78d34b67247b893faf5b
25 Source3: %{base_name}-licence.txt
27 Requires: %{_fontsdir}/TTF
28 Requires(post,postun): fontpostinst
31 Requires: rpm-build-tools
34 Obsoletes: fonts-TTF-Bitstream-Cyberfonts
36 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38 %define ttffontsdir %{_fontsdir}/TTF
41 Bitstream Cyberfonts True Type font.
42 %if ! %{with license_agreement}
43 License issues made us not to include inherent files into this package
44 by default. If you want to
45 create full working package please build it with one of the following
48 %{base_name}.install --with license_agreement %{_datadir}/%{base_name}/%{base_name}.spec
49 %{base_name}.install --with license_agreement ftp://ftp.pld-linux.org/dists/ac/PLD/<your_arch>/PLD/RPMS/%{base_name}-{version}-{release}.src.rpm
53 Font True Type Cyberfonts firmy Bitstream.
54 %if ! %{with license_agreement}
55 Kwestie licencji zmusi³y nas do niedo³±czania do tego pakietu istotnych
56 plików. Je¶li chcesz stworzyæ
57 w pe³ni funkcjonalny pakiet, zbuduj go za pomoc± polecenia:
59 %{base_name}.install --with license_agreement %{_datadir}/%{base_name}/%{base_name}.spec
60 %{base_name}.install --with license_agreement ftp://ftp.pld-linux.org/dists/ac/PLD/<your_arch>/PLD/RPMS/%{base_name}-{version}-{release}.src.rpm
64 %if %{with license_agreement}
66 /usr/bin/unzip -L %{SOURCE0}
67 /usr/bin/unzip -L %{SOURCE1}
68 /usr/bin/unzip -L %{SOURCE2}
73 rm -rf $RPM_BUILD_ROOT
74 %if ! %{with license_agreement}
75 install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}/%{base_name}}
77 cat <<EOF >$RPM_BUILD_ROOT%{_bindir}/%{base_name}.install
79 if [ "\$1" = "--with" -a "\$2" = "license_agreement" ]
81 TMPDIR=\`rpm --eval "%%{tmpdir}"\`; export TMPDIR
82 SPECDIR=\`rpm --eval "%%{_specdir}"\`; export SPECDIR
83 SRPMDIR=\`rpm --eval "%%{_srcrpmdir}"\`; export SRPMDIR
84 SOURCEDIR=\`rpm --eval "%%{_sourcedir}"\`; export SOURCEDIR
85 BUILDDIR=\`rpm --eval "%%{_builddir}"\`; export BUILDDIR
86 RPMDIR=\`rpm --eval "%%{_rpmdir}"\`; export RPMDIR
88 mkdir -p \$TMPDIR \$SPECDIR \$SRPMDIR \$RPMDIR \$SRPMDIR \$SOURCEDIR \$BUILDDIR
89 if [ -f \$SPECDIR/%{base_name}.spec ]; then
91 mv -f \$SPECDIR/%{base_name}.spec \$SPECDIR/%{base_name}.spec.prev
93 if echo "\$3" | grep '\.src\.rpm$' >/dev/null; then
95 if echo "\$3" | grep '://' >/dev/null; then
96 wget --passive-ftp -t0 "\$3"
100 rpm2cpio \`basename "\$3"\` | ( cd \$TMPDIR; cpio -i %{base_name}.spec ) )
101 if ! cp -i \$TMPDIR/%{base_name}.spec \$SPECDIR/%{base_name}.spec; then
105 if ! cp -i "\$3" \$SPECDIR; then
110 %{_bindir}/builder -nc -ncs --with license_agreement --opts --target=%{_target_cpu} %{base_name}.spec
111 if [ "\$?" -ne 0 ]; then
114 RPMNAME=%{base_name}-%{version}-%{release}wla.noarch.rpm
115 rpm -U \$RPMDIR/\$RPMNAME || \
116 echo -e Install manually the file:\\\n \$RPMDIR/\$RPMNAME )
117 if [ "\$BACKUP_SPEC" -eq 1 ]; then
118 mv -f \$SPECDIR/%{base_name}.spec.prev \$SPECDIR/%{base_name}.spec
121 cat %{_datadir}/%{base_name}/Microsot-EULA.txt
123 License issues made us not to include inherent files into this package
124 by default. If you want to
125 create full working package please build it with the following command:
127 \$0 --with license_agreement %{_datadir}/%{base_name}/%{base_name}.spec
132 install %{_specdir}/%{base_name}.spec $RPM_BUILD_ROOT%{_datadir}/%{base_name}
134 install -d $RPM_BUILD_ROOT%{ttffontsdir}
135 install *.ttf $RPM_BUILD_ROOT%{ttffontsdir}
137 install -d $RPM_BUILD_ROOT%{_datadir}/%{base_name}
138 install %{SOURCE3} $RPM_BUILD_ROOT%{_datadir}/%{base_name}/Bitstream-Cyberfonts-licence.txt
141 rm -rf $RPM_BUILD_ROOT
143 %if %{with license_agreement}
153 If you accept the license enclosed in the file
154 %{_datadir}/%{base_name}/Bitstream-Cyberfonts-licence.txt
155 and want to install real fonts, then rebuild the package with the
158 %{base_name}.install --with license_agreement %{_datadir}/%{base_name}/%{base_name}.spec
163 %defattr(644,root,root,755)
164 %if %{with license_agreement}
167 %attr(755,root,root) %{_bindir}/%{base_name}.install
169 %{_datadir}/%{base_name}