run: make -C build -j2 test
- name: Install
run: make -C build -j2 install DESTDIR=/tmp
+ - name: Package
+ if: ${{ env.CMAKE_BUILD_TYPE == 'Release' && env.CC_VER == 'cur' }}
+ run: make -C build package
- name: Failed tests log
if: ${{ failure() }}
run: cat build/Testing/Temporary/LastTest.log || true
run: cmake --build build --config ${{ env.CMAKE_BUILD_TYPE }}
- name: Install
run: cmake --install build --prefix installed --config ${{ env.CMAKE_BUILD_TYPE }}
+ - name: Package
+ run: cmake -E chdir build cpack
# release builds
release:
run: make -C build -j2 test
- name: Install
run: make -C build -j2 install DESTDIR=/tmp
+ - name: Package
+ if: ${{ env.CMAKE_BUILD_TYPE == 'Release' && env.CC_VER == 'cur' }}
+ run: make -C build package
- name: Failed tests log
if: ${{ failure() }}
run: cat build/Testing/Temporary/LastTest.log || true
run: make -C build -j2 test
- name: Install
run: make -C build -j2 install DESTDIR=/tmp
+ - name: Package
+ if: ${{ env.CMAKE_BUILD_TYPE == 'Release' && env.CC_VER == 'cur' }}
+ run: make -C build package
- name: Failed tests log
if: ${{ failure() }}
run: cat build/Testing/Temporary/LastTest.log || true
run: make -C build -j2 test
- name: Install
run: make -C build -j2 install DESTDIR=/tmp
+ - name: Package
+ if: ${{ env.CMAKE_BUILD_TYPE == 'Release' && env.CC_VER == 'cur' }}
+ run: make -C build package
- name: Failed tests log
if: ${{ failure() }}
run: cat build/Testing/Temporary/LastTest.log || true
run: make -C build -j2 test
- name: Install
run: make -C build -j2 install DESTDIR=/tmp
+ - name: Package
+ if: ${{ env.CMAKE_BUILD_TYPE == 'Release' && env.CC_VER == 'cur' }}
+ run: make -C build package
- name: Failed tests log
if: ${{ failure() }}
run: cat build/Testing/Temporary/LastTest.log || true
run: cmake --build build --config ${{ env.CMAKE_BUILD_TYPE }}
- name: Install
run: cmake --install build --prefix installed --config ${{ env.CMAKE_BUILD_TYPE }}
+ - name: Package
+ run: cmake -E chdir build cpack
# release builds
release:
run: make -C build -j2 test
- name: Install
run: make -C build -j2 install DESTDIR=/tmp
+ - name: Package
+ if: ${{ env.CMAKE_BUILD_TYPE == 'Release' && env.CC_VER == 'cur' }}
+ run: make -C build package
- name: Failed tests log
if: ${{ failure() }}
run: cat build/Testing/Temporary/LastTest.log || true
set(HEADER "${CMAKE_CURRENT_BINARY_DIR}/${HEADER}")
endif()
install(FILES ${HEADER}
+ COMPONENT dev
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${DIRECTORY}
)
endforeach()
endif()
include(CMakePushCheckState)
-include(GNUInstallDirs)
include(CMakePackageConfigHelpers)
macro(make_have_identifier NAME ID)
# modules
+include(GNUInstallDirs)
+
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/CMake")
if(NOT BUILD_DOCSONLY)
# keep last
configure_file(${CONFIGURE_FILE_IN} ${CONFIGURE_FILE_OUT} @ONLY)
- include(CPack.txt)
endif()
+include(CPack.txt)
+
+install(FILES
+ AUTHORS
+ BUGS.md
+ ChangeLog
+ ChangeLog-0.md
+ ChangeLog-1.0.md
+ ChangeLog-1.1.md
+ ChangeLog.md
+ CONTRIBUTING.md
+ COPYING
+ LICENSE
+ NEWS
+ README.md
+ TODO
+ COMPONENT doc
+ DESTINATION ${CMAKE_INSTALL_DOCDIR}/
+ )
+
if(ENV{INVALID_CONFIGURATION})
message(FATAL_ERROR "invalid configuration -- giving up")
endif()
set(CPACK_SOURCE_TZ 0)
set(CPACK_SOURCE_ZIP ${WIN32})
+# project internals
+set(CPACK_PACKAGE_LICENSE "BSD-3-Clause")
+set(CPACK_PACKAGE_CONTACT "${PROJECT_CONTACT}")
+set(CPACK_PACKAGE_VENDOR "${PROJECT_CONTACT}")
+set(CPACK_PACKAGE_DESCRIPTION
+ "libmemcached is an open source C/C++ client library and tools for the
+memcached server (http://memcached.org/). It has been designed to be
+light on memory usage, thread safe, and provide full access to server
+side methods.")
+set(CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_NAME}/${CPACK_PACKAGE_VERSION}")
+#set(CPACK_PACKAGE_CHECKSUM SHA1)
+set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE")
+set(CPACK_RESOURCE_FILE_README "${CMAKE_SOURCE_DIR}/README.md")
+set(CPACK_CHANGELOG_FILE "${CMAKE_SOURCE_DIR}/ChangeLog-1.1.md")
+
+set(CPACK_SOURCE_IGNORE_FILES "/[.]git/;/[.](idea|settings|c?project);~$;[.]log$;[.]bak$")
+
+set(CPACK_PACKAGE_FILE_NAME
+ "${CMAKE_PROJECT_NAME}-${CMAKE_PROJECT_VERSION}-${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}")
+
+set(CPACK_ARCHIVE_COMPONENT_INSTALL ${CPACK_COMPONENT_INSTALL})
+
+# dependencies
+if(HAVE_LIBSASL)
+ string(APPEND CPACK_PACKAGE_DEPENDS " libsasl2")
+endif()
+if(HAVE_TBB)
+ string(APPEND CPACK_PACKAGE_DEPENDS " tbb")
+endif()
+if(HAVE_LIBEVENT)
+ string(APPEND CPACK_PACKAGE_DEPENDS " libevent")
+endif()
+
+
# DEBs
if(EXISTS /usr/bin/dpkg)
cpack_include_if(DEB)
endif()
+if(APPLE)
+endif()
+
# BSDs
if(CMAKE_SYSTEM_NAME MATCHES BSD)
cpack_include_if(BSD)
cpack_include_if(RPM)
endif()
-# project internals
-set(CPACK_PACKAGE_VENDOR ${CMAKE_PROJECT_HOMEPAGE_URL})
-set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_SOURCE_DIR}/README.md")
-set(CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_NAME}/${CPACK_PACKAGE_VERSION}")
-set(CPACK_PACKAGE_CHECKSUM SHA1)
-set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE")
-set(CPACK_RESOURCE_FILE_README "${CMAKE_SOURCE_DIR}/README.md")
-
# keep last
include(CPack)
set(CPACK_BINARY_DEB ON)
-set(CPACK_PACKAGE_CONTACT "${PROJECT_CONTACT}")
-if(HAVE_LIBSASL)
- string(APPEND CPACK_DEBIAN_PACKAGE_DEPENDS " libsasl2")
-endif()
-if(HAVE_TBB)
- string(APPEND CPACK_DEBIAN_PACKAGE_DEPENDS " tbb")
-endif()
-if(HAVE_LIBEVENT)
- string(APPEND CPACK_DEBIAN_PACKAGE_DEPENDS " libevent")
-endif()
+set(CPACK_DEB_COMPONENT_INSTALL ${CPACK_COMPONENT_INSTALL})
+set(CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_PACKAGE_DEPENDS}")
+set(CPACK_DEBIAN_ENABLE_COMPONENT_DEPENDS ON)
+set(CPACK_COMPONENT_bin_DEPENDS lib)
+set(CPACK_COMPONENT_dev_DEPENDS lib)
--- /dev/null
+set(CPACK_BINARY_FREEBSD ON)
+set(CPACK_FREEBSD_PACKAGE_LICENSE "${CPACK_PACKAGE_LICENSE}")
set(CPACK_BINARY_RPM ON)
+set(CPACK_RPM_COMPONENT_INSTALL ${CPACK_COMPONENT_INSTALL})
+set(CPACK_RPM_PACKAGE_DEPENDS "${CPACK_PACKAGE_DEPENDS}")
+set(CPACK_RPM_PACKAGE_LICENSE "${CPACK_PACKAGE_LICENSE}")
+set(CPACK_RPM_CHANGELOG_FILE "${CPACK_CHANGELOG_FILE}")
+set(CPACK_RPM_PACKAGE_DESCRIPTION "${CPACK_PACKAGE_DESCRIPTION}")
+set(CPACK_RPM_PACKAGE_GROUP "Development/Libraries")
## v 1.1.0
+> released YYYY-MM-DD
+
**NOTE:**
This is a bug fix release, not a feature release. The minor version number
was incremented due to the following changes:
* Travis: https://travis-ci.org/m6w6/libmemcached (Linux **·** arm64, ppc64le, s390x)
* Sourcehut: https://builds.sr.ht/~m6w6/libmemcached (FreeBSD, OpenBSD **·** amd64)
-> released YYYY-MM-DD
* Fix build failure due to comparison of incompatible types in bin/memflush and bin/memstat.
* Fix wrong type of memcached_instance_st::server_timeout_counter_query_id from uint32_t to uint64_t.
INSTALL_RPATH ${CMAKE_INSTALL_RPATH}/../${CMAKE_INSTALL_LIBDIR})
endif()
install(TARGETS memaslap
+ COMPONENT bin
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
endif()
configure_file("conf.py.in" "conf.py" @ONLY)
add_subdirectory(source)
+ file(GLOB_RECURSE DOCS_SOURCE
+ CONFIGURE_DEPENDS
+ "*.rst")
+
if(BUILD_DOCS_HTML)
- add_custom_target(html
+ add_custom_command(
+ OUTPUT "${SPHINX_HTML_DIR}"
COMMAND
${SPHINX_EXECUTABLE}
-q -b html
${SPHINX_OPTIONS}
"${SPHINX_SOURCE_DIR}"
"${SPHINX_HTML_DIR}"
+ COMMAND ${CMAKE_COMMAND} -E touch html
BYPRODUCTS ${SPHINX_HTML_DIR}
+ DEPENDS "${DOCS_SOURCE}"
)
+ add_custom_target(html ALL DEPENDS "${SPHINX_HTML_DIR}")
+
+ install(DIRECTORY ${SPHINX_HTML_DIR}/
+ COMPONENT doc
+ DESTINATION ${CMAKE_INSTALL_DOCDIR}/html)
endif()
if(BUILD_DOCS_MAN)
- add_custom_target(man ALL
+ add_custom_command(
+ OUTPUT ${SPHINX_MAN_DIR}
+ COMMAND
${SPHINX_EXECUTABLE}
-q -b man
-c "${SPHINX_BUILD_DIR}"
${SPHINX_OPTIONS}
"${SPHINX_SOURCE_DIR}"
"${SPHINX_MAN_DIR}"
+ COMMAND ${CMAKE_COMMAND} -E touch man
BYPRODUCTS ${SPHINX_MAN_DIR}
+ DEPENDS "${DOCS_SOURCE}"
)
+ add_custom_target(man ALL DEPENDS "${SPHINX_MAN_DIR}")
set(MAN_EXT "")
if(BUILD_DOCS_MANGZ)
endif()
install(DIRECTORY ${SPHINX_MAN_DIR}/
+ COMPONENT doc
DESTINATION ${CMAKE_INSTALL_MANDIR}/man1
FILES_MATCHING PATTERN *.1${MAN_EXT}
)
install(DIRECTORY ${SPHINX_MAN_DIR}/
+ COMPONENT doc
DESTINATION ${CMAKE_INSTALL_MANDIR}/man3
FILES_MATCHING PATTERN *.3${MAN_EXT}
)
v 1.1.0
-------
-**NOTE:**\ :raw-html-m2r:`<br>`
+..
+
+ released YYYY-MM-DD
+
+
+**NOTE:**
This is a bug fix release, not a feature release. The minor version number
was incremented due to the following changes:
* Ported test suite to Catch2.
* Build requires C++11 compiler support.
* Tests require C++17 compiler support.
-* Moved the project from launchpad to github:
+* Moved the project from launchpad to github:
* Source: https://github.com/m6w6/libmemcached
* Documentation: https://m6w6.github.io/libmemcached
* Github: https://github.com/m6w6/libmemcached/actions (Linux, MacOS **·** amd64)
* Travis: https://travis-ci.org/m6w6/libmemcached (Linux **·** arm64, ppc64le, s390x)
- * Cirrus: https://cirrus-ci.com/m6w6/libmemcached (FreeBSD **·** amd64)
-
-..
-
- released YYYY-MM-DD
-
+ * Sourcehut: https://builds.sr.ht/~m6w6/libmemcached (FreeBSD, OpenBSD **·** amd64)
* Fix build failure due to comparison of incompatible types in bin/memflush and bin/memstat.
* Fix `gh #62 <https://github.com/m6w6/libmemcached/issues/62>`_\ :
uint32_t overflow cause busy loop.
* Removed restriction of UDP+IPv6.
-* Fix SERVER_ERROR_MEMORY_ALLOCATION_FAILURE:
+* Fix SERVER_ERROR_MEMORY_ALLOCATION_FAILURE:
recognize more strings returned by the server.
* Fix `gh #13 <https://github.com/m6w6/libmemcached/issues/13>`_\ :
reset continuum counter after freeing them.
* Fix memaslap: build fails with newer compiler versions.
* Fix usage of strerror_r() implementations returning pointer to char.
* Fix pipelining commands with memcached >= 1.6.
-* Fixed memcached_stat_get_value(): buffer overflow.
+* Fix memcached_stat_get_value(): buffer overflow.
* Fix memcached_stat(): undefined behavior due to unintialized memcached_return_t.
* Fix SASL tests: requires SASL_PWDB_CONF.
* Fix bin/memaslap to idnentify itself as memaslap instead of memslap.
`gh #64 <https://github.com/m6w6/libmemcached/issues/64>`_ and
`gh #21 <https://github.com/m6w6/libmemcached/issues/21>`_\ :
clarify documentation on replication.
+* Fix `gh #95 <https://github.com/m6w6/libmemcached/issues/95>`_\ :
+ MEMCACHED_CALLBACK_GET_FAILURE and MEMCACHED_BEHAVIOR_BUFFER_REQUESTS
+* Fix bin/memcat to output flags if requested with ``--flag``.
----
INSTALL_RPATH ${CMAKE_INSTALL_RPATH}/../${CMAKE_INSTALL_LIBDIR})
endif()
install(TARGETS ${CLIENT}
+ COMPONENT bin
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
endforeach()
configure_file(hashkitcon.h.in hashkitcon.h @ONLY)
install(TARGETS libhashkit EXPORT libhashkit-targets
- LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
+ LIBRARY
+ COMPONENT lib
+ NAMELINK_COMPONENT dev
+ DESTINATION ${CMAKE_INSTALL_LIBDIR})
export(EXPORT libhashkit-targets NAMESPACE libmemcached::)
-install(EXPORT libhashkit-targets NAMESPACE libmemcached:: DESTINATION ${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}/cmake)
+install(EXPORT libhashkit-targets NAMESPACE libmemcached::
+ COMPONENT dev
+ DESTINATION ${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}/cmake)
install_public_headers(
libhashkit
enable_dtrace_for(libmemcached libmemcached_probes.d dtrace_probes.h)
install(TARGETS libmemcached EXPORT libmemcached-targets
- LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
+ LIBRARY
+ COMPONENT lib
+ NAMELINK_COMPONENT dev
+ DESTINATION ${CMAKE_INSTALL_LIBDIR})
export(EXPORT libmemcached-targets NAMESPACE libmemcached::)
-install(EXPORT libmemcached-targets NAMESPACE libmemcached:: DESTINATION ${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}/cmake)
+install(EXPORT libmemcached-targets NAMESPACE libmemcached::
+ COMPONENT dev
+ DESTINATION ${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}/cmake)
install_public_headers(
libmemcached
$<INSTALL_INTERFACE:include>)
install(TARGETS libmemcachedprotocol EXPORT libmemcachedprotocol-targets
- LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
+ LIBRARY
+ COMPONENT lib
+ NAMELINK_COMPONENT dev
+ DESTINATION ${CMAKE_INSTALL_LIBDIR})
export(EXPORT libmemcachedprotocol-targets NAMESPACE libmemcached::)
-install(EXPORT libmemcachedprotocol-targets NAMESPACE libmemcached:: DESTINATION ${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}/cmake)
+install(EXPORT libmemcachedprotocol-targets NAMESPACE libmemcached::
+ COMPONENT dev
+ DESTINATION ${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}/cmake)
$<INSTALL_INTERFACE:include>)
install(TARGETS libmemcachedutil EXPORT libmemcachedutil-targets
- LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
+ LIBRARY
+ COMPONENT lib
+ NAMELINK_COMPONENT dev
+ DESTINATION ${CMAKE_INSTALL_LIBDIR})
export(EXPORT libmemcachedutil-targets NAMESPACE libmemcached::)
-install(EXPORT libmemcachedutil-targets NAMESPACE libmemcached:: DESTINATION ${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}/cmake)
+install(EXPORT libmemcachedutil-targets NAMESPACE libmemcached::
+ COMPONENT dev
+ DESTINATION ${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}/cmake)
install(FILES ax_libmemcached.m4
+ COMPONENT dev
DESTINATION ${CMAKE_INSTALL_DATADIR}/aclocal
)
configure_file(example.cnf.in example.cnf @ONLY)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/example.cnf
+ COMPONENT dev
DESTINATION ${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}
)
configure_file(libmemcached.pc.in libmemcached.pc @ONLY)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libmemcached.pc
+ COMPONENT dev
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig
)
${CMAKE_CURRENT_BINARY_DIR}/libmemcached-version.cmake
${CMAKE_CURRENT_BINARY_DIR}/libmemcachedprotocol-version.cmake
${CMAKE_CURRENT_BINARY_DIR}/libmemcachedutil-version.cmake
+ COMPONENT dev
DESTINATION ${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}/cmake/)