f3e103
Name:           wordnet
f3e103
Version:        3.0
f3e103
Release:        33%{?dist}
f3e103
Summary:        A lexical database for the English language
f3e103
f3e103
License:        MIT and GPLv2+
f3e103
URL:            http://wordnet.princeton.edu/
f3e103
Source0:        http://wordnetcode.princeton.edu/%{version}/WordNet-%{version}.tar.bz2
f3e103
# Updated database
f3e103
Source1:        http://wordnetcode.princeton.edu/wn3.1.dict.tar.gz
f3e103
Patch0:         wordnet-3.0-CVE-2008-2149.patch
f3e103
Patch1:         wordnet-3.0-CVE-2008-3908.patch
f3e103
Patch2:         wordnet-3.0-fix_man.patch
f3e103
Patch3:         wordnet-3.0-fix_resourcedir_path.patch
f3e103
Patch4:         wordnet-3.0-src_stubs_c.patch
f3e103
# wordnet-3.0-wishwn_manpage.patch is GPLv2+
f3e103
Patch5:         wordnet-3.0-wishwn_manpage.patch
f3e103
Patch6:         wordnet-3.0-use_system_tk_headers.patch
f3e103
Patch7:         wordnet-3.0-libtool.patch
f3e103
# Bug #585206
f3e103
Patch8:         wordnet-3.0-error_message.patch
f3e103
# Bug #1037386
f3e103
Patch9:         wordnet-3.0-Pass-compilation-with-Werror-format-security.patch
f3e103
BuildRequires:  automake >= 1.8
f3e103
BuildRequires:  coreutils
f3e103
BuildRequires:  gcc
f3e103
BuildRequires:  gzip
f3e103
BuildRequires:  libtool
f3e103
BuildRequires:  make
f3e103
BuildRequires:  tar
f3e103
BuildRequires:  tcl-devel
f3e103
BuildRequires:  tk-devel
f3e103
f3e103
%description
f3e103
WordNet is a large lexical database of English, developed under the direction
f3e103
of George A. Miller. Nouns, verbs, adjectives and adverbs are grouped into sets
f3e103
of cognitive synonyms (synsets), each expressing a distinct concept. Synsets
f3e103
are interlinked by means of conceptual-semantic and lexical relations. The
f3e103
resulting network of meaningfully related words and concepts can be navigated
f3e103
with the browser. WordNet is also freely and publicly available for download.
f3e103
WordNet's structure makes it a useful tool for computational linguistics and
f3e103
natural language processing.
f3e103
f3e103
f3e103
%package browser
f3e103
Summary:    Tk browser for WordNet
f3e103
Requires:   %{name}%{?_isa} = %{version}-%{release}
f3e103
Requires:   font(:lang=en)
f3e103
f3e103
%description browser
f3e103
This package contains graphical browser for WordNet database.
f3e103
f3e103
f3e103
%package devel
f3e103
Summary:    The development libraries and header files for WordNet
f3e103
Requires:   %{name} = %{version}-%{release}
f3e103
f3e103
%description devel
f3e103
This package contains the libraries and header files required to create
f3e103
applications based on WordNet.
f3e103
f3e103
f3e103
%package doc
f3e103
Summary:    Manual pages for WordNet in alternative formats
f3e103
BuildArch:  noarch
f3e103
f3e103
%description doc
f3e103
This package contains manual pages for WordNet package in HTML, PDF,
f3e103
and PostScript format.
f3e103
f3e103
f3e103
%prep
f3e103
%setup -q -n WordNet-%{version}
f3e103
%patch0 -p1 -b .cve-2008-2149
f3e103
%patch1 -p1 -b .cve-2008-3908
f3e103
%patch2 -p1 -b .fix_man
f3e103
%patch3 -p1 -b .fix_resourcedir_path
f3e103
%patch4 -p1 -b .src_stubs_c
f3e103
%patch5 -p1 -b .wishwn_manpage
f3e103
sed -e '/man_MANS/ s/$/ wishwn.1/' -i doc/man/Makefile.am
f3e103
%patch6 -p1 -b .use_system_tk_headers
f3e103
%patch7 -p1 -b .libtool
f3e103
%patch8 -p1 -b .error_message
f3e103
%patch9 -p1 -b .format
f3e103
# delete the include/tk dir, since we do not use the included tk headers
f3e103
rm -rf include/tk
f3e103
# Update a database
f3e103
tar -xozf %{SOURCE1}
f3e103
# Remove database byproducts brought by the database update
f3e103
rm -rf dict/dbfiles
f3e103
f3e103
f3e103
%build
f3e103
libtoolize && aclocal
f3e103
autoupdate
f3e103
autoreconf -i
f3e103
%if 0%{?fedora} >= 21 || 0%{?rhel} > 7
f3e103
export CFLAGS="%{?optflags} -DUSE_INTERP_RESULT"
f3e103
export CXXFLAGS="%{?optflags} -DUSE_INTERP_RESULT"
f3e103
%endif #0%{?fedora} >= 21 || 0%{?rhel} > 7
f3e103
%configure --enable-static=no --prefix=%{_datadir}/wordnet-%{version}/
f3e103
make %{?_smp_mflags}
f3e103
f3e103
f3e103
%install
f3e103
make install DESTDIR=$RPM_BUILD_ROOT
f3e103
# delete the libWN.la files (reasoning in the packaging guidelines)
f3e103
rm -f  $RPM_BUILD_ROOT%{_libdir}/libWN.la
f3e103
# Remove duplicate copies of docs installed by make install
f3e103
rm -rf $RPM_BUILD_ROOT%{_datadir}/%{name}-%{version}/doc
f3e103
# Remove useless Makefiles installed by %%doc
f3e103
rm -rf doc/{html,ps,pdf}/Makefile*
f3e103
f3e103
f3e103
%ldconfig_scriptlets
f3e103
f3e103
%files
f3e103
%doc AUTHORS COPYING ChangeLog README
f3e103
%{_bindir}/wn
f3e103
%{_mandir}/man1/grind.1.gz
f3e103
%{_mandir}/man1/wn.1.gz
f3e103
%{_mandir}/man1/wnintro.1.gz
f3e103
%{_mandir}/man5/*.5.gz
f3e103
%{_mandir}/man7/*.7.gz
f3e103
%{_datadir}/%{name}-%{version}/
f3e103
%exclude %{_datadir}/%{name}-%{version}/lib/wnres/
f3e103
%{_libdir}/libWN.so.*
f3e103
f3e103
%files browser
f3e103
%{_bindir}/wishwn
f3e103
%{_bindir}/wnb
f3e103
%{_mandir}/man1/wishwn.1.gz
f3e103
%{_mandir}/man1/wnb.1.gz
f3e103
%{_datadir}/%{name}-%{version}/lib/wnres/
f3e103
f3e103
%files devel
f3e103
%{_mandir}/man3/*.3.gz
f3e103
%{_includedir}/wn.h
f3e103
%{_libdir}/libWN.so
f3e103
f3e103
%files doc
f3e103
%doc COPYING doc/{html,ps,pdf}
f3e103
f3e103
f3e103
%changelog
f3e103
* Fri Mar 23 2018 Petr Pisar <ppisar@redhat.com> - 3.0-33
f3e103
- Modernize spec file
f3e103
- Update database to version 3.1
f3e103
f3e103
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.0-32
f3e103
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
f3e103
f3e103
* Wed Jan 24 2018 Merlin Mathesius <mmathesi@redhat.com> - 3.0-31
f3e103
- Cleanup spec file conditionals
f3e103
f3e103
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.0-30
f3e103
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
f3e103
f3e103
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.0-29
f3e103
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
f3e103
f3e103
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.0-28
f3e103
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
f3e103
f3e103
* Fri Feb 05 2016 Fedora Release Engineering <releng@fedoraproject.org> - 3.0-27
f3e103
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
f3e103
f3e103
* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0-26
f3e103
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
f3e103
f3e103
* Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0-25
f3e103
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
f3e103
f3e103
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0-24
f3e103
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
f3e103
f3e103
* Sat May 31 2014 Björn Esser <bjoern.esser@gmail.com> - 3.0-23
f3e103
- fix build with tcl-8.6 (#1102111)
f3e103
- append `-DUSE_INTERP_RESULT` to C[XX]FLAGS on Fedora >= 21
f3e103
f3e103
* Wed May 21 2014 Jaroslav Škarvada <jskarvad@redhat.com> - 3.0-22
f3e103
- Rebuilt for https://fedoraproject.org/wiki/Changes/f21tcl86
f3e103
f3e103
* Wed Dec 04 2013 Petr Pisar <ppisar@redhat.com> - 3.0-21
f3e103
- Pass compilation with -Werror=format-security (bug #1037386)
f3e103
f3e103
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0-20
f3e103
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
f3e103
f3e103
* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0-19
f3e103
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
f3e103
f3e103
* Thu Sep 06 2012 Petr Pisar <ppisar@redhat.com> - 3.0-18
f3e103
- wnb requires a font to start
f3e103
- Move Tk browser to sub-package wordnet-browser
f3e103
- Move alternative manual pages to wordnet-doc package
f3e103
- Do not package INSTALL instructions and correct URL
f3e103
- Modernize spec file
f3e103
f3e103
* Sun Jul 22 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0-17
f3e103
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
f3e103
f3e103
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0-16
f3e103
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
f3e103
f3e103
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0-15
f3e103
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
f3e103
f3e103
* Mon Nov 29 2010 Petr Pisar <ppisar@redhat.com> - 3.0-14
f3e103
- Remove Makefiles from documentation clashing in multiarch installation
f3e103
  (#658118).
f3e103
f3e103
* Fri Apr 30 2010 Petr Pisar <ppisar@redhat.com> - 3.0-13
f3e103
- Add GPLv2+ license tag because wishwn(1) manual page is GPLv2+-licensed.
f3e103
f3e103
* Wed Apr 28 2010 Petr Pisar <ppisar@redhat.com> - 3.0-12
f3e103
- Devel subpackages requires tcl-devel and tk-devel.
f3e103
- Install wishwn(1) manual page
f3e103
f3e103
* Mon Apr 26 2010 Petr Pisar <ppisar@redhat.com> - 3.0-11
f3e103
- Fix error message printing (#585206)
f3e103
- Fix Source0 URL and Summary typo
f3e103
- Remove libX11-devel and libXft-devel BuildRequires as they are inherited
f3e103
  from tk-devel. Keep tcl-devel as tcl.h is included directly.
f3e103
f3e103
* Mon Jul 27 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0-10
f3e103
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
f3e103
f3e103
* Wed Jun 10 2009 Caolan McNamara <caolanm@redhat.com> - 3.0-9
f3e103
- Fixed fedora BZ 504957 - references to non-existing dirs in wnb
f3e103
f3e103
* Wed May 27 2009 Steven Fernandez <steve@lonetwin.net> - 3.0-8
f3e103
- Fixed issues with the doc files duplication and ownership
f3e103
f3e103
* Wed May 27 2009 Steven Fernandez <steve@lonetwin.net> - 3.0-7
f3e103
- Modified the %%files sections for both packages to only include the link in
f3e103
  the devel package and the .so in the main package.
f3e103
- Added %%pre and %%post sections
f3e103
f3e103
* Wed May 27 2009 Steven Fernandez <steve@lonetwin.net> - 3.0-6
f3e103
- Added commands to build only shared libs and remove libtool's .la files
f3e103
  before packaging
f3e103
f3e103
* Tue May 19 2009 Steven Fernandez <steve@lonetwin.net> - 3.0-5
f3e103
- Added the libtool patch to build libWN.so dynamic lib
f3e103
f3e103
* Wed Feb 18 2009 Steven Fernandez <steve@lonetwin.net> - 3.0-4
f3e103
- Added Tom 'spot' Callaway's patch to not include the tk.h and tkDecls.h from
f3e103
  the upstream source, but instead rely on system tk headers
f3e103
f3e103
* Sun Jan 18 2009 Steven Fernandez <steve@lonetwin.net> - 3.0-3
f3e103
- renamed rpm from WordNet to wordnet to be more consistent with other distos
f3e103
- split the devel package
f3e103
- borrowed more patches from the debian package
f3e103
f3e103
* Tue Jan 13 2009 Steven Fernandez <steve@lonetwin.net> - 3.0-2
f3e103
- patch to fix CVE-2008-3908
f3e103
- Added the wishwn man page from the debian wordnet package
f3e103
f3e103
* Sat Nov 29 2008 Steven Fernandez <steve@lonetwin.net> - 3.0-1
f3e103
- First build for Fedora 10
f3e103