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