source: spec/trunk/SPECS/hunspell.spec@ 1569

Last change on this file since 1569 was 1239, checked in by Silvan Scherrer, 8 years ago

spec: hunspell: Release version 1.6.2-1.

File size: 3.7 KB
Line 
1%define double_profiling_build 0
2
3Name: hunspell
4Summary: A spell checker and morphological analyzer library
5Version: 1.6.2
6Release: 1%{?dist}
7URL: https://github.com/hunspell/hunspell
8Group: System Environment/Libraries
9License: LGPLv2+ or GPLv2+ or MPLv1.1
10
11Vendor: bww bitwise works GmbH
12%scm_source github https://github.com/bitwiseworks/hunspell-os2 %{version}-os2
13
14BuildRequires: ncurses-devel, gettext
15BuildRequires: perl-generators
16%ifarch %{ix86} x86_64
17#BuildRequires: valgrind
18%endif
19%if %{double_profiling_build}
20BuildRequires: words
21%endif
22Requires: hunspell-en-US
23
24
25%description
26Hunspell is a spell checker and morphological analyzer library and program
27designed for languages with rich morphology and complex word compounding or
28character encoding. Hunspell interfaces: Ispell-like terminal interface using
29Curses library, Ispell pipe interface, OpenOffice.org UNO module.
30
31%package devel
32Requires: hunspell = %{version}-%{release}, pkgconfig
33Summary: Files for developing with hunspell
34Group: Development/Libraries
35
36%description devel
37Includes and definitions for developing with hunspell
38
39%prep
40%scm_setup
41autoreconf -fvi
42
43%build
44export LDFLAGS="-Zhigh-mem -Zomf -Zargs-wild -Zargs-resp"
45export LIBS="-lcx -ltinfo"
46export VENDOR="%{vendor}"
47
48configureflags="--disable-static --enable-shared --with-ui --with-readline"
49
50%define profilegenerate \
51 CFLAGS="${RPM_OPT_FLAGS} -fprofile-generate"\
52 CXXFLAGS="${RPM_OPT_FLAGS} -fprofile-generate"
53%define profileuse \
54 CFLAGS="${RPM_OPT_FLAGS} -fprofile-use"\
55 CXXFLAGS="${RPM_OPT_FLAGS} -fprofile-use"
56
57%if !%{double_profiling_build}
58%configure $configureflags
59make %{?_smp_mflags}
60%else
61#Generate a word list to use for profiling, take half of it to ensure
62#that the original word list is then considered to contain correctly
63#and incorrectly spelled words
64head -n $((`cat /usr/share/dict/words | wc -l`/2)) /usr/share/dict/words |\
65 sed '/\//d'> words
66
67#generate profiling
68%{profilegenerate} %configure $configureflags
69make %{?_smp_mflags}
70./src/tools/affixcompress words > /dev/null 2>&1
71./src/tools/hunspell -d words -l /usr/share/dict/words > /dev/null
72make check
73make distclean
74
75#use profiling
76%{profileuse} %configure $configureflags
77make %{?_smp_mflags}
78%endif
79cd po && make %{?_smp_mflags} update-gmo && cd ..
80
81%check
82%ifarch %{ix86} x86_64
83#VALGRIND=memcheck make check
84#make check
85%endif
86
87%install
88rm -rf $RPM_BUILD_ROOT
89make DESTDIR=$RPM_BUILD_ROOT install
90rm -f $RPM_BUILD_ROOT/%{_libdir}/*.la
91mkdir $RPM_BUILD_ROOT/%{_datadir}/myspell
92%find_lang %{name}
93
94%clean
95rm -rf $RPM_BUILD_ROOT
96
97#post -p /sbin/ldconfig
98
99#postun -p /sbin/ldconfig
100
101%files -f %{name}.lang
102%defattr(-,root,root,-)
103%doc README README.myspell COPYING COPYING.LESSER COPYING.MPL AUTHORS AUTHORS.myspell license.hunspell license.myspell THANKS
104%{_libdir}/*.dll
105%{_datadir}/myspell
106%{_bindir}/hunspell.exe
107%{_mandir}/man1/hunspell.1.gz
108%lang(hu) %{_mandir}/hu/man1/hunspell.1.gz
109
110%files devel
111%defattr(-,root,root,-)
112%{_includedir}/%{name}
113%{_libdir}/*_dll.a
114%{_bindir}/affixcompress
115%{_bindir}/makealias
116%{_bindir}/munch.exe
117%{_bindir}/unmunch.exe
118%{_bindir}/analyze.exe
119%{_bindir}/chmorph.exe
120%{_bindir}/hzip.exe
121%{_bindir}/hunzip.exe
122%{_bindir}/ispellaff2myspell
123%{_bindir}/wordlist2hunspell
124%{_bindir}/wordforms
125%{_libdir}/pkgconfig/hunspell.pc
126%{_mandir}/man1/hunzip.1.gz
127%{_mandir}/man1/hzip.1.gz
128%{_mandir}/man3/hunspell.3.gz
129%{_mandir}/man5/hunspell.5.gz
130
131%changelog
132* Tue Sep 26 2017 Silvan Scherrer <silvan.scherrer@aroa.ch> - 1.6.2-1
133- update to upstream version 1.6.2
134- fix hunspell.exe to find dictionaries in the path
135
136* Mon Apr 10 2017 Silvan Scherrer <silvan.scherrer@aroa.ch> - 1.6.1-2
137- remove wrong ldconfig in post and postun
138
139* Fri Apr 07 2017 Silvan Scherrer <silvan.scherrer@aroa.ch> - 1.6.1-1
140- initial port
Note: See TracBrowser for help on using the repository browser.