]>
Commit | Line | Data |
---|---|---|
674c09df MH |
1 | # Some distributions name their Freetype 2 package "freetype", while others |
2 | # name it "freetype2". You can define the name your distribution uses here. | |
22dc6fc6 | 3 | %define freetype2 freetype |
22dc6fc6 OT |
4 | |
5 | Summary: Font configuration and customization library | |
20fa60c9 KP |
6 | Name: fontconfig |
7 | Version: @VERSION@ | |
8 | Release: 1 | |
9 | License: MIT | |
10 | Group: System Environment/Libraries | |
d30f481c | 11 | Source: http://fontconfig.org/release/fontconfig-%{version}.tar.gz |
22dc6fc6 OT |
12 | URL: http://fontconfig.org |
13 | BuildRoot: %{_tmppath}/%{name}-%{version}-root | |
14 | ||
5283328a MH |
15 | BuildRequires: %{_bindir}/docbook2html |
16 | BuildRequires: %{_bindir}/docbook2txt | |
22dc6fc6 OT |
17 | BuildRequires: %{freetype2}-devel |
18 | BuildRequires: expat-devel | |
19 | BuildRequires: perl | |
20 | ||
21 | PreReq: %{freetype2} | |
20fa60c9 KP |
22 | |
23 | %description | |
22dc6fc6 OT |
24 | Fontconfig is designed to locate fonts within the |
25 | system and select them according to requirements specified by | |
26 | applications. | |
20fa60c9 KP |
27 | |
28 | %package devel | |
22dc6fc6 | 29 | Summary: Font configuration and customization library |
20fa60c9 KP |
30 | Group: Development/Libraries |
31 | Requires: %{name} = %{version} | |
22dc6fc6 | 32 | Requires: %{freetype2}-devel |
20fa60c9 KP |
33 | |
34 | %description devel | |
22dc6fc6 OT |
35 | The fontconfig-devel package includes the static libraries, |
36 | header files, and developer docs for the fontconfig package. | |
20fa60c9 | 37 | |
22dc6fc6 OT |
38 | Install fontconfig-devel if you want to develop programs which |
39 | will use fontconfig. | |
20fa60c9 | 40 | |
6ae6acf3 KP |
41 | # Some rpm specific directories. Prefix 'my' hopefully does not collide with anything. |
42 | %define my_docdir %{_datadir}/doc/%{name}-%{version} | |
43 | %define my_develdocdir %{_datadir}/doc/%{name}-devel-%{version} | |
44 | %define my_tmpdocdir $RPM_BUILD_ROOT%{my_docdir} | |
45 | %define my_tmpdeveldocdir $RPM_BUILD_ROOT%{my_develdocdir} | |
46 | ||
20fa60c9 | 47 | %prep |
22dc6fc6 | 48 | %setup -q |
20fa60c9 KP |
49 | |
50 | %build | |
6ae6acf3 KP |
51 | %configure --with-x-fonts=/usr/X11R6/lib/X11/fonts --disable-gtk-doc \ |
52 | --with-docdir=%{my_docdir} | |
674c09df | 53 | make %{_smp_mflags} |
20fa60c9 KP |
54 | |
55 | %install | |
22dc6fc6 | 56 | [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT |
dbe9a11e | 57 | { |
6ae6acf3 KP |
58 | %makeinstall docdir=%{my_tmpdocdir} |
59 | ||
60 | # The make does not distinguish the base and devel packages | |
61 | mkdir -p %{my_tmpdeveldocdir} | |
62 | mv -f %{my_tmpdocdir}/*devel* %{my_tmpdeveldocdir} | |
63 | ||
64 | # Use a more informative directory name: | |
65 | mv -f %{my_tmpdeveldocdir}/fontconfig-devel %{my_tmpdeveldocdir}/html | |
dbe9a11e | 66 | } |
20fa60c9 KP |
67 | |
68 | %clean | |
22dc6fc6 | 69 | [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT |
20fa60c9 KP |
70 | |
71 | %post | |
c674c89b MH |
72 | { |
73 | /sbin/ldconfig | |
74 | # Force regeneration of all fontconfig cache files. | |
75 | %{_bindir}/fc-cache -f --system-only | |
76 | } | |
22dc6fc6 | 77 | |
20fa60c9 KP |
78 | %postun -p /sbin/ldconfig |
79 | ||
80 | %files | |
dbe9a11e | 81 | %defattr(-, root, root) |
6ae6acf3 KP |
82 | %doc README AUTHORS COPYING ChangeLog doc/fontconfig-user.{html,txt} |
83 | %{my_docdir}/* | |
22dc6fc6 OT |
84 | %dir %{_sysconfdir}/fonts |
85 | %{_sysconfdir}/fonts/fonts.conf | |
86 | %{_sysconfdir}/fonts/fonts.dtd | |
20fa60c9 | 87 | %config %{_sysconfdir}/fonts/local.conf |
fc87206f MH |
88 | %{_bindir}/fc-* |
89 | %{_libdir}/libfontconfig*.so.* | |
6ae6acf3 | 90 | %{_mandir}/man1/* |
dbe9a11e | 91 | %{_mandir}/man5/* |
20fa60c9 KP |
92 | |
93 | %files devel | |
94 | %defattr(-, root, root) | |
6ae6acf3 KP |
95 | #%doc doc/fontconfig-devel.txt doc/fontconfig-devel/* |
96 | %{my_develdocdir} | |
fc87206f | 97 | %dir %{_includedir}/fontconfig |
6ae6acf3 | 98 | %{_includedir}/fontconfig/* |
22dc6fc6 OT |
99 | %{_libdir}/*.a |
100 | %{_libdir}/*.la | |
fc87206f | 101 | %{_libdir}/libfontconfig.so |
22dc6fc6 | 102 | %{_libdir}/pkgconfig |
dbe9a11e | 103 | %{_mandir}/man3/* |
20fa60c9 KP |
104 | |
105 | %changelog | |
6ae6acf3 KP |
106 | * Wed Mar 20 2004 Enrique Perez-Terron <enrio@online.no> |
107 | - Added mandir /man1/* to main file list | |
108 | - Added missing '/*' after includedir/fontconfig to avoid "listed twice" error. | |
109 | - Removed configure option --disable-docs since its problem is solved, see below. | |
110 | - Added option to makeinstall to have it install docs in the proper directory. | |
111 | Notice though that the %doc macro deletes and recreates the docs directory. | |
112 | - Cleaner separation of devel docs. | |
113 | - Renamed doc/fontconfig-devel-*/fontconfig-devel subdirectory to 'html'. | |
114 | - Removed %doc macro from devel filelist, since it deletes installed files. | |
115 | ||
dbe9a11e MH |
116 | * Fri Mar 7 2003 Mike A. Harris <mharris@redhat.com> 2.1.92-1 |
117 | - Removed man1/* and added man5/* to main package and man3/* to devel package | |
118 | - Added missing defattr(-, root, root) to main package | |
119 | - Added HTML and text development documentation to -devel subpackage | |
120 | ||
a5ae222c MH |
121 | * Wed Mar 5 2003 Mike A. Harris <mharris@redhat.com> |
122 | - Added back the configure macro options --disable-docs because otherwise | |
123 | fontconfig installs docs into /usr/share/doc/fontconfig (with no version | |
124 | number) unconditionally, causing RPM to fail the build due to unpackaged | |
125 | files terminate build | |
126 | ||
b06766e4 MH |
127 | * Wed Mar 5 2003 Mike A. Harris <mharris@redhat.com> |
128 | - Removed commented out rpm macro define at top of spec file, replacing it with | |
129 | a simple explanation, since rpm macros are expanded by rpm even in comments | |
130 | - Changed /usr/bin to _bindir in BuildRequires lines | |
131 | - Cleaned up rpm postinstall script, and made fc-cache use _bindir | |
132 | - Reorganized file manifest lists | |
133 | ||
22dc6fc6 OT |
134 | * Sun Mar 2 2003 Owen Taylor <otaylor@redhat.com> |
135 | - Various improvements from Red Hat spec file | |
136 | ||
b06766e4 | 137 | * Sun Mar 2 2003 Mike A. Harris <mharris@redhat.com> |
22dc6fc6 | 138 | - Initial changelog entry |