private sync
[framework/graphics/freetype.git] / packaging / freetype.spec
1 Name:       freetype
2 Summary:    A free and portable font rendering engine
3 Version:    2.4.9
4 Release:    4
5 Group:      System/Libraries
6 License:    FTL or GPLv2+
7 URL:        http://www.freetype.org
8 Source0:    http://download.savannah.gnu.org/releases-noredirect/freetype/freetype-%{version}.tar.gz
9 Source1001: packaging/freetype.manifest
10 Requires(post): /sbin/ldconfig
11 Requires(postun): /sbin/ldconfig
12 Provides:   %{name}-bytecode
13
14
15 %description
16 The FreeType engine is a free and portable font rendering
17 engine, developed to provide advanced font support for a variety of
18 platforms and environments. FreeType is a library which can open and
19 manages font files as well as efficiently load, hint and render
20 individual glyphs. FreeType is not a font server or a complete
21 text-rendering library.
22
23
24
25 %package devel
26 Summary:    FreeType development libraries and header files
27 Group:      Development/Libraries
28 Requires:   %{name} = %{version}-%{release}
29 Requires:   zlib-devel
30 Requires:   pkgconfig
31
32 %description devel
33 The freetype-devel package includes the static libraries and header files
34 for the FreeType font rendering engine.
35
36 Install freetype-devel if you want to develop programs which will use
37 FreeType.
38
39
40
41 %prep
42 %setup -q
43
44 %build
45 cp %{SOURCE1001} .
46
47 %configure --disable-static
48 sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' builds/unix/libtool
49 sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' builds/unix/libtool
50 make %{?_smp_mflags}
51
52 %install
53 rm -rf %{buildroot}
54
55 %makeinstall gnulocaledir=$RPM_BUILD_ROOT%{_datadir}/locale
56 mkdir -p %{buildroot}/usr/share/license
57 cat docs/FTL.TXT > %{buildroot}/usr/share/license/%{name}
58
59
60 # fix multilib issues
61 %ifarch x86_64 s390x ia64 ppc64 alpha sparc64
62 %define wordsize 64
63 %else
64 %define wordsize 32
65 %endif
66
67 mv $RPM_BUILD_ROOT%{_includedir}/freetype2/freetype/config/ftconfig.h \
68 $RPM_BUILD_ROOT%{_includedir}/freetype2/freetype/config/ftconfig-%{wordsize}.h
69 cat >$RPM_BUILD_ROOT%{_includedir}/freetype2/freetype/config/ftconfig.h <<EOF
70 #ifndef __FTCONFIG_H__MULTILIB
71 #define __FTCONFIG_H__MULTILIB
72
73 #include <bits/wordsize.h>
74
75 #if __WORDSIZE == 32
76 # include "ftconfig-32.h"
77 #elif __WORDSIZE == 64
78 # include "ftconfig-64.h"
79 #else
80 # error "unexpected value for __WORDSIZE macro"
81 #endif
82
83 #endif
84 EOF
85
86 # Don't package static a or .la files
87 rm -f $RPM_BUILD_ROOT%{_libdir}/*.{a,la}
88
89
90 %post -p /sbin/ldconfig
91
92 %postun -p /sbin/ldconfig
93
94 %files
95 %manifest freetype.manifest
96 %defattr(-,root,root,-)
97 %{_libdir}/libfreetype.so.*
98 /usr/share/license/%{name}
99
100 %files devel
101 %manifest freetype.manifest
102 %defattr(-,root,root,-)
103 %dir %{_includedir}/freetype2
104 %{_datadir}/aclocal/freetype2.m4
105 %{_includedir}/freetype2/*
106 %{_includedir}/*.h
107 %{_libdir}/libfreetype.so
108 %{_bindir}/freetype-config
109 %{_libdir}/pkgconfig/*.pc
110