auto-import libupnp-1.3.1-1 on branch devel from libupnp-1.3.1-1.src.rpm

epel8
Eric Tanguy 19 years ago
parent 4f8630bc15
commit f6936bdb2a

@ -1 +1 @@
libupnp-1.2.1a.tar.gz libupnp-1.3.1.tar.gz

@ -1,14 +1,11 @@
Version: 1.2.1a Version: 1.3.1
Summary: Universal Plug and Play (UPnP) SDK Summary: Universal Plug and Play (UPnP) SDK
Name: libupnp Name: libupnp
Release: 6%{?dist} Release: 1%{?dist}
License: BSD License: BSD
Group: System Environment/Libraries Group: System Environment/Libraries
URL: http://upnp.sourceforge.net/ URL: http://upnp.sourceforge.net/
Source: http://ovh.dl.sourceforge.net/sourceforge/upnp/%{name}-%{version}.tar.gz Source: http://ovh.dl.sourceforge.net/sourceforge/upnp/%{name}-%{version}.tar.gz
Patch0: libupnp_dsm_320.patch
Patch1: libupnp_ixml_FC4.patch
Patch2: libupnp_performance.patch
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%description %description
@ -28,61 +25,46 @@ the UPnP SDK libraries.
%prep %prep
%setup -q %setup -q
%patch0 -p0
%patch1 -p0
%patch2 -p1
chmod 644 {LICENSE,README} chmod 644 {LICENSE,README}
# Fix permissions for files in debuginfo package
find . -name '*.[ch]' | xargs chmod 644
# Fix libupnp.so symlink
sed -i -e 's#ln -s \$(PREFIX)/usr/lib/libupnp\.so#ln -s libupnp.so#' upnp/makefile
# Remove -Os optflag and add RPM optflags in makefiles
# Install libraries in correct directories
find . -name '[Mm]akefile' | xargs sed -i \
-e 's/^\([[:space:]]*CFLAGS .*\) -Os/\1/' \
-e 's/^\([[:space:]]*DEBUG_FLAGS .*\) -Os/\1/' \
-e 's/^[[:space:]]*CFLAGS .*/& $(RPM_OPT_FLAGS)/' \
-e 's#/usr/lib\([/ ;]\)#%{_libdir}\1#g' \
-e 's#/usr/lib$#%{_libdir}#g'
%build %build
make -C upnp STRIP="echo Not stripping" %{?_smp_mflags} %configure
make %{?_smp_mflags}
%install %install
rm -rf %{buildroot} rm -rf %{buildroot}
%makeinstall
## Install libupnp.so and headers rm %{buildroot}%{_libdir}/{libixml.la,libthreadutil.la,libupnp.la}
make -C upnp PREFIX=%{buildroot} install
## Install libixml.so and headers
make -C ixml PREFIX=%{buildroot} install
install -p ixml/inc/ixml.h %{buildroot}%{_includedir}/upnp
## Install libthreadutil.so and headers
make -C threadutil PREFIX=%{buildroot} install
%post -p /sbin/ldconfig %post -p /sbin/ldconfig
%postun -p /sbin/ldconfig %postun -p /sbin/ldconfig
%files %files
%defattr(-,root,root,-) %defattr(-,root,root,-)
%doc LICENSE README %doc LICENSE README NEWS
%{_libdir}/libixml.so* %{_libdir}/libixml.so.*
%{_libdir}/libthreadutil.so* %{_libdir}/libthreadutil.so.*
%{_libdir}/libupnp.so* %{_libdir}/libupnp.so.*
%files devel %files devel
%defattr(0644,root,root,0755) %defattr(0644,root,root,0755)
%{_includedir}/upnp/ %{_includedir}/upnp/
%{_libdir}/libixml.so
%{_libdir}/libthreadutil.so
%{_libdir}/libupnp.so
%{_libdir}/libixml.a
%{_libdir}/libthreadutil.a
%{_libdir}/libupnp.a
%{_libdir}/pkgconfig/libupnp.pc
%clean %clean
rm -rf %{buildroot} rm -rf %{buildroot}
%changelog %changelog
* Sun Mar 05 2006 Eric Tanguy <eric.tanguy@univ-nantes.fr> - 1.3.1-1
- Update to 1.3.1
* Tue Feb 14 2006 Eric Tanguy <eric.tanguy@univ-nantes.fr> - 1.2.1a-6 * Tue Feb 14 2006 Eric Tanguy <eric.tanguy@univ-nantes.fr> - 1.2.1a-6
- Rebuild for FC5 - Rebuild for FC5

