]> git.pld-linux.org Git - packages/fonts-TTF-Bitstream-Cyberfonts.git/blob - fonts-TTF-Bitstream-Cyberfonts.spec
- use rpmbuild(macros) virtual, not direct package name
[packages/fonts-TTF-Bitstream-Cyberfonts.git] / fonts-TTF-Bitstream-Cyberfonts.spec
1 #
2 # Conditional build:
3 %bcond_with     license_agreement       # generates package
4 #
5 %define         base_name               fonts-TTF-Bitstream-Cyberfonts
6 %define         rel                     3
7 Summary:        Bitstream Cyberfonts TrueType font
8 Summary(pl.UTF-8):      Font TrueType Cyberfonts firmy Bitstream
9 %if %{with license_agreement}
10 Name:           %{base_name}
11 %else
12 Name:           %{base_name}-installer
13 %endif
14 Version:        1.0
15 Release:        %{rel}%{?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 BuildRequires:  unzip
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
30 Requires(post,postun):  fontpostinst
31 Requires:       %{_fontsdir}/TTF
32 %else
33 Source0:        http://svn.pld-linux.org/svn/license-installer/license-installer.sh
34 # NoSource0-md5:        329c25f457fea66ec502b7ef70cb9ede
35 Source1:        %{base_name}-licence.txt
36 Requires:       rpm-build-tools >= 4.4.37
37 Requires:       rpmbuild(macros) >= 1.544
38 Requires:       unzip
39 %endif
40 BuildArch:      noarch
41 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
42
43 %define         ttffontsdir     %{_fontsdir}/TTF
44
45 %description
46 Bitstream Cyberfonts TrueType font.
47 %if !%{with license_agreement}
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
54 %endif
55
56 %description -l pl.UTF-8
57 Font TrueType Cyberfonts firmy Bitstream.
58 %if !%{with license_agreement}
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:
62
63 %{base_name}.install --with license_agreement %{_datadir}/%{base_name}/%{base_name}.spec
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}
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 .
75 %endif
76
77 %install
78 rm -rf $RPM_BUILD_ROOT
79 %if !%{with license_agreement}
80 install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}/%{base_name}}
81
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,
89         s,@DATADIR@,%{_datadir}/%{base_name},g
90 ' %{SOURCE0} > $RPM_BUILD_ROOT%{_bindir}/%{base_name}.install
91
92 install %{_specdir}/%{base_name}.spec $RPM_BUILD_ROOT%{_datadir}/%{base_name}
93 install %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/%{base_name}/Bitstream-Cyberfonts-licence.txt
94 %else
95 install -d $RPM_BUILD_ROOT%{ttffontsdir}
96 install *.ttf $RPM_BUILD_ROOT%{ttffontsdir}
97 %endif
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
110 %post
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}
124 %doc Bitstream-Cyberfonts-licence.txt
125 %{ttffontsdir}/*
126 %else
127 %attr(755,root,root) %{_bindir}/%{base_name}.install
128 %{_datadir}/%{base_name}
129 %endif
This page took 0.094552 seconds and 3 git commands to generate.