Git init
[framework/graphics/freetype.git] / packaging / freetype.spec
1 Name:       freetype
2 Summary:    A free and portable font rendering engine
3 Version:    2.4.3
4 Release:    1
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.bz2
9 Requires(post): /sbin/ldconfig
10 Requires(postun): /sbin/ldconfig
11 Provides:   %{name}-bytecode
12
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
45 %configure --disable-static
46 sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' builds/unix/libtool
47 sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' builds/unix/libtool
48 make %{?_smp_mflags}
49
50 %install
51 rm -rf %{buildroot}
52
53 %makeinstall gnulocaledir=$RPM_BUILD_ROOT%{_datadir}/locale
54
55
56 # fix multilib issues
57 %ifarch x86_64 s390x ia64 ppc64 alpha sparc64
58 %define wordsize 64
59 %else
60 %define wordsize 32
61 %endif
62
63 mv $RPM_BUILD_ROOT%{_includedir}/freetype2/freetype/config/ftconfig.h \
64 $RPM_BUILD_ROOT%{_includedir}/freetype2/freetype/config/ftconfig-%{wordsize}.h
65 cat >$RPM_BUILD_ROOT%{_includedir}/freetype2/freetype/config/ftconfig.h <<EOF
66 #ifndef __FTCONFIG_H__MULTILIB
67 #define __FTCONFIG_H__MULTILIB
68
69 #include <bits/wordsize.h>
70
71 #if __WORDSIZE == 32
72 # include "ftconfig-32.h"
73 #elif __WORDSIZE == 64
74 # include "ftconfig-64.h"
75 #else
76 # error "unexpected value for __WORDSIZE macro"
77 #endif
78
79 #endif
80 EOF
81
82 # Don't package static a or .la files
83 rm -f $RPM_BUILD_ROOT%{_libdir}/*.{a,la}
84
85
86 %post -p /sbin/ldconfig
87
88 %postun -p /sbin/ldconfig
89
90 %files
91 %defattr(-,root,root,-)
92 %{_libdir}/libfreetype.so.*
93
94 %files devel
95 %defattr(-,root,root,-)
96 %dir %{_includedir}/freetype2
97 %{_datadir}/aclocal/freetype2.m4
98 %{_includedir}/freetype2/*
99 %{_includedir}/*.h
100 %{_libdir}/libfreetype.so
101 %{_bindir}/freetype-config
102 %{_libdir}/pkgconfig/*.pc
103