]> git.pld-linux.org Git - packages/fonts-TTF-Bitstream-Cyberfonts.git/blob - fonts-TTF-Bitstream-Cyberfonts.spec
8bb0ad04042d830cd078d088af3e1f0177d9c8d7
[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.UTF-8):   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:        2%{?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 BuildRequires:  unzip
26 # we need the -installer package as otherwise can't make end-user
27 # package to work. see also comments in %%prep section.
28 BuildRequires:  %{base_name}-installer
29 Requires:       %{_fontsdir}/TTF
30 Requires(post,postun):  fontpostinst
31 %else
32 Source0:        license-installer.sh
33 Source1:        %{base_name}-licence.txt
34 Requires:       unzip
35 Requires:       rpm-build-tools
36 Requires:       wget
37 %endif
38 BuildArch:      noarch
39 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
40
41 %define         ttffontsdir     %{_fontsdir}/TTF
42
43 %description
44 Bitstream Cyberfonts True Type font.
45 %if !%{with license_agreement}
46 License issues made us not to include inherent files into this package
47 by default. If you want to
48 create full working package please build it with one of the following
49 command:
50
51 %{base_name}.install --with license_agreement %{_datadir}/%{base_name}/%{base_name}.spec
52 %endif
53
54 %description -l pl.UTF-8
55 Font True Type Cyberfonts firmy Bitstream.
56 %if !%{with license_agreement}
57 Kwestie licencji zmusiły nas do niedołączania do tego pakietu istotnych
58 plików. Jeśli chcesz stworzyć
59 w pełni funkcjonalny pakiet, zbuduj go za pomocą polecenia:
60
61 %{base_name}.install --with license_agreement %{_datadir}/%{base_name}/%{base_name}.spec
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 # ugly hack, to work with -installer package, when it may not fetch this file
71 # from CVS with builder (-nc, -ncs)
72 install %{_datadir}/%{base_name}/Bitstream-Cyberfonts-licence.txt .
73 %endif
74
75 %install
76 rm -rf $RPM_BUILD_ROOT
77 %if !%{with license_agreement}
78 install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}/%{base_name}}
79
80 sed -e '
81         s/@BASE_NAME@/%{base_name}/g
82         s/@TARGET_CPU@/%{_target_cpu}/g
83         s-@VERSION@-%{version}-g
84         s-@RELEASE@-%{release}-g
85         s,@SPECFILE@,%{_datadir}/%{base_name}/%{base_name}.spec,g
86         s,@LICENSE@,%{_datadir}/%{base_name}/Bitstream-Cyberfonts-licence.txt,
87 ' %{SOURCE0} > $RPM_BUILD_ROOT%{_bindir}/%{base_name}.install
88
89 install %{_specdir}/%{base_name}.spec $RPM_BUILD_ROOT%{_datadir}/%{base_name}
90 install %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/%{base_name}/Bitstream-Cyberfonts-licence.txt
91 %else
92 install -d $RPM_BUILD_ROOT%{ttffontsdir}
93 install *.ttf $RPM_BUILD_ROOT%{ttffontsdir}
94 %endif
95
96 %clean
97 rm -rf $RPM_BUILD_ROOT
98
99 %if %{with license_agreement}
100 %post
101 fontpostinst TTF
102
103 %postun
104 fontpostinst TTF
105
106 %else
107 %post
108 echo "
109 If you accept the license enclosed in the file
110 %{_datadir}/%{base_name}/Bitstream-Cyberfonts-licence.txt
111 and want to install real fonts, then rebuild the package with the
112 following command:
113
114 %{base_name}.install --with license_agreement %{_datadir}/%{base_name}/%{base_name}.spec
115 "
116 %endif
117
118 %files
119 %defattr(644,root,root,755)
120 %if %{with license_agreement}
121 %doc Bitstream-Cyberfonts-licence.txt
122 %{ttffontsdir}/*
123 %else
124 %attr(755,root,root) %{_bindir}/%{base_name}.install
125 %{_datadir}/%{base_name}
126 %endif
This page took 0.048908 seconds and 2 git commands to generate.