File novell-zenworks-lpm-java-sqlite.spec of Package novell-zenworks-lpm-java-sqlite

Name:           novell-zenworks-lpm-java-sqlite
# List of additional build dependencies
#BuildRequires:  gcc-c++ libxml2-devel

# Use correct versions of java-devel packages for SLE10 and SLE11
%if 0%{?sles_version} == 11
BuildRequires:  java-1_6_0-ibm-devel 
%endif

%if 0%{?sles_version} == 10
%ifarch x86_64
BuildRequires:  java-1_5_0-ibm-devel java-1_5_0-ibm-alsa-32bit update-alternatives
%else
BuildRequires:  java-1_5_0-ibm-devel java-1_5_0-ibm-alsa update-alternatives
%endif
%endif

%if 0%{?rhel_version} > 401
BuildRequires:  java-1.4.2-gcj-compat java-1.4.2-gcj-compat-devel
%endif

BuildRequires: sqlite-devel >= 3.2.8 sqlite >= 3.2.8 

Version:        20090430
Release:        1
License:        Free
Source:         javasqlite-20090430.tar.gz
Source1:        javaSqlite-20090430-rpmlintrc
Group:          Productivity/Other
Summary:        Java Wrapper for SQLite Db

BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Provides java wrapper for sqlite db. 


%prep
%setup -q -n javasqlite-%version

%build

# Assume that the package is built by plain 'make' if there's no ./configure.
# This test is there only because the wizard doesn't know much about the
# package, feel free to clean it up

%if 0%{?sles_version} == 11 
export JAVAC_FLAGS="-target 1.5"
%endif

%configure --libdir=/opt/novell/zenworks/%_lib/ \
%if 0%{?rhel_version} > 400
	--with-jdk=/usr/lib/jvm/java-1.4.2-gcj
%endif
%if 0%{?sles_version} == 11 
	--with-jdk=/usr/%_lib/jvm/java-1.6.0-ibm
%endif
%if 0%{?sles_version} == 10
	--with-jdk=/usr/%_lib/jvm/java-1.5.0-ibm
%endif
make

    

%install

make DESTDIR=%buildroot install



# Write a proper %%files section and remove these two commands and
# the '-f filelist' option to %%files
echo '%%defattr(-,root,root)' >filelist
find %buildroot -type f -printf '/%%P*\n' >>filelist


%clean
rm -rf %buildroot

%files -f filelist

%defattr(-,root,root)
%dir /opt/novell
%dir /opt/novell/zenworks
%dir /opt/novell/zenworks/%_lib



   
%ifarch x86_64  
%post  
 mkdir -p /opt/novell/zenworks/lib/  
 ln -f -s /opt/novell/zenworks/lib64/libsqlite_jni.so /opt/novell/zenworks/lib/libsqlite_jni.so  
   
%postun  
 rm -f /opt/novell/zenworks/lib/libsqlite_jni.so  
%endif  

# This is a place for a proper filelist:
# /usr/bin/javaSqlite
# You can also use shell wildcards:
# /usr/share/javaSqlite/*
# This installs documentation files from the top build directory
# into /usr/share/doc/...
# %doc README COPYING
# The advantage of using a real filelist instead of the '-f filelist' trick is
# that rpmbuild will detect if the install section forgets to install
# something that is listed here


%changelog
* Fri May 21 2010 csvadiraj@novell.com
- packaged javaSqlite version 20090430 using the buildservice spec file wizard