java-gstreamer/java-gstreamer.spec

125 lines
3.5 KiB
RPMSpec
Raw Permalink Normal View History

Name: java-gstreamer
Version: 1.4
Release: 2mamba
Summary: Java interface to the gstreamer framework
Group: System/Libraries/Java
Vendor: openmamba
Distribution: openmamba
Packager: gil <puntogil@libero.it>
URL: http://code.google.com/p/gstreamer-java/
Source: http://gstreamer-java.googlecode.com/files/gstreamer-java-src-%{version}.zip
Patch1: java-gstreamer-1.3-swt-XOverlay.patch
Patch2: java-gstreamer-1.3-XOverlay.patch
Patch3: java-gstreamer-1.4-factory.patch
Patch4: java-gstreamer-1.4-RGBDataFileSink.patch
Patch5: java-gstreamer-1.4-swt.patch
License: GPL, LGPL
BuildRequires: ant-contribb3
BuildRequires: apache-ant
BuildRequires: apache-ant-junit
BuildRequires: libgstreamer-devel
BuildRequires: libgst-plugins-base-devel
BuildRequires: gst-plugins-good-devel
BuildRequires: java-junit48
BuildRequires: java-jna
BuildRequires: jpackage-utils
BuildRequires: eclipse-swt
Requires: libgstreamer >= 0.10.19
Requires: libgst-plugins-base >= 0.10.19
Requires: java-jna
Requires: jpackage-utils
Requires: java-openjdk
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
An unofficial/alternative set of java bindings for the gstreamer multimedia framework.
%package javadoc
Group: Documentation
Summary: Javadoc for %{name}
%description javadoc
Java interface to the gstreamer framework.
This package contains javadoc for %{name}
%package swt
Summary: SWT support for %{name}
Group: System/Libraries/Java
Requires: %{name} = %{version}-%{release}
Requires: eclipse-swt
%description swt
Java interface to the gstreamer framework.
This package contains SWT support for %{name}.
%prep
%setup -q -n gstreamer-java
%patch3 -p1
%patch4 -p0
%patch5 -p0
cp -p src/org/freedesktop/tango/COPYING COPYING.CC-BY-SA
# remove prebuild binaries
find . -name '*.jar' -exec rm {} \;
sed -i -e "s,\(file.reference.jna.jar=\).*,\1$(build-classpath jna)," \
-e "s,\(file.reference.junit4.jar=\).*,\1$(build-classpath junit48)," \
-e "s,\(run.jvmargs=-Djna.library.path=\).*,\1%{_libdir}:$(pkg-config --variable=pluginsdir gstreamer-0.10)," nbproject/project.properties
#sed -i -e "s,\(file.reference.swt.jar=\).*,\1$(find %{_libdir} -name swt*.jar 2>/dev/null|sort|head -1)," nbproject/project.properties
sed -i -e "s,\(file.reference.swt.jar=\).*,\1$(build-classpath swt)," nbproject/project.properties
%build
unset JAVA_HOME
export JAVA_HOME=%{_jvmdir}/jdk-openjdk
ant -Ddefault.javac.source=1.6 -Ddefault.javac.target=1.6 jar
ant -Djavadoc.windowtitle="Java interface to the gstreamer framework" javadoc
%check
ant test
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
mkdir -p %{buildroot}%{_javadir}
install -pm 644 dist/*.jar %{buildroot}%{_javadir}/
mkdir -p %{buildroot}%{_javadocdir}/gstreamer-java
cp -rp dist/javadoc/* %{buildroot}%{_javadocdir}/gstreamer-java
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%files
%defattr(-,root,root)
%{_javadir}/gstreamer-java.jar
%doc CHANGES COPYING* tutorials/*
%files javadoc
%defattr(-,root,root)
%{_javadocdir}/gstreamer-java
%files swt
%defattr(-,root,root)
%{_javadir}/gstreamer-java-swt.jar
%changelog
* Sun Jan 16 2011 gil <puntogil@libero.it> 1.4-2mamba
- rebuilt devel
- add new sub package swt
- built with java-openjdk support
* Thu Jul 08 2010 gil <puntogil@libero.it> 1.4-1mamba
- update to 1.4
* Thu Apr 29 2010 gil <puntogil@libero.it> 1.3-1mamba
- update to 1.3
* Wed Apr 15 2009 gil <puntogil@libero.it> 1.1-1mamba
- package created by autospec