Sophie

Sophie

distrib > Mandriva > 2009.0 > x86_64 > by-pkgid > 879d61bc89c5c96558bc680742522c6c > files > 3

ini4j-0.2.6-4.0.1mdv2009.0.src.rpm

# Copyright (c) 2000-2005, JPackage Project
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
#    notice, this list of conditions and the following disclaimer in the
#    documentation and/or other materials provided with the
#    distribution.
# 3. Neither the name of the JPackage Project nor the names of its
#    contributors may be used to endorse or promote products derived
#    from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
%define _with_gcj_support 1
%define gcj_support %{?_with_gcj_support:1}%{!?_with_gcj_support:%{?_without_gcj_support:0}%{!?_without_gcj_support:%{?_gcj_support:%{_gcj_support}}%{!?_gcj_support:0}}}

%define section		free

Name:		ini4j
Version:	0.2.6
Release:	%mkrel 4.0.1
Epoch:		0
Summary:        Java API for handling Windows ini file format
License:        Apache License
Url:            http://www.ini4j.org/
Group:		Development/Java
#
Source0:        http://switch.dl.sourceforge.net/sourceforge/ini4j/%{name}-src-%{version}.zip
Patch0:		ini4j-build.patch
BuildRequires:	java-rpmbuild >= 1.6
BuildRequires:  ant
BuildRequires:  ant-nodeps
BuildRequires:  ant-junit
%if ! %{gcj_support}
BuildArch:      noarch
%endif
BuildRoot:       %{_tmppath}/%{name}-%{version}-%{release}-root

%if %{gcj_support}
BuildRequires:		java-gcj-compat-devel
%endif

%description
The [ini4j] is a simple Java API for handling 
configuration files in Windows .ini format. 
Additionally, the library includes Java Preferences API 
implementation based on the .ini file. 


%package javadoc
Summary:	Javadoc for %{name}
Group:		Development/Java

%description javadoc
Javadoc for %{name}.

%prep
%{__rm} -fr %{buildroot}
%setup -q -c -n %{name}-%{version}
%remove_java_binaries
rm src/classes/org/ini4j/IniPreferencesFactoryListener.java
rm src/test/org/ini4j/IniPreferencesFactoryListenerTest.java
%patch0

%build
export CLASSPATH=$(build-classpath ant-launcher)
%ant build javadoc

%install
# jar
%{__install} -d -m 755 %{buildroot}%{_javadir}
%{__install} -m 644 dist/%{name}.jar %{buildroot}%{_javadir}/%{name}-%{version}.jar
%{__ln_s} %{name}-%{version}.jar %{buildroot}%{_javadir}/%{name}.jar
# javadoc
%{__install} -d -m 755 %{buildroot}%{_javadocdir}/%{name}-%{version}
%{__cp} -pr build/doc/* %{buildroot}%{_javadocdir}/%{name}-%{version}
(cd %{buildroot}%{_javadocdir} && ln -sf %{name}-%{version} %{name})

%if %{gcj_support}
%{_bindir}/aot-compile-rpm
%endif

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

%post
%if %{gcj_support}
%update_gcjdb
%endif

%postun
%if %{gcj_support}
%clean_gcjdb
%endif

%files
%defattr(-,root,root)
%doc License.txt ReleaseNotes.txt ChangeLog.txt
%{_javadir}/*

%if %{gcj_support}
%attr(-,root,root) %{_libdir}/gcj/%{name}
%endif

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


%changelog
* Mon Feb 18 2008 Alexander Kurtakov <akurtakov@mandriva.org> 0:0.2.6-4.0.1mdv2008.1
+ Revision: 171024
- spec cleanup

  + Olivier Blin <oblin@mandriva.com>
    - restore BuildRoot

  + Thierry Vignaud <tvignaud@mandriva.com>
    - kill re-definition of %%buildroot on Pixel's request

* Sun Dec 16 2007 Anssi Hannula <anssi@mandriva.org> 0:0.2.6-4mdv2008.1
+ Revision: 120893
- buildrequire java-rpmbuild, i.e. build with icedtea on x86(_64)

* Mon Dec 10 2007 Jaroslav Tulach <jtulach@mandriva.org> 0:0.2.6-3mdv2008.1
+ Revision: 116877
- Fixing broken link from ini4j.jar

  + Thierry Vignaud <tvignaud@mandriva.com>
    - better summary

* Wed Dec 05 2007 Jaroslav Tulach <jtulach@mandriva.org> 0:0.2.6-2mdv2008.1
+ Revision: 115624
- Creating generic ini4j.jar link to actual version of the JAR file

* Fri Nov 30 2007 Jaroslav Tulach <jtulach@mandriva.org> 0:0.2.6-1mdv2008.1
+ Revision: 114099
- According to template standard file, javadoc belongs to Dev/Java group
- Build also contains junit tests and thus needs a dependency on ant-junit
- Inproper specification of build root
- The build needs proper dependency on ant-nodeps
- import ini4j