]> git.pld-linux.org Git - packages/fonts-TTF-Bitstream-Cyberfonts.git/blob - fonts-TTF-Bitstream-Cyberfonts.spec
- remove unneeded Nosource's, stbring
[packages/fonts-TTF-Bitstream-Cyberfonts.git] / fonts-TTF-Bitstream-Cyberfonts.spec
1 #
2 # Conditional build:
3 %bcond_with     license_agreement
4 # _with_license_agreement       - generates package (may require Windows license?)
5 #
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}
10 Name:           %{base_name}
11 %else
12 Name:           %{base_name}-installer
13 %endif
14 Version:        1.0
15 Release:        1%{?with_license_agreement:wla}
16 License:        Nondistributable but free (See Bitstream-Cyberfonts-licence.txt)
17 Group:          Fonts
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
27 BuildRequires:  unzip
28 Requires:       %{_fontsdir}/TTF
29 Requires(post,postun):  fontpostinst
30 %else
31 Requires:       unzip
32 Requires:       rpm-build-tools
33 Requires:       wget
34 %endif
35 Obsoletes:      fonts-TTF-Bitstream-Cyberfonts
36 BuildArch:      noarch
37 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38
39 %define         ttffontsdir     %{_fontsdir}/TTF
40
41 %description
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
47 command:
48
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
51 %endif
52
53 %description -l pl
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:
59
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
62 %endif
63
64 %prep
65 %if %{with license_agreement}
66 %setup -q -c -T
67 /usr/bin/unzip -L %{SOURCE0}
68 /usr/bin/unzip -L %{SOURCE1}
69 /usr/bin/unzip -L %{SOURCE2}
70 install %{SOURCE3} ./
71 %endif
72
73 %install
74 rm -rf $RPM_BUILD_ROOT
75 %if ! %{with license_agreement}
76 install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}/%{base_name}}
77
78 cat <<EOF >$RPM_BUILD_ROOT%{_bindir}/%{base_name}.install
79 #!/bin/sh
80 if [ "\$1" = "--with" -a "\$2" = "license_agreement" ]
81 then
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
88         BACKUP_SPEC=0
89         mkdir -p \$TMPDIR \$SPECDIR \$SRPMDIR \$RPMDIR \$SRPMDIR \$SOURCEDIR \$BUILDDIR
90         if [ -f \$SPECDIR/%{base_name}.spec ]; then
91                 BACKUP_SPEC=1
92                 mv -f \$SPECDIR/%{base_name}.spec \$SPECDIR/%{base_name}.spec.prev
93         fi
94         if echo "\$3" | grep '\.src\.rpm$' >/dev/null; then
95                 ( cd \$SRPMDIR
96                 if echo "\$3" | grep '://' >/dev/null; then
97                         wget --passive-ftp -t0 "\$3"
98                 else
99                         cp -f "\$3" .
100                 fi
101                 rpm2cpio \`basename "\$3"\` | ( cd \$TMPDIR; cpio -i %{base_name}.spec ) )
102                 if ! cp -i \$TMPDIR/%{base_name}.spec \$SPECDIR/%{base_name}.spec; then
103                         exit 1
104                 fi
105         else
106                 if ! cp -i "\$3" \$SPECDIR; then
107                         exit 1
108                 fi
109         fi
110         ( cd \$SPECDIR
111         %{_bindir}/builder -nc -ncs --with license_agreement --opts --target=%{_target_cpu} %{base_name}.spec
112         if [ "\$?" -ne 0 ]; then
113                 exit 2
114         fi
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
120         fi
121 else
122         cat %{_datadir}/%{base_name}/Microsot-EULA.txt
123         echo "
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:
127
128 \$0 --with license_agreement %{_datadir}/%{base_name}/%{base_name}.spec
129 "
130 fi
131 EOF
132
133 install %{_specdir}/%{base_name}.spec $RPM_BUILD_ROOT%{_datadir}/%{base_name}
134 %else
135 install -d $RPM_BUILD_ROOT%{ttffontsdir}
136 install *.ttf $RPM_BUILD_ROOT%{ttffontsdir}
137 %endif
138 install -d $RPM_BUILD_ROOT%{_datadir}/%{base_name}
139 install %{SOURCE3} $RPM_BUILD_ROOT%{_datadir}/%{base_name}/Bitstream-Cyberfonts-licence.txt
140
141 %clean
142 rm -rf $RPM_BUILD_ROOT
143
144 %if %{with license_agreement}
145 %post
146 fontpostinst TTF
147
148 %postun
149 fontpostinst TTF
150
151 %else
152 %pre
153 echo "
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
157 following command:
158
159 %{base_name}.install --with license_agreement %{_datadir}/%{base_name}/%{base_name}.spec
160 "
161 %endif
162
163 %files
164 %defattr(644,root,root,755)
165 %if %{with license_agreement}
166 %{ttffontsdir}/*
167 %else
168 %attr(755,root,root) %{_bindir}/%{base_name}.install
169 %endif
170 %{_datadir}/%{base_name}
This page took 0.036282 seconds and 4 git commands to generate.