Compare commits

..

No commits in common. "rawhide" and "f20" have entirely different histories.

6 changed files with 231 additions and 1 deletions

3
.gitignore vendored Normal file
View file

@ -0,0 +1,3 @@
weka-3-6-2.zip
/weka-3-6-7.zip
/weka-3-6-8.zip

View file

@ -1 +0,0 @@
Orphaned for 6+ weeks

1
sources Normal file
View file

@ -0,0 +1 @@
8651d34e0e119750047b482aea35f359 weka-3-6-8.zip

View file

@ -0,0 +1,14 @@
--- build.xml.orig 2010-01-16 17:30:19.000000000 +0100
+++ build.xml 2010-01-16 17:30:26.000000000 +0100
@@ -90,11 +90,6 @@
</copy>
<rmic base="${build}/classes"
classname="weka.experiment.RemoteEngine"/>
- <unzip src="${lib}/java-cup.jar" dest="${build}/classes">
- <patternset>
- <include name="java_cup/runtime/**/*"/>
- </patternset>
- </unzip>
</target>
<!-- Make the javadocs -->

13
weka.desktop Normal file
View file

@ -0,0 +1,13 @@
[Desktop Entry]
Name=Weka
GenericName=Waikato Environment for Knowledge Analysis
GenericName[de]=Waikato - System für Wissensanalyse
GenericName[cs]=Waikato - systém pro analýzu znalostí
Comment=Start Weka
Comment[de]=Weka starten
Comment[cs]=Spustit Weku
Exec=weka
Terminal=false
Type=Application
Icon=weka
Categories=Education;Science;ArtificialIntelligence;

200
weka.spec Normal file
View file

