]> git.pld-linux.org Git - packages/hfst.git/blob - hfst.spec
- enable lexc (needed for some apertium dicts)
[packages/hfst.git] / hfst.spec
1 #
2 # Conditional build:
3 %bcond_with     foma            # use foma by linking with libfoma (GPL v2-strict, which is not compliant)
4 %bcond_without  readline        # readline in interactive programs
5 #
6 Summary:        Helsinki Finite-State Transducer (library and application suite)
7 Summary(pl.UTF-8):      Helsinki Finite-State Transducer (biblioteka i zestaw aplikacji)
8 Name:           hfst
9 Version:        3.4.5
10 Release:        1
11 License:        GPL v3
12 Group:          Applications/Text
13 Source0:        http://downloads.sourceforge.net/hfst/%{name}-%{version}.tar.gz
14 # Source0-md5:  4632cef7aa20564dba25eec3747f069a
15 Patch0:         %{name}-pc.patch
16 Patch1:         %{name}-link.patch
17 URL:            http://www.ling.helsinki.fi/kieliteknologia/tutkimus/hfst/
18 BuildRequires:  SFST-devel
19 BuildRequires:  autoconf >= 2.62
20 BuildRequires:  automake >= 1:1.11
21 BuildRequires:  bison
22 BuildRequires:  flex >= 2.5.35
23 BuildRequires:  glib2-devel >= 1:2.16
24 BuildRequires:  libstdc++-devel
25 BuildRequires:  libtool >= 2:2.2
26 # would be used only with --enable-expand-equivalences, but header checks are broken (no -I...)
27 #BuildRequires: libxml2-devel >= 2
28 BuildRequires:  ncurses-devel
29 BuildRequires:  openfst-devel
30 BuildRequires:  pkgconfig >= 1:0.14
31 BuildRequires:  python >= 2.4
32 %{?with_readline:BuildRequires: readline-devel}
33 %if %{with foma}
34 BuildRequires:  foma-devel
35 BuildRequires:  zlib-devel
36 %endif
37 Requires:       glib2 >= 1:2.16
38 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39
40 %description
41 The Helsinki Finite-State Transducer software is intended for the
42 implementation of morphological analysers and other tools which are
43 based on weighted and unweigted finite-state transducer technology.
44
45 %description -l pl.UTF-8
46 Pakiet HFST (Helsinki Finite-State Transducer) to oprogramowanie
47 służące do implementacji analizatorów morfologicznych i innych
48 narzędzi opartych na technice przetwarzania ze skończoną liczbą
49 stanów z wagami lub bez.
50
51 %package devel
52 Summary:        Header files for HFST library
53 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki HFST
54 Group:          Development/Libraries
55 Requires:       %{name} = %{version}-%{release}
56 Requires:       SFST-devel
57 %{?with_foma:Requires:  foma-devel}
58 Requires:       glib2-devel >= 1:2.16
59 Requires:       libstdc++-devel
60 Requires:       openfst-devel
61
62 %description devel
63 Header files for HFST library.
64
65 %description devel -l pl.UTF-8
66 Pliki nagłówkowe biblioteki HFST.
67
68 %package static
69 Summary:        Static HFST library
70 Summary(pl.UTF-8):      Statyczna biblioteka HFST
71 Group:          Development/Libraries
72 Requires:       %{name}-devel = %{version}-%{release}
73
74 %description static
75 Static HFST library.
76
77 %description static -l pl.UTF-8
78 Statyczna biblioteka HFST.
79
80 %prep
81 %setup -q
82 %patch0 -p1
83 %patch1 -p1
84
85 %build
86 %{__libtoolize}
87 %{__aclocal}
88 %{__autoconf}
89 %{__autoheader}
90 %{__automake}
91 %configure \
92         FOMACLI=/usr/bin/foma \
93         --enable-lexc \
94         --disable-silent-rules \
95         --enable-static \
96         %{?with_readline:--with-readline} \
97         --with-unicode-handler=glib \
98         %{!?with_foma:--without-foma}
99
100 %{__make}
101
102 %install
103 rm -rf $RPM_BUILD_ROOT
104
105 %{__make} install \
106         DESTDIR=$RPM_BUILD_ROOT
107
108 # obsoleted by pkgconfig
109 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libhfst.la
110
111 # for transducer data
112 install -d $RPM_BUILD_ROOT%{_datadir}/hfst
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 NEWS README THANKS
123 %attr(755,root,root) %{_bindir}/hfst-*
124 %attr(755,root,root) %{_bindir}/htwolcpre*
125 %attr(755,root,root) %{_libdir}/libhfst.so.*.*.*
126 %attr(755,root,root) %ghost %{_libdir}/libhfst.so.28
127 %dir %{_datadir}/hfst
128 %{_mandir}/man1/hfst-*.1*
129
130 %files devel
131 %defattr(644,root,root,755)
132 %attr(755,root,root) %{_libdir}/libhfst.so
133 %{_includedir}/hfst
134 %{_aclocaldir}/hfst.m4
135 %{_pkgconfigdir}/hfst.pc
136
137 %files static
138 %defattr(644,root,root,755)
139 %{_libdir}/libhfst.a
This page took 0.063201 seconds and 3 git commands to generate.