File jreleaseinfo.spec of Package jreleaseinfo

#
# spec file for package jreleaseinfo (Version 1.3.0)
#
# Copyright (c) 2008 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/
#

# norootforbuild


Name:           jreleaseinfo
Version:        1.3.0
Release:        3
Summary:        JReleaseInfo creates a Java source file during the build process.
Group:          Development/Libraries/Java
License:        The Apache Software License
Url:            http://jreleaseinfo.sourceforge.net/
Source:         jreleaseinfo-1.3.0-src.tar.bz2
Patch0:         jreleaseinfo-1.3.0-target-javadoc.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch
BuildRequires:  java-devel
BuildRequires:  ant

%description
The library (and ant task) for build-time creation of Java source file
with program version, build number or any other info.



Authors:
--------
    Thomas Cotting
    Konrad Durrer
    Roland Gisler

%package javadoc
License:        The Apache Software License
Summary:        JReleaseInfo creates a Java source file during the build process.
Group:          Development/Libraries/Java

%description javadoc
The library (and ant task) for build-time creation of Java source file
with program version, build number or any other info.



Authors:
--------
    Thomas Cotting
    Konrad Durrer
    Roland Gisler

%prep
%setup -q
%patch0 -b .sav0
# remove all third party jars
find . -iname '*.jar' | xargs rm -rf
# wrong end of line encoding
sed -i -e 's/.$//' LICENSE.txt

%build
ant -Dant.build.javac.source=1.5 -Dant.build.javac.target=1.5 \
    build javadoc

%install
install -d -m 755 $RPM_BUILD_ROOT/%{_javadir}
install -m 644 target/%{name}-%{version}.jar $RPM_BUILD_ROOT/%{_javadir}/
# jars
(cd $RPM_BUILD_ROOT%{_javadir}/ && for jar in *-%{version}*; do ln -sf ${jar} ${jar/-%{version}/}; done)
# javadoc
install -d -m 755 $RPM_BUILD_ROOT/%{_javadocdir}/%{name}-%{version}
cp -pr javadoc/* $RPM_BUILD_ROOT/%{_javadocdir}/%{name}-%{version}
ln -s %{name}-%{version} $RPM_BUILD_ROOT/%{_javadocdir}/%{name}

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root,0755)
%doc LICENSE.txt
%{_javadir}/%{name}*.jar

%files javadoc
%defattr(-,root,root)
%{_javadocdir}/%{name}-%{version}
%{_javadocdir}/%{name}

%changelog
* Mon Sep 15 2008 mvyskocil@suse.cz
- source=1.5 target=1.5
* Wed Aug 20 2008 mvyskocil@suse.cz
- Initial packagin in SUSE - version 1.3.0
openSUSE Build Service is sponsored by