diff --git a/.gitignore b/.gitignore
index b3febbc..558bad1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -16,3 +16,4 @@
 /qpid-proton-0.13.1.tar.gz
 /qpid-proton-0.14.0.tar.gz
 /qpid-proton-0.17.0.tar.gz
+/qpid-proton-0.18.1.tar.gz
diff --git a/0001-PROTON-1466-proton-c-mixing-up-links-with-names-that.patch b/0001-PROTON-1466-proton-c-mixing-up-links-with-names-that.patch
deleted file mode 100644
index b77efa2..0000000
--- a/0001-PROTON-1466-proton-c-mixing-up-links-with-names-that.patch
+++ /dev/null
@@ -1,198 +0,0 @@
-From ea875055e446da8514b10e3b6af0942997544af0 Mon Sep 17 00:00:00 2001
-From: Alan Conway <aconway@redhat.com>
-Date: Wed, 10 May 2017 16:30:14 -0400
-Subject: [PATCH] PROTON-1466: proton-c mixing up links with names that are
- prefixes
-
-Creating links where one link name is a prefix of the other, e.g. "xx" and
-"xxyy" sometimes caused the links to be confused.
----
- proton-c/src/core/codec.c     |  2 +-
- proton-c/src/core/transport.c | 14 +++++------
- proton-c/src/core/util.h      | 11 +++++++++
- proton-c/src/extra/scanner.c  |  8 ++++---
- proton-c/src/tests/engine.c   | 55 +++++++++++++++++++++++++++++++++++++++++++
- 5 files changed, 79 insertions(+), 11 deletions(-)
-
-diff --git a/proton-c/src/core/codec.c b/proton-c/src/core/codec.c
-index 67769ad..7809907 100644
---- a/proton-c/src/core/codec.c
-+++ b/proton-c/src/core/codec.c
-@@ -1328,7 +1328,7 @@ bool pn_data_lookup(pn_data_t *data, const char *name)
-     case PN_SYMBOL:
-       {
-         pn_bytes_t bytes = pn_data_get_bytes(data);
--        if (strlen(name) == bytes.size && !strncmp(name, bytes.start, bytes.size)) {
-+        if (pn_bytes_equal(bytes, pn_bytes(strlen(name), name))) {
-           return pn_data_next(data);
-         }
-       }
-diff --git a/proton-c/src/core/transport.c b/proton-c/src/core/transport.c
-index 8777318..f9eea7b 100644
---- a/proton-c/src/core/transport.c
-+++ b/proton-c/src/core/transport.c
-@@ -1277,7 +1277,7 @@ pn_link_t *pn_find_link(pn_session_t *ssn, pn_bytes_t name, bool is_sender)
-         // which is closed both locally and remotely, assume that is
-         // no longer in use.
-         !((link->endpoint.state & PN_LOCAL_CLOSED) && (link->endpoint.state & PN_REMOTE_CLOSED)) &&
--        !strncmp(name.start, pn_string_get(link->name), name.size))
-+        pn_bytes_equal(name, pn_string_bytes(link->name)))
-     {
-       return link;
-     }
-@@ -1290,13 +1290,13 @@ static pn_expiry_policy_t symbol2policy(pn_bytes_t symbol)
-   if (!symbol.start)
-     return PN_EXPIRE_WITH_SESSION;
- 
--  if (!strncmp(symbol.start, "link-detach", symbol.size))
-+  if (pn_bytes_equal(symbol, PN_BYTES_LITERAL(link-detach)))
-     return PN_EXPIRE_WITH_LINK;
--  if (!strncmp(symbol.start, "session-end", symbol.size))
-+  if (pn_bytes_equal(symbol, PN_BYTES_LITERAL(session-end)))
-     return PN_EXPIRE_WITH_SESSION;
--  if (!strncmp(symbol.start, "connection-close", symbol.size))
-+  if (pn_bytes_equal(symbol, PN_BYTES_LITERAL(connection-close)))
-     return PN_EXPIRE_WITH_CONNECTION;
--  if (!strncmp(symbol.start, "never", symbol.size))
-+  if (pn_bytes_equal(symbol, PN_BYTES_LITERAL(never)))
-     return PN_EXPIRE_NEVER;
- 
-   return PN_EXPIRE_WITH_SESSION;
-@@ -1307,9 +1307,9 @@ static pn_distribution_mode_t symbol2dist_mode(const pn_bytes_t symbol)
-   if (!symbol.start)
-     return PN_DIST_MODE_UNSPECIFIED;
- 
--  if (!strncmp(symbol.start, "move", symbol.size))
-+  if (pn_bytes_equal(symbol, PN_BYTES_LITERAL(move)))
-     return PN_DIST_MODE_MOVE;
--  if (!strncmp(symbol.start, "copy", symbol.size))
-+  if (pn_bytes_equal(symbol, PN_BYTES_LITERAL(copy)))
-     return PN_DIST_MODE_COPY;
- 
-   return PN_DIST_MODE_UNSPECIFIED;
-diff --git a/proton-c/src/core/util.h b/proton-c/src/core/util.h
-index b54f689..4d3ba3b 100644
---- a/proton-c/src/core/util.h
-+++ b/proton-c/src/core/util.h
-@@ -44,6 +44,17 @@ char *pn_strndup(const char *src, size_t n);
- int pn_strcasecmp(const char* a, const char* b);
- int pn_strncasecmp(const char* a, const char* b, size_t len);
- 
-+static inline bool pn_bytes_equal(const pn_bytes_t a, const pn_bytes_t b) {
-+  return (a.size == b.size && !memcmp(a.start, b.start, a.size));
-+}
-+
-+static inline pn_bytes_t pn_string_bytes(pn_string_t *s) {
-+  return pn_bytes(pn_string_size(s), pn_string_get(s));
-+}
-+
-+/* Create a literal bytes value, e.g. PN_BYTES_LITERAL(foo) == pn_bytes(3, "foo") */
-+#define PN_BYTES_LITERAL(X) (pn_bytes(sizeof(#X)-1, #X))
-+
- #define DIE_IFR(EXPR, STRERR)                                           \
-   do {                                                                  \
-     int __code__ = (EXPR);                                              \
-diff --git a/proton-c/src/extra/scanner.c b/proton-c/src/extra/scanner.c
-index beb7322..99c35d2 100644
---- a/proton-c/src/extra/scanner.c
-+++ b/proton-c/src/extra/scanner.c
-@@ -20,6 +20,7 @@
-  */
- 
- #include "scanner.h"
-+#include "../core/util.h"
- 
- #include "platform/platform.h"
- 
-@@ -217,12 +218,13 @@ static int pni_scanner_alpha_end(pn_scanner_t *scanner, const char *str, int sta
- static int pni_scanner_alpha(pn_scanner_t *scanner, const char *str)
- {
-   int n = pni_scanner_alpha_end(scanner, str, 0);
-+  pn_bytes_t b = pn_bytes(n, str);
-   pn_token_type_t type;
--  if (!strncmp(str, "true", n)) {
-+  if (pn_bytes_equal(b, PN_BYTES_LITERAL(true))) {
-     type = PN_TOK_TRUE;
--  } else if (!strncmp(str, "false", n)) {
-+  } else if (pn_bytes_equal(b, PN_BYTES_LITERAL(false))) {
-     type = PN_TOK_FALSE;
--  } else if (!strncmp(str, "null", n)) {
-+  } else if (pn_bytes_equal(b, PN_BYTES_LITERAL(null))) {
-     type = PN_TOK_NULL;
-   } else {
-     type = PN_TOK_ID;
-diff --git a/proton-c/src/tests/engine.c b/proton-c/src/tests/engine.c
-index 87d8d95..41d17a0 100644
---- a/proton-c/src/tests/engine.c
-+++ b/proton-c/src/tests/engine.c
-@@ -294,12 +294,67 @@ int test_free_link(int argc, char **argv)
-     return 0;
- }
- 
-+// regression test fo PROTON-1466 - confusion between links with prefix names
-+static int test_link_name_prefix(int argc, char **argv)
-+{
-+    fprintf(stdout, "test_link_name_prefix\n");
-+    pn_connection_t *c1 = pn_connection();
-+    pn_transport_t  *t1 = pn_transport();
-+    pn_transport_bind(t1, c1);
-+
-+    pn_connection_t *c2 = pn_connection();
-+    pn_transport_t  *t2 = pn_transport();
-+    pn_transport_set_server(t2);
-+    pn_transport_bind(t2, c2);
-+
-+    pn_connection_open(c1);
-+    pn_connection_open(c2);
-+
-+    pn_session_t *s1 = pn_session(c1);
-+    pn_session_open(s1);
-+
-+    pn_link_t *l = pn_receiver(s1, "l");
-+    pn_link_open(l);
-+    pn_link_t *lll = pn_receiver(s1, "lll");
-+    pn_link_open(lll);
-+    pn_link_t *ll = pn_receiver(s1, "ll");
-+    pn_link_open(ll);
-+
-+    while (pump(t1, t2)) {
-+        process_endpoints(c1);
-+        process_endpoints(c2);
-+    }
-+
-+    // session and link should be up, c2 should have a receiver link:
-+    assert(pn_session_state( s1 ) == (PN_LOCAL_ACTIVE | PN_REMOTE_ACTIVE));
-+    assert(pn_link_state( l ) == (PN_LOCAL_ACTIVE | PN_REMOTE_ACTIVE));
-+    assert(pn_link_state( lll ) == (PN_LOCAL_ACTIVE | PN_REMOTE_ACTIVE));
-+    assert(pn_link_state( ll ) == (PN_LOCAL_ACTIVE | PN_REMOTE_ACTIVE));
-+
-+    pn_link_t *r = pn_link_head(c2, (PN_LOCAL_ACTIVE | PN_REMOTE_ACTIVE));
-+    assert(!strcmp(pn_link_name(r), "l"));
-+    r = pn_link_next(r, (PN_LOCAL_ACTIVE | PN_REMOTE_ACTIVE));
-+    assert(!strcmp(pn_link_name(r), "lll"));
-+    r = pn_link_next(r, (PN_LOCAL_ACTIVE | PN_REMOTE_ACTIVE));
-+    assert(!strcmp(pn_link_name(r), "ll"));
-+
-+    pn_transport_unbind(t1);
-+    pn_transport_free(t1);
-+    pn_connection_free(c1);
-+
-+    pn_transport_unbind(t2);
-+    pn_transport_free(t2);
-+    pn_connection_free(c2);
-+
-+    return 0;
-+}
- 
- typedef int (*test_ptr_t)(int argc, char **argv);
- 
- test_ptr_t tests[] = {test_free_connection,
-                       test_free_session,
-                       test_free_link,
-+                      test_link_name_prefix,
-                       NULL};
- 
- int main(int argc, char **argv)
--- 
-2.9.3
-
diff --git a/0001-PROTON-1526-Ensure-the-module-.so-file-has-no-prefix.patch b/0001-PROTON-1526-Ensure-the-module-.so-file-has-no-prefix.patch
deleted file mode 100644
index 25cd57f..0000000
--- a/0001-PROTON-1526-Ensure-the-module-.so-file-has-no-prefix.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 1b8dae76d36167b9f3e0748968d9b6ee1da3bc20 Mon Sep 17 00:00:00 2001
-From: Justin Ross <jross@apache.org>
-Date: Tue, 8 Aug 2017 13:58:38 -0700
-Subject: [PATCH] PROTON-1526: Ensure the module .so file has no prefix; remove
- version-based rename
-
----
- proton-c/bindings/perl/CMakeLists.txt | 14 +++-----------
- 1 file changed, 3 insertions(+), 11 deletions(-)
-
-diff --git a/proton-c/bindings/perl/CMakeLists.txt b/proton-c/bindings/perl/CMakeLists.txt
-index 1356cce..744e812 100644
---- a/proton-c/bindings/perl/CMakeLists.txt
-+++ b/proton-c/bindings/perl/CMakeLists.txt
-@@ -54,20 +54,12 @@ list(APPEND SWIG_MODULE_cproton_perl_EXTRA_DEPS
-     ${PROTON_HEADERS}
- )
- swig_add_module(cproton_perl perl perl.i)
-+set_target_properties(cproton_perl PROPERTIES PREFIX "")
- swig_link_libraries(cproton_perl ${BINDING_DEPS} ${PERL_LIBRARY})
- 
--if ((${CMAKE_MAJOR_VERSION} EQUAL 2) AND (${CMAKE_MINOR_VERSION} LESS 8))
--  install(FILES ${CMAKE_CURRENT_BINARY_DIR}/cproton_perl.so
-+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/cproton_perl.so
-         DESTINATION ${PERL_VENDORARCH_DIR}/auto/cproton_perl
--        COMPONENT Perl
--        )
--else()
--  install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libcproton_perl.so
--        RENAME cproton_perl.so
--        DESTINATION ${PERL_VENDORARCH_DIR}/auto/cproton_perl
--        COMPONENT Perl
--        )
--endif ((${CMAKE_MAJOR_VERSION} EQUAL 2) AND (${CMAKE_MINOR_VERSION} LESS 8))
-+        COMPONENT Perl)
- 
- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/cproton_perl.pm
-         DESTINATION ${PERL_VENDORARCH_DIR}
--- 
-1.8.3.1
-
diff --git a/licenses.xml b/licenses.xml
new file mode 100644
index 0000000..a164ec6
--- /dev/null
+++ b/licenses.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<licenseSummary>
+  <dependencies>
+    <dependency>
+      <packageName>qpid-proton</packageName>
+      <version>0.18.0</version>
+      <licenses>
+        <license>
+          <name>ASL 2.0</name>
+          <url>http://www.apache.org/licenses/LICENSE-2.0</url>
+        </license>
+      </licenses>
+    </dependency>
+  </dependencies>
+</licenseSummary>
diff --git a/qpid-proton.spec b/qpid-proton.spec
index 2ec093e..13a5424 100644
--- a/qpid-proton.spec
+++ b/qpid-proton.spec
@@ -16,16 +16,24 @@
 }
 
 Name:           qpid-proton
-Version:        0.17.0
-Release:        8%{?dist}
+Version:        0.18.1
+Release:        1%{?dist}
 Group:          System Environment/Libraries
 Summary:        A high performance, lightweight messaging library
-
 License:        ASL 2.0
 URL:            http://qpid.apache.org/proton/
 
 Source0:        %{name}-%{version}.tar.gz
+#Patch0:         proton.patch
+
+Source1:        licenses.xml
+
+%global proton_licensedir %{_licensedir}/proton-%{version}
+%{!?_licensedir:%global license %doc}
+%{!?_licensedir:%global proton_licensedir %{proton_datadir}}
+
 BuildRequires:  gcc
+BuildRequires:  gcc-c++
 BuildRequires:  cmake
 BuildRequires:  swig
 BuildRequires:  pkgconfig
@@ -57,9 +65,6 @@ BuildRequires:  perl(Test::More)
 %endif
 BuildRequires:  cyrus-sasl-devel
 
-Patch0: 0001-PROTON-1466-proton-c-mixing-up-links-with-names-that.patch        
-Patch1: 0001-PROTON-1526-Ensure-the-module-.so-file-has-no-prefix.patch
-
 %description
 Proton is a high performance, lightweight messaging library. It can be used in
 the widest range of messaging applications including brokers, client libraries,
@@ -81,10 +86,12 @@ Obsoletes: qpid-proton
 %files c
 %defattr(-,root,root,-)
 %dir %{proton_datadir}
-%doc %{proton_datadir}/LICENSE
+%license %{proton_licensedir}/LICENSE
+%license %{proton_licensedir}/licenses.xml
 %doc %{proton_datadir}/README*
 %{_libdir}/libqpid-proton.so.*
 %{_libdir}/libqpid-proton-core.so.*
+%{_libdir}/libqpid-proton-proactor.so.*
 
 %post c -p /sbin/ldconfig
 
@@ -102,7 +109,8 @@ Requires:  qpid-proton-c%{?_isa} = %{version}-%{release}
 %files cpp
 %defattr(-,root,root,-)
 %dir %{proton_datadir}
-%doc %{proton_datadir}/LICENSE
+%license %{proton_licensedir}/LICENSE
+%license %{proton_licensedir}/licenses.xml
 %doc %{proton_datadir}/README*
 %{_libdir}/libqpid-proton-cpp.so.*
 
@@ -127,8 +135,10 @@ Obsoletes: qpid-proton-devel
 %exclude %{_includedir}/proton/**/*.hpp
 %{_libdir}/libqpid-proton.so
 %{_libdir}/libqpid-proton-core.so
+%{_libdir}/libqpid-proton-proactor.so
 %{_libdir}/pkgconfig/libqpid-proton.pc
 %{_libdir}/pkgconfig/libqpid-proton-core.pc
+%{_libdir}/pkgconfig/libqpid-proton-proactor.pc
 %{_libdir}/cmake/Proton
 
 
@@ -161,24 +171,17 @@ Obsoletes: qpid-proton-c-devel-docs
 
 %files c-docs
 %defattr(-,root,root,-)
+%license %{proton_licensedir}/LICENSE
+%license %{proton_licensedir}/licenses.xml
 %doc %{proton_datadir}/docs/api-c
-%doc %{proton_datadir}/examples/*.py
-%exclude %{proton_datadir}/examples/*.pyc
-%exclude %{proton_datadir}/examples/*.pyo
-%doc %{proton_datadir}/examples/c/*.txt
-%doc %{proton_datadir}/examples/c/include
-%doc %{proton_datadir}/examples/c/messenger/*.txt
-%doc %{proton_datadir}/examples/c/messenger/*.c
-%doc %{proton_datadir}/examples/c/reactor/*.txt
-%doc %{proton_datadir}/examples/c/reactor/README
-%doc %{proton_datadir}/examples/c/reactor/*.c
-%doc %{proton_datadir}/examples/c/proactor/CMakeLists.txt
-%doc %{proton_datadir}/examples/c/proactor/*.c
-#%doc %{proton_datadir}/examples/c/proactor/*.h
-%doc %{proton_datadir}/examples/c/proactor/README.dox
-%doc %{proton_datadir}/examples/c/proactor/*.py*
-%exclude %{proton_datadir}/examples/c/proactor/*.pyc
-%exclude %{proton_datadir}/examples/c/proactor/*.pyo
+%doc %{proton_datadir}/examples/c/ssl_certs
+%doc %{proton_datadir}/examples/c/*.c
+%doc %{proton_datadir}/examples/c/*.h
+%doc %{proton_datadir}/examples/c/README.dox
+%doc %{proton_datadir}/examples/c/CMakeLists.txt
+%doc %{proton_datadir}/examples/c/example_test.py
+%exclude %{proton_datadir}/examples/c/*.pyc
+%exclude %{proton_datadir}/examples/c/*.pyo
 
 
 %package   cpp-docs
@@ -192,51 +195,71 @@ Obsoletes: qpid-proton-cpp-devel-docs
 
 %files cpp-docs
 %defattr(-,root,root,-)
+%license %{proton_licensedir}/LICENSE
+%license %{proton_licensedir}/licenses.xml
 %{proton_datadir}/docs/api-cpp
-%doc %{proton_datadir}/examples/cpp/*.txt
 %doc %{proton_datadir}/examples/cpp/*.cpp
 %doc %{proton_datadir}/examples/cpp/*.hpp
-%doc %{proton_datadir}/examples/cpp/*.py*
-%exclude %{proton_datadir}/examples/cpp/*.pyo
-%exclude %{proton_datadir}/examples/cpp/*.pyc
-%doc %{proton_datadir}/examples/cpp/mt
+%doc %{proton_datadir}/examples/cpp/README.dox
+%doc %{proton_datadir}/examples/cpp/CMakeLists.txt
+%doc %{proton_datadir}/examples/cpp/example_test.py
 %doc %{proton_datadir}/examples/cpp/ssl_certs
-%doc %{proton_datadir}/examples/cpp/*.dox
+%doc %{proton_datadir}/examples/cpp/tutorial.dox
+%exclude %{proton_datadir}/examples/cpp/*.pyc
+%exclude %{proton_datadir}/examples/cpp/*.pyo
 
 
-%package -n python2-qpid-proton
-%{?python_provide:%python_provide python2-qpid-proton}
+%if 0%{?rhel}
+%package -n python-qpid-proton
 Group:    System Environment/Libraries
 Summary:  Python language bindings for the Qpid Proton messaging framework
 
 Requires: qpid-proton-c%{?_isa} = %{version}-%{release}
 Requires: python
 
-%description -n python2-qpid-proton
+%description -n python-qpid-proton
 %{summary}.
 
-%files -n python2-qpid-proton
+%files -n python-qpid-proton
 %defattr(-,root,root,-)
+%license %{proton_licensedir}/LICENSE
+%license %{proton_licensedir}/licenses.xml
 %{python_sitearch}/_cproton.so
 %{python_sitearch}/cproton.*
 %{python_sitearch}/proton/*
+%endif
 
 
 %if 0%{?fedora}
-%package -n python3-qpid-proton
+%package -n python2-qpid-proton
+%{?python_provide:%python_provide python2-qpid-proton}
 Group:    System Environment/Libraries
 Summary:  Python language bindings for the Qpid Proton messaging framework
-%{?python_provide:%python_provide python3-qpid-proton}
 
 Requires: qpid-proton-c%{?_isa} = %{version}-%{release}
+Requires: python2
 
-%description -n python3-qpid-proton
+%description -n python2-qpid-proton
 %{summary}.
 
 %files -n python2-qpid-proton
 %defattr(-,root,root,-)
+%license %{proton_licensedir}/LICENSE
+%license %{proton_licensedir}/licenses.xml
 %{python2_sitearch}/*
 
+
+%package -n python3-qpid-proton
+Group:    System Environment/Libraries
+Summary:  Python language bindings for the Qpid Proton messaging framework
+%{?python_provide:%python_provide python3-qpid-proton}
+
+Requires: qpid-proton-c%{?_isa} = %{version}-%{release}
+Requires: python3
+
+%description -n python3-qpid-proton
+%{summary}.
+
 %files -n python3-qpid-proton
 %defattr(-,root,root,-)
 %{python3_sitearch}/*
@@ -253,10 +276,11 @@ Obsoletes:  python-qpid-proton-doc
 
 %files -n python-qpid-proton-docs
 %defattr(-,root,root,-)
+%license %{proton_licensedir}/LICENSE
+%license %{proton_licensedir}/licenses.xml
 %doc %{proton_datadir}/docs/api-py
 %doc %{proton_datadir}/examples/python
 
-
 %if 0%{?fedora}
 %package -n perl-qpid-proton
 Summary: Perl language bindings for Qpid Proton messaging framework
@@ -275,18 +299,13 @@ Requires:  qpid-proton-c = %{version}-%{release}
 
 %prep
 %setup -q -n %{name}-%{version}
-%patch0 -p1
-%patch1 -p1
+#%patch0 -p1
 
-%build
 
-CXX11FLAG="-std=c++11 -Wno-error=format-security"
-
-%if (0%{?rhel} && 0%{?rhel} <= 6) 
-CXX11FLAG=""
-%endif
+%build
 
 %if 0%{?fedora}
+CXX11FLAG=" -Wno-error=format-security"
 %cmake \
     -DPROTON_DISABLE_RPATH=true \
    "-DCMAKE_CXX_FLAGS=$CXXFLAGS $CXX11FLAG" \
@@ -296,7 +315,6 @@ CXX11FLAG=""
 %endif
 %if 0%{?rhel}
 %cmake -DPROTON_DISABLE_RPATH=true \
-      "-DCMAKE_CXX_FLAGS=$CXXFLAGS CXX11FLAG" \
        -DCMAKE_EXE_LINKER_FLAGS="-Wl,-z,relro,-z,now" \
        -DCMAKE_SHARED_LINKER_FLAGS="-Wl,-z,relro" \
        -DCMAKE_MODULE_LINKER_FLAGS="-Wl,-z,relro" \
@@ -321,7 +339,16 @@ rm -rf %{buildroot}
 CPROTON_BUILD=$PWD . ./config.sh
 
 chmod +x %{buildroot}%{python_sitearch}/_cproton.so
-find %{buildroot}%{proton_datadir}/examples/ -type f | xargs chmod -x 
+#find %{buildroot}%{proton_datadir}/examples/ -type f | xargs chmod -x 
+
+%if 0%{?rhel} && 0%{?rhel} <= 6
+install -pm 644 %{SOURCE1} %{buildroot}%{proton_datadir}/
+%else
+install -dm 755 %{buildroot}%{proton_licensedir}
+install -pm 644 %{SOURCE1} %{buildroot}%{proton_licensedir}
+install -pm 644 %{buildroot}%{proton_datadir}/LICENSE %{buildroot}%{proton_licensedir}
+rm -f %{buildroot}%{proton_datadir}/LICENSE
+%endif
 
 # clean up files that are not shipped
 rm -rf %{buildroot}%{_exec_prefix}/bindings
@@ -339,27 +366,17 @@ rm -rf %{buildroot}%{_datarootdir}/ruby
 rm -rf %{buildroot}%{_sysconfdir}/php.d
 %endif
 rm -fr %{buildroot}%{proton_datadir}/examples/CMakeFiles
-rm -f  %{buildroot}%{proton_datadir}/examples/CTestTestfile.cmake
 rm -f  %{buildroot}%{proton_datadir}/examples/Makefile
 rm -f  %{buildroot}%{proton_datadir}/examples/*.cmake
 rm -fr %{buildroot}%{proton_datadir}/examples/c/CMakeFiles
 rm -f  %{buildroot}%{proton_datadir}/examples/c/*.cmake
 rm -f  %{buildroot}%{proton_datadir}/examples/c/Makefile
-rm -fr %{buildroot}%{proton_datadir}/examples/c/messenger/CMakeFiles
-rm -f  %{buildroot}%{proton_datadir}/examples/c/messenger/*.cmake
-rm -f  %{buildroot}%{proton_datadir}/examples/c/messenger/Makefile
-rm -f  %{buildroot}%{proton_datadir}/examples/c/messenger/recv
-rm -f  %{buildroot}%{proton_datadir}/examples/c/messenger/recv-async
-rm -f  %{buildroot}%{proton_datadir}/examples/c/messenger/send
-rm -f  %{buildroot}%{proton_datadir}/examples/c/messenger/send-async
-rm -fr %{buildroot}%{proton_datadir}/examples/c/reactor/CMakeFiles
-rm -f  %{buildroot}%{proton_datadir}/examples/c/reactor/*.cmake
-rm -f  %{buildroot}%{proton_datadir}/examples/c/reactor/Makefile
-rm -f  %{buildroot}%{proton_datadir}/examples/c/reactor/receiver
-rm -f  %{buildroot}%{proton_datadir}/examples/c/reactor/sender
-rm -fr %{buildroot}%{proton_datadir}/examples/c/proactor/CMakeFiles
-rm -f  %{buildroot}%{proton_datadir}/examples/c/proactor/*.cmake
-rm -f  %{buildroot}%{proton_datadir}/examples/c/proactor/Makefile
+rm -f  %{buildroot}%{proton_datadir}/examples/c/broker
+rm -f  %{buildroot}%{proton_datadir}/examples/c/direct
+rm -f  %{buildroot}%{proton_datadir}/examples/c/receive
+rm -f  %{buildroot}%{proton_datadir}/examples/c/send
+rm -f  %{buildroot}%{proton_datadir}/examples/c/send-abort
+rm -f  %{buildroot}%{proton_datadir}/examples/c/send-ssl
 rm -fr %{buildroot}%{proton_datadir}/examples/cpp/CMakeFiles
 rm -f  %{buildroot}%{proton_datadir}/examples/cpp/*.cmake
 rm -f  %{buildroot}%{proton_datadir}/examples/cpp/Makefile
@@ -372,7 +389,6 @@ rm -f  %{buildroot}%{proton_datadir}/examples/cpp/encode_decode
 rm -f  %{buildroot}%{proton_datadir}/examples/cpp/flow_control
 rm -f  %{buildroot}%{proton_datadir}/examples/cpp/helloworld
 rm -f  %{buildroot}%{proton_datadir}/examples/cpp/helloworld_direct
-rm -f  %{buildroot}%{proton_datadir}/examples/cpp/mt_broker
 rm -f  %{buildroot}%{proton_datadir}/examples/cpp/queue_browser
 rm -f  %{buildroot}%{proton_datadir}/examples/cpp/scheduled_send_03
 rm -f  %{buildroot}%{proton_datadir}/examples/cpp/scheduled_send
@@ -384,6 +400,10 @@ rm -f  %{buildroot}%{proton_datadir}/examples/cpp/simple_recv
 rm -f  %{buildroot}%{proton_datadir}/examples/cpp/simple_send
 rm -f  %{buildroot}%{proton_datadir}/examples/cpp/ssl
 rm -f  %{buildroot}%{proton_datadir}/examples/cpp/ssl_client_cert
+rm -f  %{buildroot}%{proton_datadir}/examples/cpp/message_properties
+rm -f  %{buildroot}%{proton_datadir}/examples/cpp/multithreaded_client
+rm -f  %{buildroot}%{proton_datadir}/examples/cpp/multithreaded_client_flow_control
+rm -f  %{buildroot}%{proton_datadir}/examples/cpp/reconnect_client
 rm -fr %{buildroot}%{proton_datadir}/examples/engine/java
 rm -fr %{buildroot}%{proton_datadir}/examples/go
 rm -fr %{buildroot}%{proton_datadir}/examples/java
@@ -402,12 +422,15 @@ popd
 %endif
 
 %changelog
+* Thu Nov 16 2017 Irina Boverman <iboverma@redhat.com> - 0.18.1-1
+- Rebased to 0.18.1
+
 * Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.17.0-8
 - Python 2 binary package renamed to python2-qpid-proton
   See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3
 
 * Wed Aug  9 2017 Irina Boverman <iboverma@redhat.com> - 0.17.0-7
-- - Resolves: PROTON-1526
+- Resolves: PROTON-1526
 
 * Tue Aug  8 2017 Irina Boverman <iboverma@redhat.com> - 0.17.0-6
 - Added missing *.hpp files in qpid-proton-cpp-devel package
diff --git a/sources b/sources
index 8579299..44393d0 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (qpid-proton-0.17.0.tar.gz) = ce082fdc2793fc9d3db1b558bd897d364543bd50cba60e66aff839f8f16d82c245381d836ef3ee5b6ee17ba2b2ffe1899b86ed9d1f8cf8db569f726b6d162463
+SHA512 (qpid-proton-0.18.1.tar.gz) = f51f7c622351255758ca3727d758f0893088d9e2f13d350134b06784e85da476e01cd73f747d20543933fefe202f55d0f56c50015e9d2be6ba9ab819aa85f23c