]> git.pld-linux.org Git - packages/fonts-TTF-Bitstream-Cyberfonts.git/blob - fonts-TTF-Bitstream-Cyberfonts.spec
- removed superfluous Obsoletes itself
[packages/fonts-TTF-Bitstream-Cyberfonts.git] / fonts-TTF-Bitstream-Cyberfonts.spec
1 #
2 # Conditional build:
3 %bcond_with     license_agreement       # generates package
4 #
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}
9 Name:           %{base_name}
10 %else
11 Name:           %{base_name}-installer
12 %endif
13 Version:        1.0
14 Release:        1%{?with_license_agreement:wla}
15 License:        Nondistributable but free (See Bitstream-Cyberfonts-licence.txt)
16 Group:          Fonts
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
26 BuildRequires:  unzip
27 Requires:       %{_fontsdir}/TTF
28 Requires(post,postun):  fontpostinst
29 %else
30 Requires:       unzip
31 Requires:       rpm-build-tools
32 Requires:       wget
33 %endif
34 BuildArch:      noarch
35 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36
37 %define         ttffontsdir     %{_fontsdir}/TTF
38
39 %description
40 Bitstream Cyberfonts True Type font.
41 %if ! %{with license_agreement}
42 License issues made us not to include inherent files into this package
43 by default. If you want to
44 create full working package please build it with one of the following
45 command:
46
47 %{base_name}.install --with license_agreement %{_datadir}/%{base_name}/%{base_name}.spec
48 %{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 %endif
50
51 %description -l pl
52 Font True Type Cyberfonts firmy Bitstream.
53 %if ! %{with license_agreement}
54 Kwestie licencji zmusi³y nas do niedo³±czania do tego pakietu istotnych
55 plików. Je¶li chcesz stworzyæ
56 w pe³ni funkcjonalny pakiet, zbuduj go za pomoc± polecenia:
57
58 %{base_name}.install --with license_agreement %{_datadir}/%{base_name}/%{base_name}.spec
59 %{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 %endif
61
62 %prep
63 %if %{with license_agreement}
64 %setup -q -c -T
65 /usr/bin/unzip -L %{SOURCE0}
66 /usr/bin/unzip -L %{SOURCE1}
67 /usr/bin/unzip -L %{SOURCE2}
68 install %{SOURCE3} ./
69 %endif
70
71 %install
72 rm -rf $RPM_BUILD_ROOT
73 %if ! %{with license_agreement}
74 install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}/%{base_name}}
75
76 cat <<EOF >$RPM_BUILD_ROOT%{_bindir}/%{base_name}.install
77 #!/bin/sh
78 if [ "\$1" = "--with" -a "\$2" = "license_agreement" ]
79 then
80         TMPDIR=\`rpm --eval "%%{tmpdir}"\`; export TMPDIR
81         SPECDIR=\`rpm --eval "%%{_specdir}"\`; export SPECDIR
82         SRPMDIR=\`rpm --eval "%%{_srcrpmdir}"\`; export SRPMDIR
83         SOURCEDIR=\`rpm --eval "%%{_sourcedir}"\`; export SOURCEDIR
84         BUILDDIR=\`rpm --eval "%%{_builddir}"\`; export BUILDDIR
85         RPMDIR=\`rpm --eval "%%{_rpmdir}"\`; export RPMDIR
86         BACKUP_SPEC=0
87         mkdir -p \$TMPDIR \$SPECDIR \$SRPMDIR \$RPMDIR \$SRPMDIR \$SOURCEDIR \$BUILDDIR
88         if [ -f \$SPECDIR/%{base_name}.spec ]; then
89                 BACKUP_SPEC=1
90                 mv -f \$SPECDIR/%{base_name}.spec \$SPECDIR/%{base_name}.spec.prev
91         fi
92         if echo "\$3" | grep '\.src\.rpm$' >/dev/null; then
93                 ( cd \$SRPMDIR
94                 if echo "\$3" | grep '://' >/dev/null; then
95                         wget --passive-ftp -t0 "\$3"
96                 else
97                         cp -f "\$3" .
98                 fi
99                 rpm2cpio \`basename "\$3"\` | ( cd \$TMPDIR; cpio -i %{base_name}.spec ) )
100                 if ! cp -i \$TMPDIR/%{base_name}.spec \$SPECDIR/%{base_name}.spec; then
101                         exit 1
102                 fi
103         else
104                 if ! cp -i "\$3" \$SPECDIR; then
105                         exit 1
106                 fi
107         fi
108         ( cd \$SPECDIR
109         %{_bindir}/builder -nc -ncs --with license_agreement --opts --target=%{_target_cpu} %{base_name}.spec
110         if [ "\$?" -ne 0 ]; then
111                 exit 2
112         fi
113         RPMNAME=%{base_name}-%{version}-%{release}wla.noarch.rpm
114         rpm -U \$RPMDIR/\$RPMNAME || \
115                 echo -e Install manually the file:\\\n   \$RPMDIR/\$RPMNAME )
116         if [ "\$BACKUP_SPEC" -eq 1 ]; then
117                 mv -f \$SPECDIR/%{base_name}.spec.prev \$SPECDIR/%{base_name}.spec
118         fi
119 else
120         cat %{_datadir}/%{base_name}/Microsot-EULA.txt
121         echo "
122 License issues made us not to include inherent files into this package
123 by default. If you want to
124 create full working package please build it with the following command:
125
126 \$0 --with license_agreement %{_datadir}/%{base_name}/%{base_name}.spec
127 "
128 fi
129 EOF
130
131 install %{_specdir}/%{base_name}.spec $RPM_BUILD_ROOT%{_datadir}/%{base_name}
132 %else
133 install -d $RPM_BUILD_ROOT%{ttffontsdir}
134 install *.ttf $RPM_BUILD_ROOT%{ttffontsdir}
135 %endif
136 install -d $RPM_BUILD_ROOT%{_datadir}/%{base_name}
137 install %{SOURCE3} $RPM_BUILD_ROOT%{_datadir}/%{base_name}/Bitstream-Cyberfonts-licence.txt
138
139 %clean
140 rm -rf $RPM_BUILD_ROOT
141
142 %if %{with license_agreement}
143 %post
144 fontpostinst TTF
145
146 %postun
147 fontpostinst TTF
148
149 %else
150 %pre
151 echo "
152 If you accept the license enclosed in the file
153 %{_datadir}/%{base_name}/Bitstream-Cyberfonts-licence.txt
154 and want to install real fonts, then rebuild the package with the
155 following command:
156
157 %{base_name}.install --with license_agreement %{_datadir}/%{base_name}/%{base_name}.spec
158 "
159 %endif
160
161 %files
162 %defattr(644,root,root,755)
163 %if %{with license_agreement}
164 %{ttffontsdir}/*
165 %else
166 %attr(755,root,root) %{_bindir}/%{base_name}.install
167 %endif
168 %{_datadir}/%{base_name}
This page took 0.170795 seconds and 4 git commands to generate.