535abd0
# TODO:
535abd0
# - add subpackages for:
6e9576f
#       - OmegaT-LanguageTool-src_0.4-2.3.zip
6e9576f
#       - OmegaT-Scripting-src_0.5-2.5.0_03.zip
6e9576f
#       - OmegaT-tokenizers-src_0.4_2-2.1.zip
535abd0
# - fix desktop-install warning
b113914
# - new logo
b113914
# - update l10n.es
535abd0
6e9576f
# fixing #901660
baec980
%global debug_package  %{nil}
6e9576f
6e9576f
Name:           OmegaT
6e9576f
%global namer   omegat
6e9576f
Summary:        Computer Aid Translation tool
6e9576f
Version:        2.6.1
b113914
%global versionr 2.6.1_01_Beta
6e9576f
#Release:       1%{?dist}
6e9576f
Release:        0.7.Beta%{?dist}
6e9576f
Source0:        http://downloads.sourceforge.net/omegat/%{name}_%{versionr}_Source.zip
6e9576f
Source2:        OmegaT-lib-mnemonics-build.xml
6e9576f
Source3:        OmegaT-build.xml
6e9576f
Url:            http://www.omegat.org/
6e9576f
Group:          Applications/Text
6e9576f
6e9576f
BuildRequires:  ant, java-devel >= 1.6.0, jpackage-utils
6e9576f
BuildRequires:  desktop-file-utils, dos2unix
6e9576f
BuildRequires:  htmlparser, vldocking >= 2.1.4
6e9576f
BuildRequires:  jna
6e9576f
BuildRequires:  ws-jaxme
6e9576f
BuildRequires:  swing-layout
a884d67
BuildRequires:  hunspell <= 1.4.0
1bf3017
6e9576f
BuildRequires:  svnkit >= 1.7.5
6e9576f
BuildRequires:  jsch
6e9576f
BuildRequires:  sqljet >= 1.1.4
535abd0
# OmegaT brings org.eclipse.jgit-1.2.0.201112221803-r.jar but Fedora is 1.1.0
6e9576f
BuildRequires:  jgit
6e9576f
BuildRequires:  antlr3-tool
6e9576f
6e9576f
Requires:       java, jpackage-utils
6e9576f
Requires:       vldocking >= 2.1.4
6e9576f
Requires:       htmlparser
6e9576f
Requires:       hunspell <= 1.4.0
6e9576f
Requires:       jna
6e9576f
Requires:       swing-layout
6e9576f
Requires:       ws-jaxme
6e9576f
Requires:       svnkit
6e9576f
Requires:       jsch
6e9576f
Requires:       sqljet
6e9576f
Requires:       jgit
6e9576f
Requires:       antlr3-java
6e9576f
6e9576f
License:        GPLv2+
1bf3017
# http://svn.debian.org/wsvn/pkg-java/trunk04-get-rid-of-MRJAdapter.patch
6e9576f
Patch1:         OmegaT-04-get-rid-of-MRJAdapter.patch
6e9576f
Patch2:         OmegaT-help-path.patch
1bf3017
# http://svn.debian.org/wsvn/pkg-java/trunk/omegat/debian/patches/05-remove-jmyspell-alternative.patch
6e9576f
Patch3:         OmegaT-05-remove-jmyspell-alternative.patch
6e9576f
Patch4:         OmegaT-06-use-system-hunspell.patch
535abd0
535abd0
# reported at http://sourceforge.net/mailarchive/forum.php?thread_name=CAARR2rZ2uT1KOrLLVF9wdS6Ybq_sU_o1u08U54BLzxqxZoyRUQ%40mail.gmail.com&forum_name=omegat-development
6e9576f
Patch5:         OmegaT-07-use-openjdk-swingworker.patch
f406426
f406426
%description
f406426
OmegaT is a free translation memory application written in Java.
f406426
It is a tool intended for professional translators. It does not
f406426
translate for you!
f406426
f406426
OmegaT has the following features:
f406426
f406426
 * Fuzzy matching
f406426
 * Match propagation
f406426
 * Simultaneous processing of multiple-file projects
f406426
 * Simultaneous use of multiple translation memories
f406426
 * External glossaries
f406426
 * Document file formats:
6e9576f
        XHTML and HTML
6e9576f
        Microsoft Office 2007 XML
6e9576f
        OpenOffice.org/StarOffice
6e9576f
        XLIFF (Okapi)
6e9576f
        MediaWiki (Wikipedia)
6e9576f
        Plain text
f406426
 * Unicode (UTF-8) support: can be used with non-Latin alphabets
f406426
 * Support for right-to-left languages
f406426
 * Compatible with other translation memory applications (TMX)
