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