Initial commit to support emacs
[profile/ivi/m17n-lib.git] / packaging / m17n-lib.spec
1 # set to 1 to build with GUI and OpenType Font support
2 %define with_gui 0
3 # set to 1 to build examples (including anthy support)
4 %define with_examples 0
5
6 Name:           m17n-lib
7 Version:        1.6.1
8 Release:        1
9 Summary:        Multilingual text library
10 Group:          System Environment/Libraries
11 License:        LGPLv2
12 URL:            http://www.m17n.org/m17n-lib/index.html
13 Source0:        %{name}-%{version}.tar.gz
14
15 BuildRequires:  m17n-db >= 1.4.0
16 %if %{with_gui}
17 BuildRequires:  libxml2-devel, xorg-x11-devel
18 BuildRequires:  freetype-devel >= 2.0, fribidi-devel, gd-devel >= 2.0
19 BuildRequires:  libotf-devel >= %{libotf_version}
20 %else
21 BuildRequires:  autoconf
22 BuildRequires:  libtool
23 BuildRequires:  pkgconfig
24 %endif
25 %if %{with_examples}
26 BuildRequires:  anthy-devel
27 %endif
28 Requires:  m17n-db >= 1.4.0
29 Patch2:    m17n-lib-nobuild-examples.patch
30
31 %description
32 m17n-lib is a multilingual text library used primarily to allow
33 the input of many languages with the input table maps from m17n-db.
34
35
36 %package  devel
37 Summary:  Development file for m17n-lib 
38 Group:    Development/Libraries
39 Requires:  %{name} =  %{version}-%{release} 
40  
41
42 %description devel
43 Development files for %{name}.
44
45
46 %prep
47 %setup -q
48
49 %if ! %{with_examples}
50 %patch2 -p1 -b .examples
51 %endif
52 # patch2 touches Makefile.am
53 autoreconf -v -f -i
54
55
56 %build
57 libtoolize --copy --force
58 %configure --disable-static \
59 %if ! %{with_gui}
60   --with-gui=no
61 %else
62   %{nil}
63 %endif
64 make
65
66
67 %install
68 rm -rf $RPM_BUILD_ROOT
69 make install DESTDIR=$RPM_BUILD_ROOT INSTALL="%{__install} -c -p"
70
71 # remove unneeded files
72 rm $RPM_BUILD_ROOT%{_bindir}/m17n-config
73 rm $RPM_BUILD_ROOT%{_libdir}/lib*.la
74
75
76 %clean
77 rm -rf $RPM_BUILD_ROOT
78
79
80 %post -p /sbin/ldconfig
81
82
83 %postun -p /sbin/ldconfig
84
85
86 %files
87 %defattr(-,root,root)
88 %doc AUTHORS COPYING NEWS
89 %{_libdir}/lib*.so.*
90
91 %files devel
92 %defattr(-,root,root)
93 %doc ChangeLog README
94 %{_includedir}/*
95 %{_libdir}/lib*.so
96 %{_libdir}/pkgconfig/*
97
98