File lwtt.spec of Package lwtt

Name:           lwtt 
Summary:        Lightweight Time Tracker(LWTT) is a very simple time-tracking program
Version:        1.2.0
Release:        1
Group:          Productivity 
License:        GPL
Url:            http://lwtt.aiken.net
Vendor:         openSUSE
Requires:       java >= 1.6.0
BuildRequires:  unzip
BuildRequires:  update-alternatives
BuildRequires:  java-devel
BuildRequires:  ant 
BuildRequires:  ant-nodeps 
BuildRequires:  update-desktop-files
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Source0:        %{name}-%{version}-src-ext.tar.bz2
Source1:	%{name}.desktop
Source2:        %{name}.svg
Source3:        %{name}.png
BuildArch:      noarch

%description
Lightweight Time Tracker (LWTT) is a very simple time-tracking program written
in Java (version 6). 
It provides independent real-time tracking of multiple tasks such as
programming, presentations, lectures etc.) including very simple price
calculation. LWTT's data are saved to a XML file under the home directory.

Author(s):
------------
    Lukas Jelinek   <lukas@aiken.cz>

%prep
# nothing to do

%setup -q -n "%{name}-%{version}" -c

%build
make

%install
# Don't do bytecode version check
export NO_BRP_CHECK_BYTECODE_VERSION=true

%__install -d -m 755 %{buildroot}%{_datadir}/%{name}
%__install -m 755 *.jar %{buildroot}%{_datadir}/%{name}/

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

java -jar %{_datadir}/%{name}/%{name}.jar

EOF

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

# Icon
%__install -D -p -m 644 %{SOURCE2} %{buildroot}%{_datadir}/pixmaps/%{name}.svg
%__install -D -p -m 644 %{SOURCE3} %{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(0644,root,root,0755)
%{_datadir}/%{name}
%{_datadir}/%{name}/*
%attr(0755,root,root)
%{_bindir}/*
%{_datadir}/applications/%{name}.desktop
%{_datadir}/pixmaps/%{name}.png
%{_datadir}/pixmaps/%{name}.svg

%doc COPYING

%changelog
openSUSE Build Service is sponsored by