]> git.pld-linux.org Git - SPECS.git/blob - fonts-TTF-Code2000.spec
SPECS updated Tue 30 Apr 15:13:02 CEST 2024
[SPECS.git] / fonts-TTF-Code2000.spec
1 # NOTE
2 # according to license we *can* store the .ZIP in distfiles in
3 # unaltered form, while can't distribute resulting rpm.
4 #
5 # Conditional build:
6 %bcond_with     license_agreement       # generates package
7 #
8 %define         base_name       fonts-TTF-Code2000
9 Summary:        Code2000 Unicode TrueType font
10 Summary(pl.UTF-8):      Unikodowy font TrueType Code2000
11 %if %{with license_agreement}
12 Name:           %{base_name}
13 %else
14 Name:           %{base_name}-installer
15 %endif
16 %define         _rel    1
17 Version:        1.171
18 Release:        %{_rel}%{?with_license_agreement:wla}
19 License:        Shareware, fee required
20 Group:          Fonts
21 %if %{with license_agreement}
22 Source0:        http://code2000.net/CODE2000.ZIP
23 # Source0-md5:  1fa4e4b61d7ac0980b038e9260667a77
24 %else
25 # Source10 extracted from Source0
26 Source10:       CODE2000.HTM
27 Source11:       http://svn.pld-linux.org/svn/license-installer/license-installer.sh
28 # Source11-md5: 4fb1600353dd57fe088e0b12fb0ecac2
29 %endif
30 URL:            http://code2000.net/code2000_page.htm
31 %if %{with license_agreement}
32 BuildRequires:  unzip
33 Requires(post,postun):  fontpostinst
34 Requires:       %{_fontsdir}/TTF
35 Requires:       fontpostinst
36 %else
37 Requires:       unzip
38 Requires:       mktemp > 1.5-18
39 Requires:       rpm-build-tools
40 %endif
41 BuildArch:      noarch
42 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
43
44 %define         ttffontsdir     %{_fontsdir}/TTF
45
46 %description
47 Code2000 is a shareware font. It is a Unicode-based font, as are many
48 modern computer fonts. Code2000 is one of the larger fonts available
49 and the latest build has over 60000 glyphs.
50
51 It relies on font-smoothing (anti-aliasing) for screen display, it
52 does not contain hinting instructions.
53
54 %prep
55 %if %{with license_agreement}
56 %setup -q -c
57 %endif
58
59 %install
60 rm -rf $RPM_BUILD_ROOT
61
62 %if !%{with license_agreement}
63 install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}/%{base_name}}
64
65 sed -e '
66         s/@BASE_NAME@/%{base_name}/g
67         s/@TARGET_CPU@/%{_target_cpu}/g
68         s-@VERSION@-%{version}-g
69         s-@RELEASE@-%{release}-g
70         s,@SPECFILE@,%{_datadir}/%{base_name}/%{base_name}.spec,g
71 ' %{SOURCE11} > $RPM_BUILD_ROOT%{_bindir}/%{base_name}.install
72
73 install %{_specdir}/%{base_name}.spec $RPM_BUILD_ROOT%{_datadir}/%{base_name}
74 install %{SOURCE10} $RPM_BUILD_ROOT%{_datadir}/%{base_name}
75
76 %else
77 install -d $RPM_BUILD_ROOT%{ttffontsdir}
78 install *.TTF $RPM_BUILD_ROOT%{ttffontsdir}
79 %endif
80
81 %clean
82 rm -rf $RPM_BUILD_ROOT
83
84 %if %{with license_agreement}
85 %post
86 fontpostinst TTF
87
88 %postun
89 fontpostinst TTF
90
91 %else
92 %post
93 %{_bindir}/%{base_name}.install
94
95 echo "
96 License issues made us not to include inherent files into
97 this package by default. If you accept the conditions specified
98 by the font Author in:
99 %{_datadir}/%{base_name}/CODE2000.HTM
100 and want to install a real font, then rebuild the package with the
101 following command:
102
103 %{_bindir}/%{base_name}.install --with license_agreement %{_datadir}/%{base_name}/%{base_name}.spec
104 "
105 %endif
106
107 %files
108 %defattr(644,root,root,755)
109 %if %{with license_agreement}
110 %doc *.HTM
111 %{ttffontsdir}/*
112 %else
113 %attr(755,root,root) %{_bindir}/%{base_name}.install
114 %{_datadir}/%{base_name}
115 %endif
This page took 0.43652 seconds and 3 git commands to generate.