Sophie

Sophie

distrib > Mandriva > 10.2 > x86_64 > by-pkgid > 1538ffc08cae852e30a5710e29a0ff1b > files > 4

putty-0.58-1mdk.src.rpm

%define name		putty
%define version 0.58
%define is_snapshot	0

%if %{is_snapshot}
%define snapshot	2004-02-16
%define release 1mdk
%endif
%if !%{is_snapshot}
%define release 1mdk
%endif

%define title   Putty
%define summary Free SSH, Telnet and Rlogin client

Summary:		%summary
Name:			%name
Version:		%version
Release:		%release
Epoch:			1
License:		MIT
Group:			Networking/Remote access
%if %{is_snapshot}
URL:			http://www.tartarus.org/~simon/putty-unix/
Source0:		%name-%version-%snapshot.tar.bz2
%endif
%if !%{is_snapshot}
URL:			http://the.earth.li/~sgtatham/putty/latest/
Source0:		http://the.earth.li/~sgtatham/putty/latest/%name-%version.tar.gz
%endif
Source1:		%name-icons.tar.bz2
Source2:		http://the.earth.li/~sgtatham/putty/latest/%name-%version.tar.gz.DSA
BuildRoot:		%_tmppath/%name-buildroot
Buildrequires:		gtk+-devel

%description
This is the Unix port of the popular Windows ssh client, PuTTY. It
supports flexible terminal setup, mid-session reconfiguration using
Ctrl-rightclick, multiple X11 authentication protocols, and various
other interesting things not provided by ssh in an xterm.

%prep
%if %{is_snapshot}
%setup -q -n %name-%version-%snapshot
%setup -q -T -D -a1 -n %name-%version-%snapshot
%endif
%if !%{is_snapshot}
%setup -q -n %name-%version
%setup -q -T -D -a1 -n %name-%version
%endif

%build
%if %{is_snapshot}
cd unix && %make -f Makefile.gtk VER="-DSNAPSHOT=%{snapshot}" \
%endif
%if !%{is_snapshot}
cd unix && %make -f Makefile.gtk \
%endif
CC="%{__cc}" CFLAGS="%{optflags} `gtk-config --cflags` -I. -I.. -I../charset"

# temporary man pages
echo ".so putty.1" > pscp.1
echo ".so putty.1" > psftp.1

%install
rm -rf %buildroot

# preparing directories
%__mkdir_p %{buildroot}%{_bindir}
%__mkdir_p %{buildroot}%{_mandir}/man1

(cd unix && %__make -f Makefile.gtk install DESTDIR=%buildroot \
prefix=%{_prefix} mandir=%{_mandir})

# Menu
mkdir -p %buildroot/%_menudir
cat > %buildroot/%_menudir/%name << EOF
?package(%name): \
command="%_bindir/%name" \
needs="X11" \
icon="%name.png" \
%if %mdkversion <= 1000
section="Internet/Remote access" \
%else
section="Internet/Remote Access" \
%endif
title="%title" \
longtitle="%summary"
EOF

# icon
# Use {curly braces} here to protect the variable name.
# ie: Is name48.png %{name}48.png or %{name48}.png?
%__install -D -m 644 %{name}48.png %buildroot/%_liconsdir/%name.png
%__install -D -m 644 %{name}32.png %buildroot/%_iconsdir/%name.png
%__install -D -m 644 %{name}16.png %buildroot/%_miconsdir/%name.png

%post
%update_menus

%postun
%clean_menus

%clean
rm -rf %buildroot

%files
%defattr(-,root,root)
%doc LICENCE README README.txt
%_bindir/*
%defattr(0644,root,root,0755)
%_mandir/man1/*
%_menudir/*
%_miconsdir/*
%_iconsdir/*
%_liconsdir/*

%changelog
* Wed Apr 06 2005 Götz Waschk <waschk@linux-mandrake.com> 0.58-1mdk
- New release 0.58

* Tue Feb 22 2005 Götz Waschk <waschk@linux-mandrake.com> 0.57-1mdk
- New release 0.57

* Wed Oct 27 2004 Götz Waschk <waschk@linux-mandrake.com> 0.56-1mdk
- don't bzip2 source for sig checks
- add signature
- New release 0.56

* Wed Aug 4 2004 Tibor Pittich <Tibor.Pittich@mandrake.org> 1:0.55-1mdk
- 0.55
- added support to build stable or snapshot versions

* Mon Feb 16 2004 David Walluck <walluck@linux-mandrake.com> 1:0.54-0.20040216.3mdk
- fix changelog entries

* Sun Feb 15 2004 David Walluck <walluck@linux-mandrake.com> 1:0.54-0.20040216.2mdk
- bump epoch to fix improper version tag in the 0.53b release

* Sun Feb 15 2004 David Walluck <walluck@linux-mandrake.com> 0:0.54-0.20040216.1mdk
- 0.54 (20040216)

* Thu Sep 18 2003 Laurent Culioli <laurent@pschit.net> 0.53b-0.cvs.20030917.2mdk
- fix menu
- drop requires

* Wed Sep 17 2003 Tibor Pittich <Tibor.Pittich@phuture.sk> 0.53b-0.cvs.20030917.1mdk
- initial cooker inport of this famous ssh/telnet client