Sophie

Sophie

distrib > Mandriva > 2009.1 > x86_64 > by-pkgid > f81c5b605dd41f7708719ad5a42ebffc > files > 4

cheops-ng-0.2.3-4mdv2009.0.src.rpm

%define name 	cheops-ng
%define version 0.2.3
%define release %mkrel 4

Summary:	Multipurpose network exploration tool
Name:		%{name}
Version:	%{version}
Release:	%{release}
License:	GPL
Group:		Networking/Other
Source0:	%{name}-%{version}.tar.bz2
Source1:	cheops-agent.bz2
#Patch0:		%{name}-0.1.10-Makefile.in-patch.bz2
Patch1:		%{name}-errno.patch.bz2
#Patch2:		%{name}-0.1.12-gcc3.3-fix.patch.bz2
URL:		http://cheops-ng.sourceforge.net/
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-buildroot
BuildRequires:	gtk+-devel = 1.2.10 bison flex gnome-libs-devel ORBit-devel = 0.5.17
BuildRequires:	glib-devel = 1.2.10 libxml-devel xpm-devel nmap imlib-devel => 1.9.14
Requires:	nmap
Requires(post):	rpm-helper
Requires(preun): rpm-helper

%description
Cheops-ng is a Network management tool for mapping and monitoring your network.
It has host/network discovery functionality as well as OS detection of hosts. 
Cheops-ng has the ability to probe hosts to see what services they are running.
On some services, cheops-ng is actually able to see what program is running for
a service and the version number of that program.

NB: Run cheops-agent as root to enable the backend.

%prep
%setup -q

#%patch0 -p0
%patch1 -p1
#%patch2 -p1 -b .orig

%build

# configure macro does not work
CFLAGS="%{optflags}" \
./configure	--prefix=%{_prefix} \
		--host=%{_target_platform} \
# make -j2 does not work
make XCFLAGS="$RPM_OPT_FLAGS"

%install
rm -rf $RPM_BUILD_ROOT
# makeinstall macro does not work
DEFAULTDIR="%{_datadir}/pixmaps/%{name}"

mkdir -p %{buildroot}/%{_bindir}
mkdir -p %{buildroot}/%{_initrddir}
mkdir -p %{buildroot}/${DEFAULTDIR}/pixmaps/

cp pixmaps/%{name}.xpm %{buildroot}/%{_datadir}/pixmaps/%name/pixmaps/
cp pixmaps/*.xpm %{buildroot}/${DEFAULTDIR}/pixmaps/

cp %{name} %{buildroot}/%{_bindir}
cp cheops-agent %{buildroot}/%{_bindir}

bzcat %{SOURCE1} > %{buildroot}%{_initrddir}/cheops-agent

# Menu
#?package(%{name}): needs="x11" \
#		    section="Documentation/Websites" \
#		    title="Cheops-NG Homepage" \
#		    command="if ps U \$USER | grep -q \$BROWSER; then \$BROWSER -remote \'openURL(%{url})\'; else \$BROWSER \'%{url}\'; fi" \
#		    icon="networking_section.png"
mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications/
cat << EOF > %buildroot%{_datadir}/applications/mandriva-%{name}.desktop
[Desktop Entry]
Type=Application
Exec=%{_bindir}/%{name}
Icon=networking_section
Categories=Network;
Name=Cheops-NG
Comment=Network Browser and Tools (requires running agent)
EOF

%clean
rm -rf %{buildroot}

%post
%if %mdkversion < 200900
%{update_menus}
%endif
%_post_service cheops-agent

%preun
%_preun_service cheops-agent

%if %mdkversion < 200900
%postun
%{clean_menus}
%endif

%files
%defattr(-,root,root)
%doc AUTHORS ChangeLog README doc/*
%{_bindir}/cheops-*
%attr(755,root,root) %config(noreplace) %{_initrddir}/cheops-agent
#%{_datadir}/pixmaps/*.xpm
%{_datadir}/pixmaps/%{name}
%{_datadir}/applications/mandriva-%{name}.desktop



%changelog
* Wed Jul 23 2008 Thierry Vignaud <tvignaud@mandriva.com> 0.2.3-4mdv2009.0
+ Revision: 243877
- rebuild
- fix description-line-too-long

  + Pixel <pixel@mandriva.com>
    - rpm filetriggers deprecates update_menus/update_scrollkeeper/update_mime_database/update_icon_cache/update_desktop_database/post_install_gconf_schemas

* Thu Jan 03 2008 Thierry Vignaud <tvignaud@mandriva.com> 0.2.3-2mdv2008.1
+ Revision: 141868
- auto-convert XDG menu entry
- relax BR on imlib-devel
- kill re-definition of %%buildroot on Pixel's request
- import cheops-ng

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


* Sat May 13 2006 Emmanuel Andry <eandry@mandriva.org> 0.2.3-2mdk
- Rebuild for ssl 0.9.8

* Fri Oct 21 2005 Nicolas Lécureuil <neoclust@mandriva.org> 0.2.3-1mdk
- New release 0.2.3
- %%mkrel
- Remove patch 0, 2

* Sun Dec 14 2003 Per Øyvind Karlsen <peroyvind@linux-mandrake.com> 0.1.12-1mdk
- 0.1.12
- spec cosmetics
- fix buildrequires (lib64..)
- remove explicit library dependency
- rm -rf $RPM_BUILD_ROOT in %%install, not %%prep
- quiet setup
- fix gcc-3.3 build for the gpl.c file that gets generated (P2)
- pass --host=%%{_target_platform} to configure
- compile adns with $RPM_OPT_FLAGS
- make package --short-circuitable (don't move files in builddir around)

* Tue Feb 11 2003 Lenny Cartier <lenny@mandrakesoft.com> 0.1.10-3mdk
- patch1: fix missing include
- change group & menu section (Maxim Heijndijk <cchq@wanadoo.nl>)

* Wed Nov 20 2002 Lenny Cartier <lenny@mandrakesoft.com> 0.1.10-2mdk
- fix pixmaps location

* Thu Nov 14 2002 Lenny Cartier <lenny@mandrakesoft.com> 0.1.10-1mdk
- from Maxim Heijndijk <cchq@wanadoo.nl> :
	- Rebuilt on LM 9.0.
	- 0.1.10.
	- Added initscript.
	- Patch for pixmapdir.

* Mon Aug 26 2002 Austin Acton <aacton@yorku.ca> 0.1.9-1mdk
- Initial package for Mandrake 8.2+