@ -1,301 +0,0 @@
diff -Naur ../libupnp-1.2.1a/upnp/inc/config.h upnp/inc/config.h
--- ../libupnp-1.2.1a/upnp/inc/config.h 2003-02-13 17:19:02.000000000 +0100
+++ upnp/inc/config.h 2005-11-05 20:42:25.000000000 +0100
@@ -56,6 +56,17 @@
#define THREAD_IDLE_TIME 5000
//@}
+/** @name X_USER_AGENT
+ * The {\tt X_USER_AGENT} constant specifies the value of the X-User-Agent:
+ * HTTP header. The value "redsonic" is needed for the DSM-320. See
+ * https://sourceforge.net/forum/message.php?msg_id=3166856 for more
+ * information
+ */
+
+//@{
+#define X_USER_AGENT "redsonic"
+//@}
+
/** @name JOBS_PER_THREAD
* The {\tt JOBS_PER_THREAD} constant determines when a new thread will be
* allocated to the thread pool inside the SDK. The thread pool will
diff -Naur ../libupnp-1.2.1a/upnp/src/gena/gena_device.c upnp/src/gena/gena_device.c
--- ../libupnp-1.2.1a/upnp/src/gena/gena_device.c 2003-02-13 17:19:11.000000000 +0100
+++ upnp/src/gena/gena_device.c 2005-11-05 20:18:42.000000000 +0100
@@ -1164,10 +1164,16 @@
membuffer_init( &response );
response.size_inc = 30;
+/* - PATCH START - Sergey 'Jin' Bostandzhyan <jin_eld at users.sourceforge.net>
+ * added X-User-Agent header
+ */
if( http_MakeMessage( &response, major, minor,
- "R" "D" "S" "ssc" "sc" "c",
+ "R" "D" "S" "Xc" "ssc" "sc" "c",
HTTP_OK,
- "SID: ", sub->sid, timeout_str ) != 0 ) {
+ X_USER_AGENT,
+ "SID: ", sub->sid, timeout_str ) != 0 )
+/* - PATCH END --- */
+ {
membuffer_destroy( &response );
error_respond( info, HTTP_INTERNAL_SERVER_ERROR, request );
return UPNP_E_OUTOF_MEMORY;
diff -Naur ../libupnp-1.2.1a/upnp/src/genlib/net/http/httpreadwrite.c upnp/src/genlib/net/http/httpreadwrite.c
--- ../libupnp-1.2.1a/upnp/src/genlib/net/http/httpreadwrite.c 2003-02-13 17:19:13.000000000 +0100
+++ upnp/src/genlib/net/http/httpreadwrite.c 2005-11-05 20:04:51.000000000 +0100
@@ -1632,6 +1632,9 @@
* appends content-length, content-type and HTML body for given code
* 'T': arg = char * content_type; format e.g: "text/html";
* content-type header
+* --- PATCH START - Sergey 'Jin' Bostandzhyan <jin_eld@users.sourceforge.net>
+* 'X': arg = const char useragent; "redsonic" HTTP X-User-Agent: useragent
+* --- PATCH END ---
*
* Return : int;
* 0 - On Success
@@ -1800,6 +1803,24 @@
}
}
+/* --- PATCH START - Sergey 'Jin' Bostandzhyan <jin_eld@users.sourceforge.net> */
+ if( c == 'X' ) // C string
+ {
+ s = ( char * )va_arg( argp, char * );
+
+ assert( s );
+
+ if( membuffer_append_str( buf, "X-User-Agent: ") != 0 ) {
+ goto error_handler;
+ }
+ if( membuffer_append( buf, s, strlen( s ) ) != 0 ) {
+ goto error_handler;
+ }
+ }
+
+/* --- PATCH END --- */
+
+
else if( c == 'R' ) {
// response start line
// e.g.: 'HTTP/1.1 200 OK'
diff -Naur ../libupnp-1.2.1a/upnp/src/genlib/net/http/webserver.c upnp/src/genlib/net/http/webserver.c
--- ../libupnp-1.2.1a/upnp/src/genlib/net/http/webserver.c 2003-02-13 17:19:14.000000000 +0100
+++ upnp/src/genlib/net/http/webserver.c 2005-11-05 20:53:56.000000000 +0100
@@ -1368,16 +1368,22 @@
}
if( RespInstr->IsRangeActive && RespInstr->IsChunkActive ) {
+
+/* - PATCH START - Sergey 'Jin' Bostandzhyan <jin_eld at users.sourceforge.net>
+ * added X-User-Agent header
+ */
+
//Content-Range: bytes 222-3333/4000 HTTP_PARTIAL_CONTENT
//Transfer-Encoding: chunked
// K means add chunky header ang G means range header.
- if( http_MakeMessage( headers, resp_major, resp_minor, "RTGKDstcSCc", HTTP_PARTIAL_CONTENT, // status code
+ if( http_MakeMessage( headers, resp_major, resp_minor, "RTGKDstcSXcCc", HTTP_PARTIAL_CONTENT, // status code
// RespInstr->ReadSendSize,// content length
finfo.content_type,
// content_type.buf, // content type
RespInstr, // Range
"LAST-MODIFIED: ",
- &finfo.last_modified ) != 0 ) {
+ &finfo.last_modified,
+ X_USER_AGENT) != 0 ) {
goto error_handler;
}
} else if( RespInstr->IsRangeActive && !RespInstr->IsChunkActive ) {
@@ -1385,13 +1391,14 @@
//Content-Range: bytes 222-3333/4000 HTTP_PARTIAL_CONTENT
//Transfer-Encoding: chunked
// K means add chunky header ang G means range header.
- if( http_MakeMessage( headers, resp_major, resp_minor, "RNTGDstcSCc", HTTP_PARTIAL_CONTENT, // status code
+ if( http_MakeMessage( headers, resp_major, resp_minor, "RNTGDstcSXcCc", HTTP_PARTIAL_CONTENT, // status code
RespInstr->ReadSendSize, // content length
finfo.content_type,
//content_type.buf, // content type
RespInstr, //Range Info
"LAST-MODIFIED: ",
- &finfo.last_modified ) != 0 ) {
+ &finfo.last_modified,
+ X_USER_AGENT) != 0 ) {
goto error_handler;
}
@@ -1400,12 +1407,13 @@
//Content-Range: bytes 222-3333/4000 HTTP_PARTIAL_CONTENT
//Transfer-Encoding: chunked
// K means add chunky header ang G means range header.
- if( http_MakeMessage( headers, resp_major, resp_minor, "RKTDstcSCc", HTTP_OK, // status code
+ if( http_MakeMessage( headers, resp_major, resp_minor, "RKTDstcSXcCc", HTTP_OK, // status code
//RespInstr->ReadSendSize,// content length
finfo.content_type,
// content_type.buf, // content type
"LAST-MODIFIED: ",
- &finfo.last_modified ) != 0 ) {
+ &finfo.last_modified,
+ X_USER_AGENT) != 0 ) {
goto error_handler;
}
@@ -1414,28 +1422,31 @@
//Content-Range: bytes 222-3333/4000 HTTP_PARTIAL_CONTENT
//Transfer-Encoding: chunked
// K means add chunky header ang G means range header.
- if( http_MakeMessage( headers, resp_major, resp_minor, "RNTDstcSCc", HTTP_OK, // status code
+ if( http_MakeMessage( headers, resp_major, resp_minor, "RNTDstcSXcCc", HTTP_OK, // status code
RespInstr->ReadSendSize, // content length
finfo.content_type,
//content_type.buf, // content type
"LAST-MODIFIED: ",
- &finfo.last_modified ) != 0 ) {
+ &finfo.last_modified,
+ X_USER_AGENT) != 0 ) {
goto error_handler;
}
} else {
//Content-Range: bytes 222-3333/4000 HTTP_PARTIAL_CONTENT
//Transfer-Encoding: chunked
// K means add chunky header ang G means range header.
- if( http_MakeMessage( headers, resp_major, resp_minor, "RTDstcSCc", HTTP_OK, // status code
+ if( http_MakeMessage( headers, resp_major, resp_minor, "RTDstcSXcCc", HTTP_OK, // status code
//RespInstr->ReadSendSize,// content length
finfo.content_type,
//content_type.buf, // content type
"LAST-MODIFIED: ",
- &finfo.last_modified ) != 0 ) {
+ &finfo.last_modified,
+ X_USER_AGENT) != 0 ) {
goto error_handler;
}
}
}
+/* -- PATCH END -- */
if( req->method == HTTPMETHOD_HEAD ) {
*rtype = RESP_HEADERS;
@@ -1717,8 +1728,14 @@
http_RecvPostMessage( parser, info, filename.buf,
&RespInstr );
//Send response.
- http_MakeMessage( &headers, 1, 1, "RTDSCc", ret,
- "text/html" );
+
+/* - PATCH START - Sergey 'Jin' Bostandzhyan <jin_eld at users.sourceforge.net>
+ * added X-User-Agent header
+ */
+ http_MakeMessage( &headers, 1, 1, "RTDSXcCc", ret,
+ "text/html", X_USER_AGENT );
+/* - PATCH END --- */
+
http_SendMessage( info, &timeout, "b", headers.buf,
headers.length );
break;
diff -Naur ../libupnp-1.2.1a/upnp/src/soap/soap_device.c upnp/src/soap/soap_device.c
--- ../libupnp-1.2.1a/upnp/src/soap/soap_device.c 2003-02-13 17:19:20.000000000 +0100
+++ upnp/src/soap/soap_device.c 2005-11-05 20:44:41.000000000 +0100
@@ -221,17 +221,20 @@
// make headers
membuffer_init( &headers );
+/* -- PATCH START - Sergey 'Jin' Bostandzhyan <jin_eld at users.sourceforge.net> */
if( http_MakeMessage( &headers, major, minor,
- "RNsDsSc" "sssss",
+ "RNsDsSXc" "sssss",
500,
content_length,
ContentTypeHeader,
"EXT:\r\n",
+ X_USER_AGENT,
start_body, err_code_str, mid_body, err_msg,
end_body ) != 0 ) {
membuffer_destroy( &headers );
return; // out of mem
}
+/*-- PATCH END - */
// send err msg
http_SendMessage( info, &timeout_secs, "b",
headers.buf, headers.length );
@@ -285,16 +288,21 @@
// make headers
membuffer_init( &response );
+
+/* -- PATCH START - Sergey 'Jin' Bostandzhyan <jin_eld at users.sourceforge.net> */
if( http_MakeMessage( &response, major, minor,
- "RNsDsSc" "sss",
+ "RNsDsSXcc" "sss",
HTTP_OK,
content_length,
ContentTypeHeader,
"EXT:\r\n",
+ X_USER_AGENT,
start_body, var_value, end_body ) != 0 ) {
membuffer_destroy( &response );
return; // out of mem
}
+/* -- PATCH END - */
+
// send msg
http_SendMessage( info, &timeout_secs, "b",
response.buf, response.length );
@@ -704,11 +712,14 @@
strlen( end_body );
// make headers
- if( http_MakeMessage( &headers, major, minor, "RNsDsSc", HTTP_OK, // status code
- content_length, ContentTypeHeader, "EXT:\r\n" // EXT header
+/* -- PATCH START - Sergey 'Jin' Bostandzhyan <jin_eld at users.sourceforge.net> */
+ if( http_MakeMessage( &headers, major, minor, "RNsDsSXcc", HTTP_OK, // status code
+ content_length, ContentTypeHeader, "EXT:\r\n", X_USER_AGENT // EXT header
) != 0 ) {
goto error_handler;
}
+/* -- PATCH END - */
+
// send whole msg
ret_code = http_SendMessage( info, &timeout_secs, "bbbb",
headers.buf, headers.length,
diff -Naur ../libupnp-1.2.1a/upnp/src/ssdp/ssdp_device.c upnp/src/ssdp/ssdp_device.c
--- ../libupnp-1.2.1a/upnp/src/ssdp/ssdp_device.c 2003-02-13 17:19:21.000000000 +0100
+++ upnp/src/ssdp/ssdp_device.c 2005-11-05 21:04:52.000000000 +0100
@@ -290,12 +290,16 @@
*packet = NULL;
if( msg_type == MSGTYPE_REPLY ) {
+/* -- PATCH START - Sergey 'Jin' Bostandzhyan <jin_eld at users.sourceforge.net> */
ret_code = http_MakeMessage( &buf, 1, 1,
- "R" "sdc" "D" "s" "ssc" "S" "ssc"
+ "R" "sdc" "D" "s" "ssc" "S" "Xc" "ssc"
"ssc" "c", HTTP_OK,
"CACHE-CONTROL: max-age=", duration,
"EXT:\r\n", "LOCATION: ", location,
+ X_USER_AGENT,
"ST: ", nt, "USN: ", usn );
+/* -- PATCH END - */
+
if( ret_code != 0 ) {
return;
}
@@ -310,14 +314,16 @@
// NOTE: The CACHE-CONTROL and LOCATION headers are not present in
// a shutdown msg, but are present here for MS WinMe interop.
-
+
+/* -- PATCH START - Sergey 'Jin' Bostandzhyan <jin_eld at users.sourceforge.net> */
ret_code = http_MakeMessage( &buf, 1, 1,
"Q" "sssdc" "sdc" "ssc" "ssc" "ssc"
- "S" "ssc" "c", HTTPMETHOD_NOTIFY, "*",
+ "S" "Xc" "ssc" "c", HTTPMETHOD_NOTIFY, "*",
1, "HOST: ", SSDP_IP, ":", SSDP_PORT,
"CACHE-CONTROL: max-age=", duration,
"LOCATION: ", location, "NT: ", nt,
- "NTS: ", nts, "USN: ", usn );
+ "NTS: ", nts, X_USER_AGENT, "USN: ", usn );
+/* -- PATCH END - */
if( ret_code != 0 ) {
return;
}

@ -1,18 +0,0 @@
--- ../libupnp-1.2.1a/ixml/src/element.c 2003-02-13 17:18:51.000000000 +0100
+++ ixml/src/element.c 2005-11-05 20:47:25.000000000 +0100
@@ -454,9 +454,12 @@
element->n.firstAttr = nextSib;
}
- ( IXML_Attr * ) attrNode->parentNode = NULL;
- ( IXML_Attr * ) attrNode->prevSibling = NULL;
- ( IXML_Attr * ) attrNode->nextSibling = NULL;
+ // removed the casts, else it did not compile on FC4
+ // Sergey 'Jin' Bostandzhyan <jin_eld at users.sourceforge.net>
+ attrNode->parentNode = NULL;
+ attrNode->prevSibling = NULL;
+ attrNode->nextSibling = NULL;
+
*rtAttr = ( IXML_Attr * ) attrNode;
return IXML_SUCCESS;

@ -1,20 +0,0 @@
--- libupnp-1.2.1a/upnp/inc/config.h 2003-02-13 17:19:02.000000000 +0100
+++ libupnp-1.2.1a/upnp/inc/config.h 2005-03-08 21:26:25.000000000 +0100
@@ -65,7 +65,7 @@
*/
//@{
-#define JOBS_PER_THREAD 10
+#define JOBS_PER_THREAD 1
//@}
/** @name MIN_THREADS
@@ -78,7 +78,7 @@
*/
//@{
-#define MIN_THREADS 2
+#define MIN_THREADS 4
//@}
/** @name MAX_THREADS

@ -1 +1 @@
e72b3550bf064eedf080f16f09688891 libupnp-1.2.1a.tar.gz 6646be5e31e58188e8f47c6ce64faa4c libupnp-1.3.1.tar.gz

Loading…
Cancel
Save