From 2d897d39ef0ae987bac9faaf6e9c843d2ab99ada Mon Sep 17 00:00:00 2001 From: Pekka Riikonen Date: Sun, 18 Nov 2007 09:48:43 +0000 Subject: [PATCH] Added spec file. --- apps/silcd/Makefile.am | 2 +- apps/silcd/server_query.c | 9 +++--- apps/silcd/silc-server.spec.in | 51 ++++++++++++++++++++++++++++++++++ 3 files changed, 57 insertions(+), 5 deletions(-) create mode 100644 apps/silcd/silc-server.spec.in diff --git a/apps/silcd/Makefile.am b/apps/silcd/Makefile.am index b15b1d4a..4a104650 100644 --- a/apps/silcd/Makefile.am +++ b/apps/silcd/Makefile.am @@ -39,7 +39,7 @@ silcd_SOURCES = \ LIBS = $(SILC_COMMON_LIBS) LDADD = -EXTRA_DIST = *.h +EXTRA_DIST = silc-server.spec *.h install-dirs-server: -mkdir -p $(docdir) diff --git a/apps/silcd/server_query.c b/apps/silcd/server_query.c index 0725286c..59eda802 100644 --- a/apps/silcd/server_query.c +++ b/apps/silcd/server_query.c @@ -1516,6 +1516,7 @@ void silc_server_query_send_reply(SilcServer server, SilcUInt16 ident = silc_command_get_ident(cmd->payload); SilcStatus status; unsigned char *tmp; + char *tmp2; SilcUInt32 len; SilcBuffer idp; int i, k, valid_count; @@ -1642,8 +1643,8 @@ void silc_server_query_send_reply(SilcServer server, hsock = entry->connection; silc_strncat(uh, sizeof(uh), "@", 1); silc_socket_stream_get_info(silc_packet_stream_get_stream(hsock), - NULL, (const char **)&tmp, NULL, NULL); - silc_strncat(uh, sizeof(uh), tmp, strlen(tmp)); + NULL, (const char **)&tmp2, NULL, NULL); + silc_strncat(uh, sizeof(uh), tmp2, strlen(tmp2)); } if (idata->conn_type == SILC_CONN_CLIENT) @@ -1733,9 +1734,9 @@ void silc_server_query_send_reply(SilcServer server, hsock = entry->connection; silc_strncat(uh, sizeof(uh), "@", 1); silc_socket_stream_get_info(silc_packet_stream_get_stream(hsock), - NULL, (const char **)&tmp, + NULL, (const char **)&tmp2, NULL, NULL); - silc_strncat(uh, sizeof(uh), tmp, strlen(tmp)); + silc_strncat(uh, sizeof(uh), tmp2, strlen(tmp2)); } silc_server_send_command_reply(server, cmd->sock, query->querycmd, diff --git a/apps/silcd/silc-server.spec.in b/apps/silcd/silc-server.spec.in new file mode 100644 index 00000000..060ea61e --- /dev/null +++ b/apps/silcd/silc-server.spec.in @@ -0,0 +1,51 @@ +Summary: SILC Server +Name: silc-server +Version: SILC_VERSION +Release: SILC_RELEASE +License: GPL +Group: Applications/Communications +URL: http://silcnet.org/ +Source0: silc-server-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot +BuildRequires: silc-toolkit-devel +Requires: silc-toolkit >= 1.1 + +%description +SILC (Secure Internet Live Conferencing) is a protocol which provides +secure conferencing services on the Internet over insecure channel. + +%prep +%setup -q + +%build +%configure --prefix=%{_prefix} \ + --mandir=%{_mandir} \ + --infodir=%{_infodir} \ + --bindir=%{_bindir} \ + --sbindir=%{_sbindir} \ + --datadir=%{_datadir} \ + --enable-ipv6 +make -j4 + +%install +rm -rf $RPM_BUILD_ROOT +make DESTDIR=$RPM_BUILD_ROOT install +mv $RPM_BUILD_ROOT/%{_datadir}/doc/silc-server \ + $RPM_BUILD_ROOT/%{_datadir}/doc/silc-server-%version + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%defattr (755,root,root,755) +%{_sbindir}/* +%defattr (644,root,root,755) +%{_sysconfdir}/silcd.conf +%{_sysconfdir}/silcalgs.conf +%{_mandir}/man5/* +%{_mandir}/man8/* +%doc %{_datadir}/doc + +%changelog +* Sun Nov 18 2007 - Pekka Riikonen +- Initial version -- 2.24.0