diff --git a/README.md b/README.md index 9ab725d..dd705a5 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,4 @@ # putty +PuTTY is a free implementation of Telnet and SSH for Win32 and Unix platforms, along with an xterm terminal emulator. + diff --git a/putty-0.62-glibc-2.16.patch b/putty-0.62-glibc-2.16.patch new file mode 100644 index 0000000..0033070 --- /dev/null +++ b/putty-0.62-glibc-2.16.patch @@ -0,0 +1,127 @@ +g_strcasecmp and g_strncasecmp are deprecated in glib-2.32. + +--- + unix/gtkfont.c | 57 +++++++++++++++++++++++++++++++++++++-------------------- + 1 file changed, 37 insertions(+), 20 deletions(-) + +Index: putty-0.62/unix/gtkfont.c +=================================================================== +--- putty-0.62.orig/unix/gtkfont.c ++++ putty-0.62/unix/gtkfont.c +@@ -10,6 +10,8 @@ + */ + + #include ++#include ++#include + #include + #include + #include +@@ -524,21 +526,21 @@ static void x11font_enum_fonts(GtkWidget + style = p; + p += sprintf(p, "%s", components[2][0] ? components[2] : + "regular"); +- if (!g_strcasecmp(components[3], "i")) ++ if (!g_ascii_strcasecmp(components[3], "i")) + p += sprintf(p, " italic"); +- else if (!g_strcasecmp(components[3], "o")) ++ else if (!g_ascii_strcasecmp(components[3], "o")) + p += sprintf(p, " oblique"); +- else if (!g_strcasecmp(components[3], "ri")) ++ else if (!g_ascii_strcasecmp(components[3], "ri")) + p += sprintf(p, " reverse italic"); +- else if (!g_strcasecmp(components[3], "ro")) ++ else if (!g_ascii_strcasecmp(components[3], "ro")) + p += sprintf(p, " reverse oblique"); +- else if (!g_strcasecmp(components[3], "ot")) ++ else if (!g_ascii_strcasecmp(components[3], "ot")) + p += sprintf(p, " other-slant"); +- if (components[4][0] && g_strcasecmp(components[4], "normal")) ++ if (components[4][0] && g_ascii_strcasecmp(components[4], "normal")) + p += sprintf(p, " %s", components[4]); +- if (!g_strcasecmp(components[10], "m")) ++ if (!g_ascii_strcasecmp(components[10], "m")) + p += sprintf(p, " [M]"); +- if (!g_strcasecmp(components[10], "c")) ++ if (!g_ascii_strcasecmp(components[10], "c")) + p += sprintf(p, " [C]"); + if (components[5][0]) + p += sprintf(p, " %s", components[5]); +@@ -550,23 +552,23 @@ static void x11font_enum_fonts(GtkWidget + */ + p++; + stylekey = p; +- if (!g_strcasecmp(components[2], "medium") || +- !g_strcasecmp(components[2], "regular") || +- !g_strcasecmp(components[2], "normal") || +- !g_strcasecmp(components[2], "book")) ++ if (!g_ascii_strcasecmp(components[2], "medium") || ++ !g_ascii_strcasecmp(components[2], "regular") || ++ !g_ascii_strcasecmp(components[2], "normal") || ++ !g_ascii_strcasecmp(components[2], "book")) + weightkey = 0; +- else if (!g_strncasecmp(components[2], "demi", 4) || +- !g_strncasecmp(components[2], "semi", 4)) ++ else if (!g_ascii_strncasecmp(components[2], "demi", 4) || ++ !g_ascii_strncasecmp(components[2], "semi", 4)) + weightkey = 1; + else + weightkey = 2; +- if (!g_strcasecmp(components[3], "r")) ++ if (!g_ascii_strcasecmp(components[3], "r")) + slantkey = 0; +- else if (!g_strncasecmp(components[3], "r", 1)) ++ else if (!g_ascii_strncasecmp(components[3], "r", 1)) + slantkey = 2; + else + slantkey = 1; +- if (!g_strcasecmp(components[4], "normal")) ++ if (!g_ascii_strcasecmp(components[4], "normal")) + setwidthkey = 0; + else + setwidthkey = 1; +@@ -774,11 +776,16 @@ static int pangofont_check_desc_makes_se + + matched = FALSE; + for (i = 0; i < nfamilies; i++) { +- if (!g_strcasecmp(pango_font_family_get_name(families[i]), +- pango_font_description_get_family(desc))) { ++ gchar *a = g_utf8_strdown(pango_font_family_get_name(families[i]), -1); ++ gchar *b = g_utf8_strdown(pango_font_description_get_family(desc), -1); ++ if (a != NULL && b != NULL && strcmp(a, b) == 0) { ++ g_free(a); ++ g_free(b); + matched = TRUE; + break; + } ++ g_free(a); ++ g_free(b); + } + g_free(families); + +@@ -1375,6 +1382,7 @@ struct fontinfo_realname_find { + + static int strnullcasecmp(const char *a, const char *b) + { ++ gchar *p, *q; + int i; + + /* +@@ -1393,7 +1401,16 @@ static int strnullcasecmp(const char *a, + /* + * Otherwise, ordinary strcasecmp. + */ +- return g_strcasecmp(a, b); ++ p = g_utf8_strdown(a, -1); ++ q = g_utf8_strdown(b, -1); ++ if (p == NULL || q == NULL) { ++ fprintf(stderr, "%s\n", strerror(errno)); ++ abort(); ++ } ++ i = strcmp(p, q); ++ g_free(p); ++ g_free(q); ++ return i; + } + + static int fontinfo_realname_compare(void *av, void *bv) \ No newline at end of file diff --git a/putty.desktop b/putty.desktop new file mode 100644 index 0000000..bd27cff --- /dev/null +++ b/putty.desktop @@ -0,0 +1,17 @@ +[Desktop Entry] +Encoding=UTF-8 +Version=1.0 +Name=PuTTY +GenericName=Telnet and SSH2 Client +Comment=Telnet and SSH2 Client +GenericName[fr]=Client Telnet et SSH2 +Comment[fr]=Client Telnet et SSH2 +GenericName[it]=Client Telnet e SSH2 +Comment[it]=Client Telnet e SSH2 +TryExec=putty +Exec=putty +Icon=putty.png +Type=Application +Terminal=false +Categories=Application;Network;System;Security;GTK; +StartupNotify=true diff --git a/putty.png b/putty.png new file mode 100644 index 0000000..8492c99 Binary files /dev/null and b/putty.png differ diff --git a/putty.spec b/putty.spec new file mode 100644 index 0000000..fb346d0 --- /dev/null +++ b/putty.spec @@ -0,0 +1,99 @@ +Name: putty +Version: 0.63 +Release: 1mamba +Summary: A free implementation of Telnet and SSH with GTK GUI +Group: Graphical Desktop/Applications/Networking +Vendor: openmamba +Distribution: openmamba +Packager: Aleph0 +URL: http://www.chiark.greenend.org.uk/~sgtatham/putty/ +Source0: http://the.earth.li/~sgtatham/putty/latest/putty-%{version}.tar.gz +Source1: putty.desktop +Source2: putty.png +Patch0: putty-0.62-glibc-2.16.patch +License: MIT +BuildRequires: libgtk1-devel +BuildRoot: %{_tmppath}/%{name}-%{version}-root + +%description +PuTTY is a free implementation of Telnet and SSH for Win32 and Unix platforms, along with an xterm terminal emulator. + +%prep +%setup -q +#%patch0 -p1 + +%build +cd unix +%configure +%make VER=-DRELEASE=%{version} + +##%{__sed} -i -e "/.*sbcsdat.c/d" manifest +#./mkfiles.pl +#sed -i -e "s/-O2 -Wall -Werror/$RPM_OPT_FLAGS/g" \ +# -e "s,/usr/local,%{_prefix},g" \ +# unix/Makefile.gtk +#ln -s Makefile.gtk unix/Makefile + +#% make -C unix -f Makefile.gtk VER=-DRELEASE=%{version} + +%install +[ "%{buildroot}" != / ] && rm -rf %{buildroot} +install -d %{buildroot}/{%{_bindir},%{_mandir}/man1} + +%makeinstall -C unix -f Makefile.gtk \ + prefix=%{_prefix} mandir=%{_mandir} + +install -D -m 0644 %{S:1} \ + %{buildroot}%{_datadir}/applications/%{name}.desktop +install -D -m 0644 %{S:2} \ + %{buildroot}%{_datadir}/pixmaps/putty.png + +%clean +[ "%{buildroot}" != / ] && rm -rf %{buildroot} + +%files +%defattr(-,root,root) +%{_bindir}/plink +%{_bindir}/pscp +%{_bindir}/psftp +%{_bindir}/pterm +%{_bindir}/putty +%{_bindir}/puttygen +%{_bindir}/puttytel +%{_datadir}/applications/%{name}.desktop +%{_datadir}/pixmaps/putty.png +%{_mandir}/man1/* +%doc LICENCE README* + +%changelog +* Sat Aug 10 2013 Automatic Build System 0.63-1mamba +- automatic version update by autodist + +* Mon Jan 07 2013 Automatic Build System 0.62-1mamba +- automatic version update by autodist + +* Tue Jul 19 2011 Automatic Build System 0.61-1mamba +- automatic update by autodist + +* Thu Jul 05 2007 Aleph0 0.60-1mamba +- update to 0.60 + +* Wed Dec 20 2006 Davide Madrisan 0.58-2qilnx +- updated desktop file + +* Thu Dec 14 2006 Davide Madrisan 0.58-1qilnx +- update to version 0.58 by autospec +- fixed package group +- new desktop file + +* Fri Mar 11 2005 Davide Madrisan 0.57-2qilnx +- update to version 0.57 by autospec +- also fix security issue QSA-2005-025 (CAN-2005-0467) +- added LICENSE file +- added a missing build requirement: libgtk1-devel + +* Mon Dec 06 2004 Silvan Calarco 0.56-1qilnx +- update to version 0.56 by autospec + +* Thu Jun 03 2004 Silvan Calarco 0.54-1qilnx +- first build