]>
Commit | Line | Data |
---|---|---|
2b96597e | 1 | # |
2 | # Conditional build: | |
f167731c | 3 | %bcond_with license_agreement # generates package |
2b96597e | 4 | # |
ddd8f72b JB |
5 | Summary: Bitstream Cyberfonts TrueType font |
6 | Summary(pl.UTF-8): Font TrueType Cyberfonts firmy Bitstream | |
2b96597e | 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 | |
6e59303e | 14 | Release: 3%{?with_license_agreement:wla} |
2b96597e | 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 | |
2b96597e | 25 | BuildRequires: unzip |
044f7b09 ER |
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 | |
2b96597e | 29 | Requires: %{_fontsdir}/TTF |
30 | Requires(post,postun): fontpostinst | |
31 | %else | |
06c9787d | 32 | Source0: http://svn.pld-linux.org/svn/license-installer/license-installer.sh |
6e59303e | 33 | # NoSource0-md5: 329c25f457fea66ec502b7ef70cb9ede |
044f7b09 | 34 | Source1: %{base_name}-licence.txt |
2b96597e | 35 | Requires: unzip |
6e59303e | 36 | Requires: rpm-build-macros >= 1.544 |
37 | Requires: rpm-build-tools >= 4.4.37 | |
2b96597e | 38 | %endif |
2b96597e | 39 | BuildArch: noarch |
40 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
41 | ||
42 | %define ttffontsdir %{_fontsdir}/TTF | |
43 | ||
44 | %description | |
ddd8f72b | 45 | Bitstream Cyberfonts TrueType font. |
69729c55 | 46 | %if !%{with license_agreement} |
2b96597e | 47 | License issues made us not to include inherent files into this package |
48 | by default. If you want to | |
49 | create full working package please build it with one of the following | |
50 | command: | |
51 | ||
52 | %{base_name}.install --with license_agreement %{_datadir}/%{base_name}/%{base_name}.spec | |
2b96597e | 53 | %endif |
54 | ||
aca5b462 | 55 | %description -l pl.UTF-8 |
ddd8f72b | 56 | Font TrueType Cyberfonts firmy Bitstream. |
69729c55 | 57 | %if !%{with license_agreement} |
aca5b462 JR |
58 | Kwestie licencji zmusiły nas do niedołączania do tego pakietu istotnych |
59 | plików. Jeśli chcesz stworzyć | |
60 | w pełni funkcjonalny pakiet, zbuduj go za pomocą polecenia: | |
2b96597e | 61 | |
62 | %{base_name}.install --with license_agreement %{_datadir}/%{base_name}/%{base_name}.spec | |
2b96597e | 63 | %endif |
64 | ||
65 | %prep | |
66 | %if %{with license_agreement} | |
67 | %setup -q -c -T | |
68 | /usr/bin/unzip -L %{SOURCE0} | |
69 | /usr/bin/unzip -L %{SOURCE1} | |
70 | /usr/bin/unzip -L %{SOURCE2} | |
044f7b09 ER |
71 | # ugly hack, to work with -installer package, when it may not fetch this file |
72 | # from CVS with builder (-nc, -ncs) | |
73 | install %{_datadir}/%{base_name}/Bitstream-Cyberfonts-licence.txt . | |
2b96597e | 74 | %endif |
75 | ||
76 | %install | |
77 | rm -rf $RPM_BUILD_ROOT | |
69729c55 | 78 | %if !%{with license_agreement} |
2b96597e | 79 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}/%{base_name}} |
80 | ||
044f7b09 ER |
81 | sed -e ' |
82 | s/@BASE_NAME@/%{base_name}/g | |
83 | s/@TARGET_CPU@/%{_target_cpu}/g | |
84 | s-@VERSION@-%{version}-g | |
85 | s-@RELEASE@-%{release}-g | |
86 | s,@SPECFILE@,%{_datadir}/%{base_name}/%{base_name}.spec,g | |
87 | s,@LICENSE@,%{_datadir}/%{base_name}/Bitstream-Cyberfonts-licence.txt, | |
06c9787d | 88 | s,@DATADIR@,%{_datadir}/%{base_name},g |
044f7b09 | 89 | ' %{SOURCE0} > $RPM_BUILD_ROOT%{_bindir}/%{base_name}.install |
2b96597e | 90 | |
91 | install %{_specdir}/%{base_name}.spec $RPM_BUILD_ROOT%{_datadir}/%{base_name} | |
044f7b09 | 92 | install %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/%{base_name}/Bitstream-Cyberfonts-licence.txt |
2b96597e | 93 | %else |
94 | install -d $RPM_BUILD_ROOT%{ttffontsdir} | |
95 | install *.ttf $RPM_BUILD_ROOT%{ttffontsdir} | |
96 | %endif | |
2b96597e | 97 | |
98 | %clean | |
99 | rm -rf $RPM_BUILD_ROOT | |
100 | ||
101 | %if %{with license_agreement} | |
102 | %post | |
103 | fontpostinst TTF | |
104 | ||
105 | %postun | |
106 | fontpostinst TTF | |
107 | ||
108 | %else | |
3f4eb4ad | 109 | %post |
2b96597e | 110 | echo " |
111 | If you accept the license enclosed in the file | |
112 | %{_datadir}/%{base_name}/Bitstream-Cyberfonts-licence.txt | |
113 | and want to install real fonts, then rebuild the package with the | |
114 | following command: | |
115 | ||
116 | %{base_name}.install --with license_agreement %{_datadir}/%{base_name}/%{base_name}.spec | |
117 | " | |
118 | %endif | |
119 | ||
120 | %files | |
121 | %defattr(644,root,root,755) | |
122 | %if %{with license_agreement} | |
044f7b09 | 123 | %doc Bitstream-Cyberfonts-licence.txt |
2b96597e | 124 | %{ttffontsdir}/* |
125 | %else | |
126 | %attr(755,root,root) %{_bindir}/%{base_name}.install | |
2b96597e | 127 | %{_datadir}/%{base_name} |
044f7b09 | 128 | %endif |