]> git.pld-linux.org Git - packages/openfst.git/blob - openfst.spec
- updated to 1.5.0
[packages/openfst.git] / openfst.spec
1 #
2 # Conditional build:
3 %bcond_without  python          # python extensions
4 %bcond_without  static_libs     # static library
5 #
6 Summary:        OpenFst - library for finite state transducers development
7 Summary(pl.UTF-8):      OpenFst - biblioteka do programowania automatów skończonych z wyjściem
8 Name:           openfst
9 Version:        1.5.0
10 Release:        1
11 License:        Apache v2.0
12 Group:          Libraries
13 #Source0Download: http://www.openfst.org/twiki/bin/view/FST/FstDownload
14 Source0:        http://www.openfst.org/twiki/pub/FST/FstDownload/%{name}-%{version}.tar.gz
15 # Source0-md5:  a24fee5ffe28744c6fb7b1a49e0006c4
16 Patch0:         %{name}-link.patch
17 Patch1:         %{name}-python.patch
18 URL:            http://www.openfst.org/
19 BuildRequires:  autoconf >= 2.50
20 BuildRequires:  automake
21 BuildRequires:  libstdc++-devel >= 6:4.7
22 BuildRequires:  libtool >= 2:1.5
23 %{?with_python:BuildRequires:   python-devel >= 1:2.7}
24 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25
26 # modules dlopened from libfst refer to symbols from the library
27 %define         skip_post_check_so      .*%{_libdir}/fst/.*\.so.*
28
29 %description
30 OpenFst is a library for constructing, combining, optimizing, and
31 searching weighted finite-state transducers (FSTs).
32
33 %description -l pl.UTF-8
34 OpenFst to biblioteka do konstruowania, łączenia, optymalizacji i
35 przeszukiwania automatów skończonych z wyjściem (FST) i wagami.
36
37 %package devel
38 Summary:        Header files for OpenFst library
39 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki OpenFst
40 Group:          Development/Libraries
41 Requires:       %{name} = %{version}-%{release}
42 Requires:       libstdc++-devel >= 6:4.7
43
44 %description devel
45 Header files for OpenFst library.
46
47 %description devel -l pl.UTF-8
48 Pliki nagłówkowe biblioteki OpenFst.
49
50 %package static
51 Summary:        Static OpenFst library
52 Summary(pl.UTF-8):      Statyczna biblioteka OpenFst
53 Group:          Development/Libraries
54 Requires:       %{name}-devel = %{version}-%{release}
55
56 %description static
57 Static OpenFst library.
58
59 %description static -l pl.UTF-8
60 Statyczna biblioteka OpenFst.
61
62 %package -n python-openfst
63 Summary:        Python binding for OpenFst
64 Summary(pl.UTF-8):      Wiązanie Pythona do biblioteki OpenFst
65 Group:          Libraries/Python
66 Requires:       %{name} = %{version}-%{release}
67 Requires:       python-libs >= 1:2.7
68
69 %description -n python-openfst
70 Python binding for OpenFst.
71
72 %description -n python-openfst -l pl.UTF-8
73 Wiązanie Pythona do biblioteki OpenFst.
74
75 %prep
76 %setup -q
77 %patch0 -p1
78 %patch1 -p1
79
80 %build
81 %{__libtoolize}
82 %{__aclocal} -I m4
83 %{__autoconf}
84 %{__autoheader}
85 %{__automake}
86 %configure \
87         --enable-compact-fsts \
88         --enable-compress \
89         --enable-const-fsts \
90         --enable-far \
91         --enable-linear-fsts \
92         --enable-lookahead-fsts \
93         --enable-mpdt \
94         --enable-ngram-fsts \
95         --enable-pdt \
96         --enable-python \
97         %{?with_static_libs:--enable-static}
98
99 %{__make}
100
101 %install
102 rm -rf $RPM_BUILD_ROOT
103
104 %{__make} install \
105         DESTDIR=$RPM_BUILD_ROOT
106
107 %{__rm} $RPM_BUILD_ROOT%{_libdir}/fst/*.la \
108         %{?with_python:$RPM_BUILD_ROOT%{py_sitedir}/fst.la}
109 %if %{with static_libs}
110 %{__rm} $RPM_BUILD_ROOT%{_libdir}/fst/*.a \
111         %{?with_python:$RPM_BUILD_ROOT%{py_sitedir}/fst.a}
112 %endif
113
114 %clean
115 rm -rf $RPM_BUILD_ROOT
116
117 %post   -p /sbin/ldconfig
118 %postun -p /sbin/ldconfig
119
120 %files
121 %defattr(644,root,root,755)
122 %doc AUTHORS COPYING NEWS README
123 %attr(755,root,root) %{_bindir}/far*
124 %attr(755,root,root) %{_bindir}/fst*
125 %attr(755,root,root) %{_bindir}/mpdt*
126 %attr(755,root,root) %{_bindir}/pdt*
127 %attr(755,root,root) %{_libdir}/libfst.so.*.*.*
128 %attr(755,root,root) %ghost %{_libdir}/libfst.so.1
129 %attr(755,root,root) %{_libdir}/libfstscript.so.*.*.*
130 %attr(755,root,root) %ghost %{_libdir}/libfstscript.so.1
131 %dir %{_libdir}/fst
132 %attr(755,root,root) %{_libdir}/fst/*.so*
133
134 %files devel
135 %defattr(644,root,root,755)
136 %attr(755,root,root) %{_libdir}/libfst.so
137 %attr(755,root,root) %{_libdir}/libfstscript.so
138 %{_libdir}/libfst.la
139 %{_libdir}/libfstscript.la
140 %{_includedir}/fst
141
142 %if %{with static_libs}
143 %files static
144 %defattr(644,root,root,755)
145 %{_libdir}/libfst.a
146 %{_libdir}/libfstscript.a
147 %endif
148
149 %if %{with python}
150 %files -n python-openfst
151 %defattr(644,root,root,755)
152 %attr(755,root,root) %{py_sitedir}/fst.so
153 %endif
This page took 0.070508 seconds and 3 git commands to generate.