mongoose
No description set
- Download package
-
Checkout Package
osc -A https://api.opensuse.org checkout systemsmanagement:wbem/mongoose && cd $_
- Create Badge
Refresh
Refresh
Source Files
Filename | Size | Changed |
---|---|---|
CMakeLists.txt | 0000001906 1.86 KB | |
mongoose-6.4.tar.gz | 0001955019 1.86 MB | |
mongoose.changes | 0000003785 3.7 KB | |
mongoose.spec | 0000002935 2.87 KB |
Latest Revision
Klaus Kämpf (kwk)
committed
(revision 2)
- Update to 6.4 - see https://github.com/cesanta/mongoose/releases - dropped mongoose-fix-libmongoose-so-build.patch and mongoose-fix-no-ssl-dl-build-error.patch, both upstream --This line, and those below, will be ignored-- A CMakeLists.txt D mongoose-3.1.tgz D mongoose-3.8.tgz A mongoose-6.4.tar.gz D mongoose-fix-libmongoose-so-build.patch D mongoose-fix-no-ssl-dl-build-error.patch M mongoose.changes D mongoose.conf M mongoose.spec Diff for working copy: . Index: mongoose.changes =================================================================== --- mongoose.changes (revision 1) +++ mongoose.changes (working copy) @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Mon Jun 20 07:59:51 UTC 2016 - kkaempf@suse.com + +- Update to 6.4 + - see https://github.com/cesanta/mongoose/releases + - dropped mongoose-fix-libmongoose-so-build.patch + and mongoose-fix-no-ssl-dl-build-error.patch, both upstream + ------------------------------------------------------------------- Wed Nov 6 13:26:31 UTC 2013 - boris@steki.net Index: mongoose.spec =================================================================== --- mongoose.spec (revision 1) +++ mongoose.spec (working copy) @@ -16,36 +16,30 @@ # -%define soname libmongoose3 +%define soname libmongoose6 Name: mongoose -Summary: An easy-to-use self-sufficient web server -License: MIT +Summary: Embedded Web Server / Embedded Networking Library +License: GPL-2.0 Group: Development/Libraries/C and C++ -Version: 3.1 +Version: 6.4 Release: 2%{?dist} -Url: http://code.google.com/p/mongoose -Source0: http://mongoose.googlecode.com/files/mongoose-%{version}.tgz -Source1: mongoose.conf +Url: https://github.com/cesanta/mongoose +Source0: %{name}-%{version}.tar.gz +Source1: CMakeLists.txt +BuildRequires: cmake BuildRequires: gcc-c++ BuildRequires: openssl-devel # Build changes: -# http://code.google.com/p/mongoose/issues/detail?id=372 -Patch0: mongoose-fix-libmongoose-so-build.patch -# http://code.google.com/p/mongoose/issues/detail?id=371 -Patch1: mongoose-fix-no-ssl-dl-build-error.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %description -Mongoose web server executable is self-sufficient, it does not depend on -anything to start serving requests. If it is copied to any directory and -executed, it starts to serve that directory on port 8080 (so to access files, -go to http://localhost:8080). If some additional configuration is required - -for example, different listening port or IP-based access control, then a -'mongoose.conf' file with respective options can be created in the same -directory where executable lives. This makes Mongoose perfect for all sorts -of demos, quick tests, file sharing, and Web programming. +Mongoose is ideal for embedded environments. It has been designed for +connecting devices and bringing them online. On the market since 2004, +used by vast number of open source and commercial products - it even +runs on space stations! Mongoose makes embedded network programming +fast, robust, and easy. %package -n %{soname} Summary: Shared Object for applications that use %{name} embedded @@ -70,46 +64,36 @@ comprisable header file. %prep -%setup -q -n %{name} -%patch0 -p1 -b .solib-build -%patch1 -p1 -b .nossldl-build +%setup -q %{__install} -p -m 0644 %{SOURCE1} . %build -export VERSION=%{version} -%{__make} %{?_smp_mflags} VER="$VERSION" SOVER="${VERSION%.?}" \ - CFLAGS="%{optflags} -lssl -lcrypto -DNO_SSL_DL" linux +rm -rf build +mkdir build +cd build +cmake \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_VERBOSE_MAKEFILE=TRUE \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_C_FLAGS_RELEASE:STRING="$RPM_OPT_FLAGS" \ + -DCMAKE_SKIP_RPATH=1 \ + -DLIB=%{_lib} \ + .. + +make %install -%{__rm} -rf %{buildroot} -%{__install} -D -p -m 0755 %{name} %{buildroot}/%{_bindir}/%{name} -%{__install} -D -p -m 0644 %{name}.1 %{buildroot}/%{_mandir}/man1/%{name}.1 -# -lib subpackage -export VERSION=%{version} -%{__install} -D -p -m 0755 lib%{name}.so.%{version} \ - %{buildroot}/%{_libdir}/lib%{name}.so.$VERSION -ln -s %{_libdir}/lib%{name}.so.$VERSION \ - %{buildroot}/%{_libdir}/lib%{name}.so.${VERSION%.?} -# -devel subpackage -%{__install} -D -p -m 0644 %{name}.h %{buildroot}/%{_includedir}/%{name}.h -ln -s %{_libdir}/lib%{name}.so.$VERSION \ - %{buildroot}/%{_libdir}/lib%{name}.so - -%clean -%{__rm} -rf %{buildroot} - -%files -%defattr(-,root,root,-) -%doc %{name}.conf LICENSE -%{_bindir}/%{name} -%{_mandir}/man1/%{name}.1* +cd build +make install DESTDIR=%{buildroot} %files -n %{soname} %defattr(-,root,root,-) +%doc LICENSE %{_libdir}/lib%{name}.so.* %files devel %defattr(-,root,root,-) +%doc README.md %{_includedir}/%{name}.h %{_libdir}/lib%{name}.so Index: mongoose-6.4.tar.gz =================================================================== Binary file 'mongoose-6.4.tar.gz' added. Index: CMakeLists.txt =================================================================== --- CMakeLists.txt (revision 0) +++ CMakeLists.txt (revision 0) @@ -0,0 +1,63 @@ +# +# CMakeLists.txt for mongoose +# + +PROJECT(mongoose) + +cmake_minimum_required(VERSION 2.4) + +# +# cmake2.6: backward compatibility to cmake 2.4 +# +if(COMMAND cmake_policy) + cmake_policy(SET CMP0003 OLD) + cmake_policy(SET CMP0005 OLD) + if ( POLICY CMP0046 ) + cmake_policy(SET CMP0046 OLD) + endif ( POLICY CMP0046 ) +endif(COMMAND cmake_policy) + +# where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is checked +SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules ${CMAKE_MODULE_PATH}) + +# Library path (lib / lib64 ) + +IF ( DEFINED LIB ) + SET ( LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/${LIB}" ) +ELSE ( DEFINED LIB ) + IF (CMAKE_SIZEOF_VOID_P MATCHES "8") + SET( LIB_SUFFIX "64" ) + ENDIF(CMAKE_SIZEOF_VOID_P MATCHES "8") + SET ( LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}" ) +ENDIF ( DEFINED LIB ) +MESSAGE(STATUS "Libraries will be installed in ${LIB_INSTALL_DIR}" ) +SET( BIN_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/bin" ) +SET( INCLUDE_DIR "${CMAKE_INSTALL_PREFIX}/include" ) +IF( "${CMAKE_INSTALL_PREFIX}" STREQUAL "/usr") + SET( SYSCONFDIR "/etc" ) +ELSE( "${CMAKE_INSTALL_PREFIX}" STREQUAL "/usr") + SET( SYSCONFDIR "${CMAKE_INSTALL_PREFIX}/etc" ) +ENDIF( "${CMAKE_INSTALL_PREFIX}" STREQUAL "/usr") + +INCLUDE(FindOpenSSL) +IF(NOT OPENSSL_FOUND) + MESSAGE(ERROR " openssl-devel not installed" ) +ENDIF(NOT OPENSSL_FOUND) + + + +INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR} ${OPENSSL_INCLUDE_DIR}) + +SET( mongoose_SOURCES mongoose.c) +SET( mongoose_HEADERS mongoose.h) + +ADD_LIBRARY( mongoose SHARED ${mongoose_SOURCES} ) +TARGET_LINK_LIBRARIES( mongoose ${LIBXML2_LIBRARIES} ) +TARGET_LINK_LIBRARIES( mongoose ${OPENSSL_LIBRARIES}) +TARGET_LINK_LIBRARIES( mongoose ${CMAKE_THREAD_LIBS_INIT} ) + + +SET_TARGET_PROPERTIES(mongoose PROPERTIES VERSION 6.0.0 SOVERSION 6) +INSTALL(TARGETS mongoose DESTINATION ${LIB_INSTALL_DIR}) + +INSTALL(FILES ${mongoose_HEADERS} DESTINATION ${INCLUDE_DIR}) Index: mongoose-3.1.tgz =================================================================== Binary file 'mongoose-3.1.tgz' deleted. Index: mongoose-3.8.tgz =================================================================== Binary file 'mongoose-3.8.tgz' deleted. Index: mongoose-fix-libmongoose-so-build.patch =================================================================== --- mongoose-fix-libmongoose-so-build.patch (revision 1) +++ mongoose-fix-libmongoose-so-build.patch (working copy) @@ -1,23 +0,0 @@ -diff -pruN a/Makefile b/Makefile ---- a/Makefile 2012-03-11 19:41:34.000000000 -0300 -+++ b/Makefile 2012-07-05 21:02:19.380557317 -0300 -@@ -25,7 +25,8 @@ all: - CFLAGS = -W -Wall -std=c99 -pedantic -O2 $(COPT) - MAC_SHARED = -flat_namespace -bundle -undefined suppress - LINFLAGS = -ldl -pthread $(CFLAGS) --LIB = _$(PROG).so -+LIB = lib$(PROG).so -+SONAME = $(LIB).$(SOVER) - CC = g++ - - # Make sure that the compiler flags come last in the compilation string. -@@ -33,7 +34,8 @@ CC = g++ - # "-Wl,--as-needed" turned on by default in cc command. - # Also, this is turned in many other distros in static linkage builds. - linux: -- $(CC) mongoose.c -shared -fPIC -fpic -o $(LIB) $(LINFLAGS) -+ $(CC) mongoose.c -shared -fPIC -fpic -Wl,-soname,$(SONAME) \ -+ -o $(LIB).$(VER) $(LINFLAGS) - $(CC) mongoose.c main.c -o $(PROG) $(LINFLAGS) - - bsd: Index: mongoose-fix-no-ssl-dl-build-error.patch =================================================================== --- mongoose-fix-no-ssl-dl-build-error.patch (revision 1) +++ mongoose-fix-no-ssl-dl-build-error.patch (working copy) @@ -1,34 +0,0 @@ -diff -pruN a/mongoose.c b/mongoose.c ---- a/mongoose.c 2012-03-11 19:41:35.000000000 -0300 -+++ b/mongoose.c 2012-07-05 18:39:35.734964177 -0300 -@@ -270,28 +270,8 @@ typedef struct ssl_ctx_st SSL_CTX; - #define CRYPTO_LOCK 1 - - #if defined(NO_SSL_DL) --extern void SSL_free(SSL *); --extern int SSL_accept(SSL *); --extern int SSL_connect(SSL *); --extern int SSL_read(SSL *, void *, int); --extern int SSL_write(SSL *, const void *, int); --extern int SSL_get_error(const SSL *, int); --extern int SSL_set_fd(SSL *, int); --extern SSL *SSL_new(SSL_CTX *); --extern SSL_CTX *SSL_CTX_new(SSL_METHOD *); --extern SSL_METHOD *SSLv23_server_method(void); --extern int SSL_library_init(void); --extern void SSL_load_error_strings(void); --extern int SSL_CTX_use_PrivateKey_file(SSL_CTX *, const char *, int); --extern int SSL_CTX_use_certificate_file(SSL_CTX *, const char *, int); --extern int SSL_CTX_use_certificate_chain_file(SSL_CTX *, const char *); --extern void SSL_CTX_set_default_passwd_cb(SSL_CTX *, mg_callback_t); --extern void SSL_CTX_free(SSL_CTX *); --extern unsigned long ERR_get_error(void); --extern char *ERR_error_string(unsigned long, char *); --extern int CRYPTO_num_locks(void); --extern void CRYPTO_set_locking_callback(void (*)(int, int, const char *, int)); --extern void CRYPTO_set_id_callback(unsigned long (*)(void)); -+#include <openssl/ssl.h> -+#include <openssl/err.h> - #else - // Dynamically loaded SSL functionality - struct ssl_func { Index: mongoose.conf =================================================================== --- mongoose.conf (revision 1) +++ mongoose.conf (working copy) @@ -1,30 +0,0 @@ -# Mongoose web server configuration file. -# Lines starting with '#' and empty lines are ignored. -# For detailed description of every option, visit -# http://code.google.com/p/mongoose/wiki/MongooseManual - -root /tmp -ports 80,443s -access_log /tmp/mongoose_access_log.txt -error_log /tmp/mongoose_error_log.txt - -# NOTE FOR PHP USERS: -# Correct PHP binary to use is php-cgi, NOT php! -# cgi_interp /usr/bin/php-cgi -# cgi_interp /usr/bin/perl - -# cgi_ext cgi,pl,php -# ssi_ext shtml,shtm -# auth_realm mydomain.com -# dir_list no -# index_files index.html,index.htm,index.php,index.cgi -# aliases /my_d_disk=d:\,/my_e_disk=e:\ -# acl -0.0.0.0/0,+10.0.0.0/8,+192.168.0.0/16 -# admin_uri /remote_admin -# protect /remote_admin=c:\passwords.txt -# cgi_env FOO=BAR,BAZ=POO -# auth_gpass c:\mongoose_global_web_passwords.txt -# auth_PUT c:\mongoose_put_delete_passwords.txt -# ssl_cert ssl_cert.pem -# max_threads 100 -# idle_time 10
Comments 0