diff --git a/.cvsignore b/.cvsignore index e69de29..6e56ed9 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1 @@ +stund_0.96_Aug13.tgz diff --git a/import.log b/import.log new file mode 100644 index 0000000..c16e22f --- /dev/null +++ b/import.log @@ -0,0 +1 @@ +stun-0_96-2_fc8:HEAD:stun-0.96-2.fc8.src.rpm:1230146904 diff --git a/patch0.diff b/patch0.diff new file mode 100644 index 0000000..9059726 --- /dev/null +++ b/patch0.diff @@ -0,0 +1,22 @@ +--- stun.cxx 2005-08-14 06:09:03.000000000 +0530 ++++ stun.cxx.huzaifas 2008-04-09 15:11:29.000000000 +0530 +@@ -669,16 +669,16 @@ + tick = hightick; + tick <<= 32; + tick |= lowtick; +-#elif defined(__GNUC__) && ( defined(__i686__) || defined(__i386__) ) ++#elif defined(__GNUC__) && ( defined(__i686__) || defined(__i386__) || defined(__x86_64__) ) + asm("rdtsc" : "=A" (tick)); +-#elif defined (__SUNPRO_CC) || defined( __sparc__ ) ++#elif defined (__SUNPRO_CC) || defined( __sparc__ ) + tick = gethrtime(); + #elif defined(__MACH__) + int fd=open("/dev/random",O_RDONLY); + read(fd,&tick,sizeof(tick)); + closesocket(fd); + #else +-# error Need some way to seed the random number generator ++/* # error Need some way to seed the random number generator */ + #endif + int seed = int(tick); + #ifdef WIN32 diff --git a/sources b/sources index e69de29..5c685b6 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +af23f5f19ed059269f0e29745353a069 stund_0.96_Aug13.tgz diff --git a/stun.spec b/stun.spec new file mode 100644 index 0000000..33173bb --- /dev/null +++ b/stun.spec @@ -0,0 +1,72 @@ +%define download_name stund +%define download_version _0.96_Aug13.tgz + +Name: stun +Version: 0.96 +Release: 2%{?dist} +Summary: Implements a simple Stun Client +Group: Applications/Communications +License: Vovida Software License 1.0 +URL: http://sourceforge.net/projects/%{name} +Source0: http://downloads.sourceforge.net/%{name}/%{download_name}%{download_version} +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +Patch0: patch0.diff + +%description +Implements a simple STUN client on Windows, Linux, and Solaris. +The STUN protocol (Simple Traversal of UDP through NATs) is described in the +IETF RFC 3489, available at http://www.ietf.org/rfc/rfc3489.txt + +%package server +Summary: Implements the Stun Server +Group: Applications/Communications + +%description server +Implements a simple STUN client on Windows, Linux, and Solaris. +The STUN protocol (Simple Traversal of UDP through NATs) is described in the +IETF RFC 3489, available at http://www.ietf.org/rfc/rfc3489.txt + + +%prep +%setup -q -n %{download_name} +%patch0 -p0 + +%build +make %{?_smp_mflags} + + +%install +rm -rf $RPM_BUILD_ROOT + +mkdir -p $RPM_BUILD_ROOT%{_bindir} +mkdir -p $RPM_BUILD_ROOT%{_sbindir} +install client $RPM_BUILD_ROOT%{_bindir}/stun-client +install server $RPM_BUILD_ROOT%{_sbindir}/stun-server + + + +%clean +rm -rf $RPM_BUILD_ROOT + + +%files +%defattr(-,root,root,-) +%doc rfc3489.txt +%{_bindir}/stun-client + +%files server +%{_sbindir}/stun-server + + + + +%changelog +* Wed Apr 9 2008 Huzaifa Sidhpurwala - 0.96-2 +- Patched for ppc and x86_64 + +* Mon Jan 21 2008 Huzaifa Sidhpurwala - 0.96-1 +- Used correct macros + +* Mon Jan 21 2008 Huzaifa Sidhpurwala - 0.96-0 +- Initial version +