OmegaT/OmegaT.spec

199 lines
5.9 KiB
RPMSpec
Raw Permalink Normal View History

%define rel _03
Name: OmegaT
Version: 2.2.3
Release: 1mamba
Summary: OmegaT® - multiplatform CAT tool
Group: Graphical Desktop/Applications/Development
Vendor: openmamba
Distribution: openmamba
Packager: gil <puntogil@libero.it>
URL: http://www.omegat.org/
Source0: http://downloads.sourceforge.net/omegat/%{name}_%{version}%{?rel}_Source.zip
Source1: omegat.desktop
Source2: OmegaT-lib-mnemonics-build.xml
Source3: OmegaT-build.xml
Source4: OmegaT-script
Patch0: OmegaT-2.0.5-remove-osx-deps.patch
Patch1: OmegaT-2.2.3-docsdir.patch
Patch2: OmegaT-2.2.3-remove-jmyspell.patch
Patch3: OmegaT-2.2.3-system-hunspell.patch
Patch4: OmegaT-2.2.3-use-openjdk-swingworker.patch
License: GPL
BuildRequires: apache-ant
BuildRequires: apache-ws-jaxme
BuildRequires: desktop-file-utils
BuildRequires: dos2unix
BuildRequires: java-htmlparser1
BuildRequires: java-jna
BuildRequires: java-junit48
BuildRequires: java-openjdk
# TODO rebuild in devel BuildRequires: java-sun-jaxb-2.1-impl == 2.1.7
BuildRequires: java-swing-layout
BuildRequires: java-vldocking
BuildRequires: jpackage-utils
BuildRequires: xmlunit
Requires: apache-ws-jaxme
Requires: hunspell
Requires: java-htmlparser1
Requires: java-jna
Requires: java-swing-layout
Requires: java-vldocking
Requires: jpackage-utils
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
OmegaT® is a free translation memory application written in Java.
It is a tool intended for professional translators.
OmegaT® has the following features:
* Fuzzy matching
* Match propagation
* Simultaneous processing of multiple-file projects
* Simultaneous use of multiple translation memories
* User glossaries with recognition of inflected forms
* Unicode (UTF-8) support: can be used with non-Latin alphabets
* Support for right-to-left languages
* Integral spelling checker
* Compatible with other translation memory applications (TMX)
* Interface to Google Translate
Document file formats include:
* XHTML and HTML
* Microsoft Office XML
* OpenOffice.org/StarOffice
* XLIFF (Okapi)
* MediaWiki (Wikipedia)
* Plain text
%prep
%setup -q -c -n OmegaT-%{version}
%patch0 -p0
%patch1 -p0
%patch2 -p0
%patch3 -p0
%patch4 -p0
for j in $(find . -name "*.jar"); do
mv $j $j.no
done
ln -sf $(build-classpath junit48) test/lib/junit-4.4.jar
ln -sf $(build-classpath xmlunit) test/lib/xmlunit-1.1.jar
#ln -sf $(build-classpath vldocking) lib/vldocking_2.1.4.jar
#ln -sf $(build-classpath jna.jar) lib/jna.jar
#ln -sf $(build-classpath swing-layout) lib/swing-layout-1.0.jar
#ln -sf $(build-classpath htmlparser1) lib/htmlparser.jar
rm -r native/*
# nbproject/org-netbeans-modules-java-j2seproject-copylibstask.jar
# lib/jmyspell-core-1.0.0-beta-2.jar
# OSX dep
# mv ./lib/MRJAdapter.jar ./lib/MRJAdapter.jar.no
rm lib/sources/MRJAdapter-source.zip
# TODO jaxb deps
# lib/jaxb-api.jar
# lib/activation.jar
# lib/jsr173_1.0_api.jar
# lib/jaxb-impl.jar
# gen/lib/jaxb-xjc.jar
# lib/sources/JAXB/jsr173_1.0_src.jar
rm -rf release/win32-specific
sed -i '/class-path/I d' manifest-template.mf
%build
pushd lib-mnemonics
cp %{SOURCE2} build.xml
ant dist
popd
cp %{SOURCE3} build.xml
ant dist
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
mkdir -p %{buildroot}%{_bindir}
mkdir -p %{buildroot}%{_javadir}
mkdir -p %{buildroot}%{_datadir}/omegat/docs
mkdir -p %{buildroot}%{_datadir}/omegat/images
install -pm 755 dist/OmegaT.jar %{buildroot}%{_javadir}/OmegaT-%{version}.jar
install -pm 755 lib-mnemonics/dist/lib-mnemonics.jar %{buildroot}%{_javadir}/OmegaT-lib-mnemonics-%{version}.jar
pushd %{buildroot}%{_javadir}
ln -s OmegaT-%{version}.jar %{buildroot}%{_javadir}/OmegaT.jar
ln -s OmegaT-lib-mnemonics-%{version}.jar %{buildroot}%{_javadir}/OmegaT-lib-mnemonics.jar
ln -s OmegaT-lib-mnemonics-%{version}.jar %{buildroot}%{_javadir}/lib-mnemonics.jar
popd
cp -pR release/index.html docs/ images/ %{buildroot}%{_datadir}/omegat/
install -pm 755 %{SOURCE4} %{buildroot}%{_bindir}/omegat
chmod +x %{buildroot}%{_bindir}/*
for png in 22x22 16x16; do
mkdir -p %{buildroot}%{_datadir}/icons/hicolor/${png}/apps/
convert -geometry $png images/OmegaT.png %{buildroot}%{_datadir}/icons/hicolor/${png}/apps/omegat.png
done
mkdir -p %{buildroot}%{_datadir}/icons/hicolor/32x32/apps/
install -pm 644 images/OmegaT.png %{buildroot}%{_datadir}/icons/hicolor/32x32/apps/omegat.png
mkdir -p %{buildroot}%{_datadir}/pixmaps
install -pm 644 images/OmegaT.png %{buildroot}%{_datadir}/pixmaps/omegat.png
mkdir -p %{buildroot}%{_datadir}/applications
desktop-file-install %{SOURCE1} --mode=644 --dir=%{buildroot}%{_datadir}/applications %{buildroot}%{_datadir}/applications/omegat.desktop
dos2unix -k release/*.txt
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%post
%{_bindir}/update-desktop-database -q %{_datadir}/applications
touch --no-create %{_datadir}/icons/hicolor
%postun
if [ $1 -eq 0 ]; then
touch --no-create %{_datadir}/icons/hicolor
%{_bindir}/gtk-update-icon-cache %{_datadir}/icons/hicolor &> /dev/null || :
fi
%posttrans
%{_bindir}/gtk-update-icon-cache %{_datadir}/icons/hicolor &> /dev/null || :
%files
%defattr(-,root,root)
%{_bindir}/omegat
%{_datadir}/applications/omegat.desktop
%{_datadir}/icons/hicolor/*x*/apps/omegat.png
%{_javadir}/OmegaT-%{version}.jar
%{_javadir}/OmegaT.jar
%{_javadir}/OmegaT-lib-mnemonics-%{version}.jar
%{_javadir}/OmegaT-lib-mnemonics.jar
%{_javadir}/lib-mnemonics.jar
%dir %{_datadir}/omegat
%{_datadir}/omegat/*.html
%{_datadir}/omegat/docs
%{_datadir}/omegat/images
%{_datadir}/pixmaps/omegat.png
%doc release/changes.txt release/doc-license.txt
%doc release/license.txt release/readme*.txt release/join.html
%changelog
* Thu Mar 10 2011 gil <puntogil@libero.it> 2.2.3-1mamba
- update to 2.2.3
* Sun Dec 05 2010 gil <puntogil@libero.it> 2.0.5-1mamba
- package created by autospec