/[packages]/cauldron/fontconfig/current/SPECS/fontconfig.spec
ViewVC logotype

Contents of /cauldron/fontconfig/current/SPECS/fontconfig.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 5802 - (show annotations) (download)
Tue Jan 11 01:44:10 2011 UTC (13 years, 3 months ago) by blino
File size: 5848 byte(s)
imported package fontconfig
1 %define fontconfig_major 1
2 %define lib_name %mklibname %{name} %{fontconfig_major}
3 %define develname %mklibname %name -d
4
5 %define freetype_version 2.3.5
6
7 %define bootstrap 0
8 %{?_without_bootstrap: %global bootstrap 0}
9 %{?_with_bootstrap: %global bootstrap 1}
10 %define rebuild_doc 1
11 %if %{bootstrap}
12 %define rebuild_doc 0
13 %endif
14
15 Summary: Font configuration library
16 Name: fontconfig
17 Version: 2.8.0
18 Release: %mkrel 5
19 License: MIT
20 Group: System/X11
21 Source0: http://fontconfig.org/release/fontconfig-%{version}.tar.gz
22 # (fc) 2.3.2-3mdk prefer urw fonts
23 Source1: 30-mdv-urwfonts.conf
24 # (fc) 2.3.2-3mdk dualwidth for CJK
25 Source2: 20-mdv-CJK-dualwidth.conf
26 # (fc) 2.3.2-3mdk disable antialiasing for some fonts
27 Source3: 20-mdv-disable-antialias.conf
28 # (fc) 2.3.2-3mdk disable hinting for some fonts/languages
29 Source4: 25-mdv-CJK-disable-hinting.conf
30 # (fc) 2.3.2-3mdk Avoid KDE/QT uses some bitmapped fonts (guisseppe)
31 Source5: 30-mdv-avoid-bitmap.conf
32 # (fc) 2.4.2-1mdv disable embedded bitmap for big size (Mdv bug #25924)
33 Source8: 26-mdv-no-embeddedbitmap.conf
34 # (fwang): 2.4.2-7mdv move wqy-bitmap font rule into fontconfig package
35 Source9: 85-wqy-bitmapsong.conf
36 # (fc) 2.4.92-1mdv enable embeddedbitmap on some CJK fonts (Fedora)
37 Source10: 25-no-bitmap-fedora.conf
38 # (pz) rpm filetriggers to update cache
39 Source11: fc-cache.filter
40 Source12: fc-cache.script
41 # (fc) 2.1-4mdk change order of default fonts
42 Patch1: fontconfig-mdvconfig.patch
43
44 URL: http://fontconfig.org/
45 BuildRoot: %{_tmppath}/fontconfig-%{version}-root
46
47 Requires(post): %{lib_name} >= %{version}-%{release}
48 BuildRequires: freetype2-devel >= %{freetype_version}
49
50 BuildRequires: ed
51 %if %rebuild_doc
52 BuildRequires: docbook-utils
53 BuildRequires: docbook-utils-pdf
54 BuildRequires: docbook-dtd31-sgml
55 BuildRequires: docbook-dtd41-sgml
56 %endif
57 BuildRequires: lynx
58 BuildRequires: libxml2-devel
59 BuildRequires: libxml2-utils
60
61 # fwang: add conflicts to ease upgrade
62 Conflicts: x11-font-wqy-bitmapfont < 1.0-0.20070901.1
63
64 %description
65 Fontconfig is designed to locate fonts within the
66 system and select them according to requirements specified by
67 applications.
68
69 %package -n %{lib_name}
70 Summary: Font configuration and customization library
71 Group: System/Libraries
72 Requires: %{name} >= %{version}-%{release}
73 Provides: lib%{name} = %{version}-%{release}
74 Provides: %{name}-libs = %{version}-%{release}
75
76 %description -n %{lib_name}
77 Fontconfig is designed to locate fonts within the
78 system and select them according to requirements specified by
79 applications.
80
81 %package -n %{develname}
82 Summary: Font configuration and customization library
83 Group: Development/C
84 Provides: lib%{name}-devel = %{version}-%{release}
85 Provides: %{name}-devel = %{version}-%{release}
86 Requires: %{name} = %{version}-%{release}
87 Requires: %{lib_name} = %{version}-%{release}
88 Requires: freetype2-devel >= %{freetype_version}
89 Obsoletes: %mklibname -d %name 1
90
91 %description -n %{develname}
92 The fontconfig-devel package includes the header files,
93 and developer docs for the fontconfig package.
94
95 Install fontconfig-devel if you want to develop programs which
96 will use fontconfig.
97
98 %prep
99 %setup -q
100 %patch1 -p1 -b .mdvconfig
101
102 %build
103 %if !%rebuild_doc
104 export HASDOCBOOK=no
105 %endif
106
107 %configure2_5x --localstatedir=/var \
108 --with-add-fonts="/usr/lib/X11/fonts,/usr/X11R6/lib/X11/fonts,/opt/ttfonts" \
109 --enable-libxml2
110
111 %make
112
113 make check
114
115 %install
116 rm -rf $RPM_BUILD_ROOT
117 %makeinstall_std
118
119 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/fonts/conf.d
120 cp %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} %{SOURCE8} %{SOURCE9} %{SOURCE10} $RPM_BUILD_ROOT%{_sysconfdir}/fonts/conf.d
121
122 # needed in case main config files isn't up to date
123 cat << EOF > $RPM_BUILD_ROOT%{_sysconfdir}/fonts/conf.d/00-cache.conf
124 <?xml version="1.0"?>
125 <!DOCTYPE fontconfig SYSTEM "fonts.dtd">
126 <fontconfig>
127 <!-- Font cache directory list -->
128
129 <cachedir>/var/cache/fontconfig</cachedir>
130 <cachedir>~/.fontconfig</cachedir>
131
132 </fontconfig>
133 EOF
134
135 ln -s ../conf.avail/25-unhint-nonlatin.conf $RPM_BUILD_ROOT%{_sysconfdir}/fonts/conf.d
136
137 # ensure we ship only valid config files
138 # copy need by dtdvalid
139 cp -f $RPM_BUILD_ROOT%{_sysconfdir}/fonts/fonts.dtd $RPM_BUILD_ROOT%{_sysconfdir}/fonts/conf.d/
140 xmllint --noout --dtdvalid $RPM_BUILD_ROOT%{_sysconfdir}/fonts/fonts.dtd $RPM_BUILD_ROOT%{_sysconfdir}/fonts/conf.d/??-*.conf
141 rm -f $RPM_BUILD_ROOT%{_sysconfdir}/fonts/conf.d/fonts.dtd
142
143 # remove unpackaged files
144 rm -rf $RPM_BUILD_ROOT%{_datadir}/doc/fontconfig
145
146 # install filetriggers
147 install -d -m 0755 $RPM_BUILD_ROOT%{_var}/lib/rpm/filetriggers
148 install -m 0644 %{SOURCE11} $RPM_BUILD_ROOT%{_var}/lib/rpm/filetriggers
149 install -m 0755 %{SOURCE12} $RPM_BUILD_ROOT%{_var}/lib/rpm/filetriggers
150
151 %clean
152 rm -rf $RPM_BUILD_ROOT
153
154 %post
155 %{_bindir}/fc-cache --force --system-only >/dev/null
156
157 %if %mdkversion < 200900
158 %post -n %{lib_name} -p /sbin/ldconfig
159 %endif
160
161 %if %mdkversion < 200900
162 %postun -n %{lib_name} -p /sbin/ldconfig
163 %endif
164
165 %triggerprein -- fontconfig < 2.4.0
166 rm -f %{_var}/cache/fontconfig/*.cache-2
167
168 %files
169 %defattr(-, root, root)
170 %doc README AUTHORS COPYING doc/fontconfig-user.html doc/fontconfig-user.txt
171 %dir %{_var}/cache/fontconfig
172 %{_bindir}/*
173 %dir %{_sysconfdir}/fonts
174 %dir %{_sysconfdir}/fonts/conf.d
175 %dir %{_sysconfdir}/fonts/conf.avail
176 %config %{_sysconfdir}/fonts/fonts.dtd
177 # those files must NOT have noreplace option
178 %config %{_sysconfdir}/fonts/fonts.conf
179 %config %{_sysconfdir}/fonts/conf.d/*.conf
180 %config %{_sysconfdir}/fonts/conf.d/README
181 %config %{_sysconfdir}/fonts/conf.avail/*.conf
182 %{_mandir}/man1/*
183 %{_mandir}/man5/*
184 %{_var}/lib/rpm/filetriggers/fc-cache.*
185
186 %files -n %{lib_name}
187 %defattr(-, root, root)
188 %{_libdir}/*.so.*
189
190 %files -n %{develname}
191 %defattr(-, root, root)
192 %doc doc/fontconfig-devel doc/fontconfig-devel.txt
193 %{_libdir}/*.la
194 %{_libdir}/*.a
195 %{_libdir}/*.so
196 %{_libdir}/pkgconfig/*
197 %{_includedir}/*
198 %{_mandir}/man3/*
199
200

  ViewVC Help
Powered by ViewVC 1.1.30