@ -0,0 +1,200 @@
%global _version 3-6-8
# whether to run jUnit tests, caution: takes horribly long
# currently disabled as the tests fail, filed in upstream's bugtracker:
# https://sourceforge.net/tracker2/?func=detail&aid=2648813&group_id=5091&atid=105091
# %%global _with_tests 1
Name: weka
Version: 3.6.8
Release: 3%{?dist}
Summary: Waikato Environment for Knowledge Analysis
Group: Applications/Engineering
License: GPLv2+
URL: http://www.cs.waikato.ac.nz/ml/%{name}/
Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{_version}.zip
Source1: weka.desktop
Patch0: weka-3.6.2-build.xml.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
BuildRequires: java-devel >= 1:1.6.0
BuildRequires: jpackage-utils
BuildRequires: ant
BuildRequires: desktop-file-utils
BuildRequires: ImageMagick
BuildRequires: junit
BuildRequires: jflex
BuildRequires: java_cup >= 1:0.11a
Requires: java >= 1:1.6.0
Requires: jpackage-utils
Requires: libsvm-java
Requires: java_cup
Requires: hsqldb
Requires: postgresql-jdbc
Requires: mysql-connector-java
Requires: javasqlite
%description
Weka is a collection of machine learning algorithms for data mining tasks.
The algorithms can either be applied directly to a dataset or called from
your own Java code. Weka contains tools for data pre-processing,
classification, regression, clustering, association rules, and visualization.
It is also well-suited for developing new machine learning schemes.
%package javadoc
Summary: Javadocs for %{name}
Group: Documentation
Requires: %{name} = %{version}-%{release}
Requires: jpackage-utils
%description javadoc
This package contains the API documentation for %{name}.
%prep
%setup -q -n %{name}-%{_version}
# unzip the sources jar
unzip %{name}-src.jar
%patch0
# remove prebuilt jars
find -name '*.jar' -delete -o -name '*.class' -delete
# we won't run JUnit tests and 128m for making javadocs was not enough:( + fix build failure on missing Mac pieces
sed -i -e 's/name="lib" value="lib"/name="lib" value="src"/' -e 's/maxmemory="128m"/maxmemory="256m"/'\
-e 's#<copy todir="${build}/classes/weka/gui" file="resources/MacArffOpenFilesHandler.class"/>##' build.xml
%build
export CLASSPATH=$(build-classpath java_cup java_cup-runtime jflex)
ant compile
%if %{?_with_tests:1}%{!?_with_tests:0}
%check
export CLASSPATH=/usr/share/java/junit.jar ant run_tests
%endif
%install
rm -rf $RPM_BUILD_ROOT
# jar
ant exejar
mkdir -p $RPM_BUILD_ROOT%{_javadir}
cp -p dist/%{name}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar
# javadoc
ant docs
mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{name}
cp -rp doc/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}
# wrapper script
mkdir -p $RPM_BUILD_ROOT%{_bindir}
cat > $RPM_BUILD_ROOT%{_bindir}/%{name} <<-EOF
#!/bin/bash
. /usr/share/java-utils/java-functions
MAIN_CLASS="weka.gui.GUIChooser"
set_classpath "weka.jar"
set_classpath "libsvm.jar"
set_classpath "java_cup.jar"
set_classpath "postgresql-jdbc"
set_classpath "hsqldb"
set_classpath "mysql-connector-java"
export CLASSPATH="\$CLASSPATH:%{_libdir}/javasqlite/sqlite.jar"
run "$@"
EOF
chmod a+x $RPM_BUILD_ROOT%{_bindir}/%{name}
# desktop file and icon
desktop-file-install \
--dir=${RPM_BUILD_ROOT}%{_datadir}/applications %{SOURCE1}
# convert icon to png
convert %{name}.ico %{name}.png
install -Dp %{name}-0.png ${RPM_BUILD_ROOT}%{_datadir}/icons/hicolor/32x32/apps/%{name}.png
%clean
rm -rf $RPM_BUILD_ROOT
%post
touch --no-create %{_datadir}/icons/hicolor
if [ -x %{_bindir}/gtk-update-icon-cache ] ; then
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
fi
%postun
touch --no-create %{_datadir}/icons/hicolor
if [ -x %{_bindir}/gtk-update-icon-cache ] ; then
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
fi
%files
%defattr(-,root,root,-)
%{_javadir}/%{name}.jar
%{_bindir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/32x32/apps/%{name}.png
%doc documentation.html
%doc documentation.css
%doc WekaManual.pdf
%doc COPYING
%doc README
%doc changelogs
%doc data
%files javadoc
%defattr(-,root,root,-)
%{_javadocdir}/%{name}
%changelog
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.6.8-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.6.8-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Sun Aug 19 2012 Miloš Jakubíček <xjakub@fi.muni.cz> - 3.6.8-1
- Update to 3.6.8
* Sun Jul 22 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.6.7-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Tue Jul 10 2012 Miloš Jakubíček <xjakub@fi.muni.cz> - 3.6.7-1
- Update to 3.6.7
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.6.2-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.6.2-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Mon May 03 2010 Miloš Jakubíček <xjakub@fi.muni.cz> - 3.6.2-4
- Fix typo causing $CLASSPATH in %%{_bindir}/weka to be expanded during the build
* Fri Apr 30 2010 Miloš Jakubíček <xjakub@fi.muni.cz> - 3.6.2-3
- java_cup, hsqldb, postgresql-jdbc, mysql-connector-java, sqlite added to CLASSPATH and required
(resolve BZ#587596)
* Wed Mar 03 2010 Miloš Jakubíček <xjakub@fi.muni.cz> - 3.6.2-2
- Added Requires: libsvm-java (BZ#523684)
* Sat Jan 16 2010 Milos Jakubicek <xjakub@fi.muni.cz> - 3.6.2-1
- Update to 3.6.2
- Fix libsvm usage (resolves BZ#523684)
- Fix removing jars
- Added BR: jflex, java_cup >= 1:0.11a
* Mon Jul 27 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.6.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
* Sat Feb 28 2009 Milos Jakubicek <xjakub@fi.muni.cz> - 3.6.0-3
- Fixed desktop file name
- Added optional running junit tests into %%check, added BR:junit
- Fixed changelog entry
* Wed Feb 25 2009 Milos Jakubicek <xjakub@fi.muni.cz> - 3.6.0-2
- Running gtk-update-icon-cache
- Converting icon to png, added BR:ImageMagick, changed icon path
in desktop file "weka" only
- java/java-devel R: and BR: made versioned to >= 1:1.6.0
- removed vendor tag in desktop-file-install according to the guidelines
for new packages.
* Wed Jan 14 2009 Milos Jakubicek <xjakub@fi.muni.cz> - 3.6.0-1
- Initial release.