File jameica.spec of Package jameica

#
# spec file for package jameica
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

Name:           jameica
License:        GPL-2.0 and LGPL-2.0 and Apache-2.0 and CPL-1.0 and Zlib and MPL-1.0 and EPL-1.0
Group:          Productivity/Office/Finance
Summary:        Runtime environment for Java applications like Hibiscus
Version:        2.6.4
Release:        0
Url:            http://www.willuhn.de/products/jameica/
Source:         http://www.willuhn.de/products/%{name}/releases/current/%{name}/%{name}.src.zip
Conflicts:      jameica-nightly
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch
BuildRequires:  ant
BuildRequires:  java-devel >= 1.6
BuildRequires:  jpackage-utils
BuildRequires:  xerces-j2
BuildRequires:  xerces-j2-xml-apis
BuildRequires:  xerces-j2-xml-resolver
BuildRequires:  unzip

# %if 0%{?suse_version}
# BuildRequires:  fdupes
# %endif

%description
Serves as a base framework for recurring tasks on Hibiscus.
Keeps a unified look & feel. Strictly separate program and
user data. Supports synchronous and asynchronous data exchange
via between pluggins (via messaging) and allows client server
communication via RMI, XML-RPC and SOAP. Comes with headless
mode (no GUI for servers) and logging.

Authors:
--------
    Olaf Willuhn <info@willuhn.de>

%package devel
Summary:        SDK for the Jameica framework
Group:          Development/Languages/Java
Requires:       jameica

%description devel
Source code required to build and develop Jameica plugins.

%prep
%setup -n %{name} -q
rm build/jameica-win32.exe
rm build/jameica-win64.exe
rm build/launch4j-win32.xml
rm build/launch4j-win64.xml
rm build/jameica-macos.sh
rm build/jameica-macos64.sh
rm build/jameica-openbsd.sh
rm build/jameica-osol.sh

rm -rf lib/swt/macos
rm -rf lib/swt/macos64
rm -rf lib/swt/win32
rm -rf lib/swt/win64

%build
cd build
ant init compile jar zip src

%install
mkdir -p %{buildroot}%{_prefix}/lib/jameica/plugins
cp -r releases/%{version}-0/%{name} %{buildroot}%{_prefix}/lib
chmod +x %{buildroot}%{_prefix}/lib/%{name}/rcjameica
chmod +x %{buildroot}%{_prefix}/lib/%{name}/jameicaserver.sh
chmod +x %{buildroot}%{_prefix}/lib/%{name}/jameica.sh

rm %{buildroot}%{_prefix}/lib/%{name}/jameica-win32.jar
rm %{buildroot}%{_prefix}/lib/%{name}/jameica-win64.jar
rm %{buildroot}%{_prefix}/lib/%{name}/jameica-macos.jar
rm %{buildroot}%{_prefix}/lib/%{name}/jameica-macos64.jar
rm %{buildroot}%{_prefix}/lib/%{name}/jameica-openbsd.jar
rm %{buildroot}%{_prefix}/lib/%{name}/jameica-osol.jar

# Mac OS X stuff
rm %{buildroot}%{_prefix}/lib/%{name}/*.plist
rm %{buildroot}%{_prefix}/lib/%{name}/*.icns

mkdir -p %{buildroot}%{_bindir}
ln -sf %{_prefix}/lib/%{name}/jameica.sh %{buildroot}%{_bindir}/jameica
ln -sf %{_prefix}/lib/%{name}/jameicaserver.sh %{buildroot}%{_bindir}/jameicaserver

cp -r src %{buildroot}%{_prefix}/lib/jameica

# %if 0%{?suse_version}
# %fdupes %{buildroot}%{_prefix}/lib/%{name}
# %endif

%files
%defattr(-,root,root)
%{_bindir}/*
%{_prefix}/lib/jameica
%{_prefix}/lib/jameica/lib
%dir %{_prefix}/lib/jameica/plugins
%exclude %{_prefix}/lib/jameica/src

%files devel
%defattr(-,root,root)
%{_prefix}/lib/jameica/src

%changelog
* Sat Jan 10 2015 k.bruenen@bruenen-net.de
  new version 2.6.2, see http://www.willuhn.de/products/jameica/ for details
* Tue Apr 01 2014  k.bruenen@bruenen-net.de
  new version 2.6.1, see http://www.willuhn.de/products/jameica/ for details

openSUSE Build Service is sponsored by