File N-View.spec of Package N-View

Name:		N-View
Version: 	3.1
Release:	1
License: 	Shareware
Group: 		Applications
Summary: 	N-View Network Monitor
URL: 		http://www.n-view.net/
Source0: 	%{name}-%{version}.tar.bz2
BuildRoot: 	%{_tmppath}/%{name}-%{version}-build
Packager:       Carsten Schoene <cs@linux-administrator.com>
Distribution:   SuSE Linux 10.0
Vendor:         linux-administrator.com
BuildArch:      noarch
Requires:	java-1_5_0-sun
Requires:	java-1_5_0-sun-alsa
BuildRequires:	glibc-devel gcc gcc-c++ libgcc 

%description
The Network Monitor for small and medium sized networks.

N-View provides an overview of all hosts and subnets in a network on a graphical user interface.

Authors:
--------
   Wolfgang Ullrich <w.ullrich@n-view.net>

%prep
%setup -n N-View-Install-Linux

%install
install -d 755 $RPM_BUILD_ROOT/opt/N-View3x
install -d 755 $RPM_BUILD_ROOT/usr/share/applications
cd $RPM_BUILD_DIR/N-View-Install-Linux
cp -R * $RPM_BUILD_ROOT/opt/N-View3x/

# create startup script
echo '#!/bin/bash' > $RPM_BUILD_ROOT/opt/N-View3x/StartNView.sh
echo 'cd /opt/N-View3x' >> $RPM_BUILD_ROOT/opt/N-View3x/StartNView.sh
echo 'java -jar NView31.jar' >> $RPM_BUILD_ROOT/opt/N-View3x/StartNView.sh
chmod 755 $RPM_BUILD_ROOT/opt/N-View3x/StartNView.sh

# complete desktop file
echo "Exec=/opt/N-View3x/StartNView.sh" >> $RPM_BUILD_ROOT/opt/N-View3x/N-View3x.desktop
echo "Icon=/opt/N-View3x//32x32.png" >> $RPM_BUILD_ROOT/opt/N-View3x/N-View3x.desktop

# desktop file
install -d 755 $RPM_BUILD_ROOT/root/Desktop
cd $RPM_BUILD_ROOT/root/Desktop 
ln -sf /opt/N-View3x/N-View3x.desktop
cd $RPM_BUILD_ROOT/usr/share/applications
ln -sf /opt/N-View3x/N-View3x.desktop

# remove unneeded files
rm -f $RPM_BUILD_ROOT/opt/N-View3x/Install.sh
rm -f $RPM_BUILD_ROOT/opt/N-View3x/UnInstall.sh


cd $RPM_BUILD_ROOT
find . -type d | sed '1,2d;s,^\.,\%attr(-\,root\,root) \%dir ,' > $RPM_BUILD_DIR/file.list.%{name}
find . -type f | sed 's,^\.,\%attr(-\,root\,root) ,' >> $RPM_BUILD_DIR/file.list.%{name}
find . -type l | sed 's,^\.,\%attr(-\,root\,root) ,' >> $RPM_BUILD_DIR/file.list.%{name}

%clean
rm -rf $RPM_BUILD_ROOT/*
rm -rf $RPM_BUILD_DIR/%{name}*
rm -rf ../file.list.%{name}


%files -f ../file.list.%{name}

%changelog
* Sun Jan 07 2007 Carsten Schoene <cs@linux-administrator.com>
- package for current distributions

* Fri Oct 07 2005 Carsten Schoene <cs@linux-administrator.com>
- rebuild for SuSE 10.0

* Sat Jul 30 2005 Carsten Schoene <cs@linux-administrator.com>
- initial version 3.1 for SuSE 9.3 
openSUSE Build Service is sponsored by