3 %bcond_with license_agreement
4 # _with_license_agreement - generates package (may require Windows license?)
6 Summary: Bitstream Cyberfonts True Type font
7 Summary(pl): Font True Type Cyberfonts firmy Bitstream
8 %define base_name fonts-TTF-Bitstream-Cyberfonts
9 %if %{with license_agreement}
12 Name: %{base_name}-installer
15 Release: 1%{?with_license_agreement:wla}
16 License: Nondistributable but free (See Bitstream-Cyberfonts-licence.txt)
18 %if %{with license_agreement}
19 # also at http://dl.sourceforge.net/corefonts/
20 Source0: ftp://ftp.netscape.com/pub/communicator/extras/fonts/windows/Cyberbit.ZIP
21 # NoSource0-md5: 63a6f607ac5a78d34b67247b893faf5b
22 Source1: ftp://ftp.netscape.com/pub/communicator/extras/fonts/windows/Cyberbase.ZIP
23 # NoSource1-md5: 63a6f607ac5a78d34b67247b893faf5b
24 Source2: ftp://ftp.netscape.com/pub/communicator/extras/fonts/windows/CyberCJK.ZIP
25 # NoSource2-md5: 63a6f607ac5a78d34b67247b893faf5b
26 Source3: %{base_name}-licence.txt
28 Requires: %{_fontsdir}/TTF
29 Requires(post,postun): fontpostinst
32 Requires: rpm-build-tools
35 Obsoletes: fonts-TTF-Bitstream-Cyberfonts
37 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39 %define ttffontsdir %{_fontsdir}/TTF
42 Bitstream Cyberfonts True Type font.
43 %if ! %{with license_agreement}
44 License issues made us not to include inherent files into this package
45 by default. If you want to
46 create full working package please build it with one of the following
49 %{base_name}.install --with license_agreement %{_datadir}/%{base_name}/%{base_name}.spec
50 %{base_name}.install --with license_agreement ftp://ftp.pld-linux.org/dists/ac/PLD/<your_arch>/PLD/RPMS/%{base_name}-{version}-{release}.src.rpm
54 Font True Type Cyberfonts firmy Bitstream.
55 %if ! %{with license_agreement}
56 Kwestie licencji zmusi³y nas do niedo³±czania do tego pakietu istotnych
57 plików. Je¶li chcesz stworzyæ
58 w pe³ni funkcjonalny pakiet, zbuduj go za pomoc± polecenia:
60 %{base_name}.install --with license_agreement %{_datadir}/%{base_name}/%{base_name}.spec
61 %{base_name}.install --with license_agreement ftp://ftp.pld-linux.org/dists/ac/PLD/<your_arch>/PLD/RPMS/%{base_name}-{version}-{release}.src.rpm
65 %if %{with license_agreement}
67 /usr/bin/unzip -L %{SOURCE0}
68 /usr/bin/unzip -L %{SOURCE1}
69 /usr/bin/unzip -L %{SOURCE2}
74 rm -rf $RPM_BUILD_ROOT
75 %if ! %{with license_agreement}
76 install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}/%{base_name}}
78 cat <<EOF >$RPM_BUILD_ROOT%{_bindir}/%{base_name}.install
80 if [ "\$1" = "--with" -a "\$2" = "license_agreement" ]
82 TMPDIR=\`rpm --eval "%%{tmpdir}"\`; export TMPDIR
83 SPECDIR=\`rpm --eval "%%{_specdir}"\`; export SPECDIR
84 SRPMDIR=\`rpm --eval "%%{_srcrpmdir}"\`; export SRPMDIR
85 SOURCEDIR=\`rpm --eval "%%{_sourcedir}"\`; export SOURCEDIR
86 BUILDDIR=\`rpm --eval "%%{_builddir}"\`; export BUILDDIR
87 RPMDIR=\`rpm --eval "%%{_rpmdir}"\`; export RPMDIR
89 mkdir -p \$TMPDIR \$SPECDIR \$SRPMDIR \$RPMDIR \$SRPMDIR \$SOURCEDIR \$BUILDDIR
90 if [ -f \$SPECDIR/%{base_name}.spec ]; then
92 mv -f \$SPECDIR/%{base_name}.spec \$SPECDIR/%{base_name}.spec.prev
94 if echo "\$3" | grep '\.src\.rpm$' >/dev/null; then
96 if echo "\$3" | grep '://' >/dev/null; then
97 wget --passive-ftp -t0 "\$3"
101 rpm2cpio \`basename "\$3"\` | ( cd \$TMPDIR; cpio -i %{base_name}.spec ) )
102 if ! cp -i \$TMPDIR/%{base_name}.spec \$SPECDIR/%{base_name}.spec; then
106 if ! cp -i "\$3" \$SPECDIR; then
111 %{_bindir}/builder -nc -ncs --with license_agreement --opts --target=%{_target_cpu} %{base_name}.spec
112 if [ "\$?" -ne 0 ]; then
115 RPMNAME=%{base_name}-%{version}-%{release}wla.noarch.rpm
116 rpm -U \$RPMDIR/\$RPMNAME || \
117 echo -e Install manually the file:\\\n \$RPMDIR/\$RPMNAME )
118 if [ "\$BACKUP_SPEC" -eq 1 ]; then
119 mv -f \$SPECDIR/%{base_name}.spec.prev \$SPECDIR/%{base_name}.spec
122 cat %{_datadir}/%{base_name}/Microsot-EULA.txt
124 License issues made us not to include inherent files into this package
125 by default. If you want to
126 create full working package please build it with the following command:
128 \$0 --with license_agreement %{_datadir}/%{base_name}/%{base_name}.spec
133 install %{_specdir}/%{base_name}.spec $RPM_BUILD_ROOT%{_datadir}/%{base_name}
135 install -d $RPM_BUILD_ROOT%{ttffontsdir}
136 install *.ttf $RPM_BUILD_ROOT%{ttffontsdir}
138 install -d $RPM_BUILD_ROOT%{_datadir}/%{base_name}
139 install %{SOURCE3} $RPM_BUILD_ROOT%{_datadir}/%{base_name}/Bitstream-Cyberfonts-licence.txt
142 rm -rf $RPM_BUILD_ROOT
144 %if %{with license_agreement}
154 If you accept the license enclosed in the file
155 %{_datadir}/%{base_name}/Bitstream-Cyberfonts-licence.txt
156 and want to install real fonts, then rebuild the package with the
159 %{base_name}.install --with license_agreement %{_datadir}/%{base_name}/%{base_name}.spec
164 %defattr(644,root,root,755)
165 %if %{with license_agreement}
168 %attr(755,root,root) %{_bindir}/%{base_name}.install
170 %{_datadir}/%{base_name}