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