File genealogyj.spec of Package genealogyj

# openSUSE BUILD service build build script
# package: GenealogyJ
#

Name:           genealogyj 
Summary:        GenealogyJ is a viewer and editor for genealogic data
Version:        3.0
Release:        1 
Group:          Productivity/Office/Management 
License:        GPL
Url:            http://genj.sourceforge.net
Vendor:         openSUSE
Packager:       Denny Beyer
Requires:       java >= 1.6.0
#BuildRequires:  unzip
BuildRequires:  update-alternatives
%if %suse_version < 1100
BuildRequires:  java-1_6_0-sun-devel
%else
BuildRequires:  java-devel
%endif
BuildRequires:  ant 
BuildRequires:  ant-nodeps 
BuildRequires:  update-desktop-files
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Source0:        %{name}-%{version}-src.tar.bz2
Source1:	%{name}.desktop
BuildArch:      noarch


%description
GenealogyJ is a viewer and editor for genealogic data, suitable for hobbyist, family historian and genealogy researcher. GenJ supports the Gedcom standard, is written in Java and offers family tree, table, timeline views and more. GenJ is free software so it can be redistributed and/or be modified under the terms of the GNU General Public Licence as published by the Free Software Foundation.

Authors
------------
    Nils Meier < [at] >

%prep
# nothing to do

#%setup -c "%{name}-%{version}"
%setup

%build

# Start building with ant
%ant

%install
export NO_BRP_CHECK_BYTECODE_VERSION=true
#%__install -d -m 755 %{buildroot}%{_datadir}/%{name}
#%__install -m 755 dist/*.jar %{buildroot}%{_datadir}/%{name}/
#%__install -d -m 755 %{buildroot}%{_datadir}/%{name}/lib
#%__install -m 755 lib/*.jar %{buildroot}%{_datadir}/%{name}/lib/

# startscript
cat > %{name} << EOF
#!/bin/sh

java -jar %{_datadir}/%{name}/%{name}-%{version}.jar ${@}

EOF

%__install -d -m 755 %{buildroot}%{_bindir}
%__install -m 755 %{name} %{buildroot}%{_bindir}/

# Icon
%__install -D -p -m 644 help/images/GenJ.png %{buildroot}%{_datadir}/pixmaps/%{name}.png

# Desktop menu entry
%__install -d -m 755 %{buildroot}%{_datadir}/applications
%__install -m 644 %{SOURCE1} %{buildroot}%{_datadir}/applications/%{name}.desktop
%suse_update_desktop_file %{name}

%post
# nothing to do here

%clean
%__rm -rf "%{buildroot}"

%files
%defattr(-,root,root)
%{_bindir}/*
%{_datadir}/%{name}
%{_datadir}/%{name}/**/*
%{_datadir}/applications/%{name}.desktop
%{_datadir}/pixmaps/%{name}.png

%doc gpl.txt authors.txt

%changelog