f406426
f406426
%prep
f406426
%setup -q -c -n %{name}-%{version}
f406426
%patch1 -p1
f406426
%patch2 -p1
1bf3017
%patch3 -p1
1bf3017
%patch4 -p1
a884d67
%ifarch x86_64  # get rids the hardlink to hunspell 
a884d67
sed -i -e "s|/usr/lib/libhunspell|/usr/lib64/libhunspell|g" src/org/omegat/util/OConsts.java
a884d67
%endif
a884d67
7cfe9d4
%patch5 -p1
f406426
f406426
# not needed outside Netbeans
1bf3017
rm nbproject/org-netbeans-modules-java-j2seproject-copylibstask.jar
f406426
f406426
# clean dependencies:
535abd0
rm lib/svnkit-1.7.5.jar
535abd0
rm lib/jsch-0.1.46.jar
535abd0
rm lib/sqljet-1.1.3.jar
535abd0
rm lib/org.eclipse.jgit-1.2.0.201112221803-r.jar
535abd0
rm lib/antlr-runtime-3.4.jar
535abd0
535abd0
# is not really used??
535abd0
rm lib/sjsxp-1.0.2.jar
535abd0
535abd0
# seems to be included in svnkit:
535abd0
rm lib/sequence-library-1.0.2.jar 
535abd0
1bf3017
rm lib/vldocking_2.1.4.jar
f406426
rm lib/htmlparser.jar
f406426
rm lib/sources/htmlparser1_6_20060610.zip-source.zip
1bf3017
rm lib/jmyspell-core-1.0.0-beta-2.jar
1bf3017
rm lib/jna.jar
1bf3017
rm -r native/*
1bf3017
rm lib/swing-layout-1.0.jar
1bf3017
1bf3017
###  JAXB dependencies
1bf3017
rm lib/activation.jar
1bf3017
rm lib/jaxb-api.jar
1bf3017
rm lib/jaxb-impl.jar
1bf3017
rm lib/jsr173_1.0_api.jar 
1bf3017
rm lib/sources/JAXB/jsr173_1.0_src.jar
f406426
f406426
# not needed outside MacOSX:
f406426
rm lib/MRJAdapter.jar
f406426
rm lib/sources/MRJAdapter-source.zip
f406426
f406426
# not needed outside windows
f406426
rm -rf release/win32-specific/
f406426
7cfe9d4
# seems they are not really needed... 
1bf3017
rm -rf ./test/lib/junit-4.4.jar
1bf3017
rm -rf ./test/lib/xmlunit-1.1.jar
1bf3017
7cfe9d4
## gen/lib/jaxb-xjc.jar
7cfe9d4
rm -rf gen/lib/jaxb-xjc.jar
7cfe9d4
535abd0
# using the internal openjdk one:
7cfe9d4
rm -rf lib/swing-worker-1.2.jar
f406426
f406426
%build
f406426
a884d67
# cleaning:
1bf3017
sed -i '/class-path/I d' manifest-template.mf
1bf3017
f406426
pushd lib-mnemonics
f406426
cp %{SOURCE2} build.xml
f406426
ant dist
f406426
popd
f406426
f406426
cp %{SOURCE3} build.xml
f406426
ant dist
f406426
f406426
%install 
535abd0
rm -Rf %{buildroot}
535abd0
535abd0
#install our jar file
f406426
#make some install dirs
535abd0
mkdir -p %{buildroot}%{_bindir}
535abd0
mkdir -p %{buildroot}%{_javadir}
535abd0
mkdir -p %{buildroot}%{_datadir}/%{namer}/docs
535abd0
mkdir -p %{buildroot}%{_datadir}/%{namer}/images
f406426
535abd0
install -pm  0755 dist/OmegaT.jar %{buildroot}%{_javadir}/OmegaT-%{version}.jar
535abd0
install -pm  0755 lib-mnemonics/dist/lib-mnemonics.jar %{buildroot}%{_javadir}/OmegaT-lib-mnemonics-%{version}.jar
f406426
535abd0
pushd %{buildroot}%{_javadir}
6e9576f
        ln -s OmegaT-%{version}.jar %{buildroot}%{_javadir}/OmegaT.jar
6e9576f
        ln -s OmegaT-lib-mnemonics-%{version}.jar %{buildroot}%{_javadir}/lib-mnemonics.jar
f406426
popd
f406426
535abd0
cp -pR release/index.html docs/ images/ %{buildroot}%{_datadir}/%{namer}/
f406426
535abd0
%{jpackage_script       \
535abd0
org.omegat.Main         \
535abd0
""                      \
535abd0
""                      \
535abd0
OmegaT:svnkit:jsch:sqljet:antlr3-runtime:jgit/jgit:htmlparser:vldocking:jna:lib-mnemonics:jaxme/jaxme2:jaxme/jaxme2-rt:jaxme/jaxmejs:jaxme/jaxmepm:jaxme/jaxmexs:swing-layout \
535abd0
%{namer}                \
535abd0
true                    \
535abd0
}
f406426
f406426
f406426
#Menu entry
f406426
install -d -m755 %{buildroot}%{_datadir}/applications
f406426
f406426
cat > %{buildroot}%{_datadir}/applications/fedora-%{namer}.desktop <
f406426
[Desktop Entry]
f406426
Encoding=UTF-8
f406426
Name=%name
f406426
Exec=%{namer}
f406426
Icon=/usr/share/omegat/images/OmegaT.png
f406426
Comment=Computer Aid Translation tool
f406426
Comment[es]=Herramienta de asistencia a la traducción
f406426
Terminal=false
f406426
Type=Application
f406426
Categories=Translation;Java;Office;
f406426
X-AppInstall-Package=%{namer}
f406426
EOF
f406426
f406426
desktop-file-install  --vendor "fedora" --dir=%{buildroot}%{_datadir}/applications/ %{buildroot}%{_datadir}/applications/fedora-%{namer}.desktop 
f406426
f406426
# fixing end of line making rpmlint happy
ef92c47
dos2unix -k -f release/*.txt
f406426
b113914
f406426
%files
f406426
%dir %{_datadir}/%{namer}
f406426
%{_datadir}/%{namer}/*
f406426
%{_bindir}/*
f406426
%{_javadir}/*
f406426
%{_datadir}/applications/fedora-%{namer}.desktop
f406426
f406426
%doc ./release/changes.txt release/doc-license.txt release/license.txt release/readme*.txt release/join.html
f406426
1bf3017
1bf3017
%changelog
b006475
* Sat Jan 19 2013 Ismael Olea <ismael@olea.org> - 2.6.1-0.7.Beta
6e9576f
- removing empty debuginfo file generation, #901660
6e9576f
- substituing tabs with spaces
b113914
d8216d9
* Mon Dec 10 2012 Ismael Olea <ismael@olea.org> - 2.6.1-0.6.Beta
d8216d9
- update hunspell patch to 1.3.*
a884d67
- adding a buildrequire to break builds when major change in hunspell
a884d67
- tuning the external hunspell dependency on x86_64 and removed the noarch feature due to this
a884d67
- thus, fixing #884212
d8216d9
b113914
* Fri Oct 5 2012 Ismael Olea <ismael@olea.org> - 2.6.1-0.5.Beta
b113914
- update to 2.6.1_01_Beta
b113914
- adjusting requires
b113914
3da871e
* Fri Oct 5 2012 Ismael Olea <ismael@olea.org> - 2.6.1-0.4.Beta
3da871e
- tuning the precise buildrequires versions
3da871e
535abd0
* Wed Sep 26 2012 Ismael Olea <ismael@olea.org> - 2.6.1-0.3_Beta
535abd0
- update to 2.6.1_Beta
535abd0
535abd0
* Thu Sep 24 2012 Ismael Olea <ismael@olea.org> - 2.6.0-0.2.04_Beta
535abd0
- removing external omegat.sh using jpackage_script
535abd0
- substituing OmegaT-06-use-external-hunspell.patch with OmegaT-06-use-system-hunspell.patch
ae34678
535abd0
* Thu Sep 23 2012 Ismael Olea <ismael@olea.org> - 2.6.0-0.1.04_Beta
535abd0
- updating to 2.6.0_04_Beta
535abd0
- changed $RPM_BUILD_ROOT into % buildroot
5bf3002
f5f0478
* Tue Feb 6 2012 Ismael Olea <ismael@olea.org> - 2.3.0_06-1
f5f0478
- updating to 2.3.0_06
f5f0478
- removing patch OmegaT-fix-encoding-java7.patch since is now in upstream
f5f0478
- cosmetic changes
f5f0478
19f5665
* Thu Jan 12 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3.0_03-3
19f5665
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
19f5665
918f094
* Tue Nov 22 2011 <ismael@olea.org > - 2.3.0_03-2
918f094
- added OmegaT-fix-encoding-java7.patch:
918f094
  java 1.7 now managed as error encoding typos
918f094
bc2a9d8
* Mon Nov 21 2011 <ismael@olea.org > - 2.3.0_03-1
bc2a9d8
- updated to 2.3.0_03
bc2a9d8
ef92c47
* Tue Apr 19 2011 <ismael@olea.org> - 2.2.3-0.2.04_Beta
ef92c47
- updated to 2.2.3_04_Beta
ef92c47
- minor spec cleaning
ef92c47
7cfe9d4
* Thu Dec 29 2010 <ismael@olea.org> - 2.2.3-0.1.Beta
7cfe9d4
- updated to 2.2.3_Beta
7cfe9d4
- fixed hunspell integration
7cfe9d4
- swing-worker patch
7cfe9d4
1bf3017
* Wed Aug 11 2010 Ismael Olea <ismael@olea.org> 2.0.5_04-1
1bf3017
- updating to 2.0.5_04
1bf3017
- removing references to javadoc generation
1bf3017
- removing support for jmyspell (from Tiago's OmegaT-05-remove-jmyspell-alternative.patch)
1bf3017
- using local hunspell (from Tiago's OmegaT-06-use-external-hunspell.patch )
1bf3017
- spec cleaning
1bf3017
eaac0f8
* Mon Jul 27 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.7.3_04-5
eaac0f8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
eaac0f8
0174431
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.7.3_04-4
0174431
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
0174431
a8a610a
* Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.7.3_04-3
a8a610a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
a8a610a
7cfe9d4
* Wed Nov 26 2008 Ismael Olea <ismael@olea.org> 2.0.0_Beta-2
7cfe9d4
- Porting MRJAdapter removing patch
7cfe9d4
- Porting OmegaT-help-path.patch from http://svn.debian.org/wsvn/pkg-java/trunk/omegat/debian/patches/03-location-of-help-files.dpatch?op=file&rev=0&sc=0)
7cfe9d4
7cfe9d4
* Wed Nov 26 2008 Ismael Olea <ismael@olea.org> 2.0.0_Beta-1
7cfe9d4
- First 2.0 beta version
7cfe9d4
4545a7c
4545a7c
* Fri Nov 21 2008 Ismael Olea <ismael@olea.org> 1.7.3_04-2
4545a7c
- stupid new release caused by my fault
4545a7c
4545a7c
* Fri Nov 21 2008 Ismael Olea <ismael@olea.org> 1.7.3_04-1
4545a7c
- updating to 1.7.3_04
4545a7c
0148017
* Wed Nov 18 2008 Ismael Olea <ismael@olea.org> 1.7.3_03-6
0148017
- Fixing htmlparser non-present dependency (bug #471573)
0148017
f406426
* Thu Sep 18 2008 Ismael Olea <ismael@olea.org> 1.7.3_03-5
f406426
- QA changes
f406426
f406426
* Wed Sep 17 2008 Ismael Olea <ismael@olea.org> 1.7.3_03-4
f406426
- minor and cosmetic changes
f406426
f406426
* Wed Aug 27 2008 Ismael Olea <ismael@olea.org> 1.7.3_03-3olea
f406426
- new build.xml for removing org-netbeans-modules-java-j2seproject-copylibstask.jar dependency
f406426
- not javadoc support now
f406426
- OmegaT-ant.properties not needed by this build.xml
f406426
f406426
* Wed Aug 27 2008 Ismael Olea <ismael@olea.org> 1.7.3_03-2olea
f406426
- cleaning dependencies, apparently running, lack paths configs
f406426
f406426
* Tue Aug 26 2008 Ismael Olea <ismael@olea.org> 1.7.3_03-1olea
f406426
- updating to 1.7.3_03 version
f406426
f406426
* Fri Jul 4 2008 Ismael Olea <ismael@olea.org> 1.7.3_02-1olea
f406426
- updating to 1.7.3_02 version
f406426
f406426
* Mon Feb 11 2008 Ismael Olea <ismael@olea.org> 1.7.3-5olea
f406426
- fixing according to https://bugzilla.redhat.com/show_bug.cgi?id=428798#c3
f406426
- comments on https://bugzilla.redhat.com/show_bug.cgi?id=428798#c4
f406426
f406426
* Sun Feb 10 2008 Ismael Olea <ismael@olea.org> 1.7.3-4olea
f406426
- fixing according to https://bugzilla.redhat.com/show_bug.cgi?id=428798#c1
f406426
f406426
* Mon Jan 21 2008 Ismael Olea <ismael@olea.org> 1.7.3-3olea
f406426
- rpmlinting
f406426
f406426
* Wed Jan 9 2008 Ismael Olea <ismael@olea.org> 1.7.3-2olea
f406426
- Compiling from sources
f406426
f406426
* Wed Jan 9 2008 Ismael Olea <ismael@olea.org> 1.7.3-1olea
f406426
- updating to 1.7.3
f406426
f406426
* Wed Jan 9 2008 Ismael Olea <ismael@olea.org> 1.7.2-1olea
f406426
- compiling on Fedora
f406426
f406426
* Fri Nov 12 2007 Patred Theknight <edupclos@gmail.com>1.7.2-1pclos_edulos
f406426
- Initial Build