Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates supporting CPack RPM generation #1451

Merged
merged 1 commit into from
Feb 21, 2020

Conversation

tcraigtyler
Copy link
Contributor

Enable command line overrides of default settings

  • CPACK_GENERATOR
  • CPACK_PACKAGE_RELOCATABLE

Enables command line setting of generated RPM version attributes

  • CPACK_RPM_PACKAGE_RELEASE
  • CPACK_RPM_PACKAGE_ARCHITECTURE

Adds dependency on pkgconfig RPM when not generating relocatable RPM

Example usage for non-relocatable package that installs in system default:

mkdir build
cd build
cmake -D CPACK_GENERATOR=RPM -D CPACK_RPM_PACKAGE_RELEASE=1 -D CPACK_RPM_PACKAGE_ARCHITECTURE=x86_64 -D CPACK_PACKAGE_RELOCATABLE=OFF -D CPACK_PACKAGING_INSTALL_PREFIX="/usr" -D CMAKE_INSTALL_LIBDIR=lib64 ..
make
cpack

Resulting package file list:

rpm -qlp spdlog-1.5.0-1.x86_64.rpm 
/usr/include/spdlog
/usr/include/spdlog/async.h
/usr/include/spdlog/async_logger-inl.h
/usr/include/spdlog/async_logger.h
/usr/include/spdlog/common-inl.h
/usr/include/spdlog/common.h
/usr/include/spdlog/details
/usr/include/spdlog/details/backtracer-inl.h
/usr/include/spdlog/details/backtracer.h
/usr/include/spdlog/details/circular_q.h
/usr/include/spdlog/details/console_globals.h
/usr/include/spdlog/details/file_helper-inl.h
/usr/include/spdlog/details/file_helper.h
/usr/include/spdlog/details/fmt_helper.h
/usr/include/spdlog/details/log_msg-inl.h
/usr/include/spdlog/details/log_msg.h
/usr/include/spdlog/details/log_msg_buffer-inl.h
/usr/include/spdlog/details/log_msg_buffer.h
/usr/include/spdlog/details/mpmc_blocking_q.h
/usr/include/spdlog/details/null_mutex.h
/usr/include/spdlog/details/os-inl.h
/usr/include/spdlog/details/os.h
/usr/include/spdlog/details/pattern_formatter-inl.h
/usr/include/spdlog/details/pattern_formatter.h
/usr/include/spdlog/details/periodic_worker-inl.h
/usr/include/spdlog/details/periodic_worker.h
/usr/include/spdlog/details/registry-inl.h
/usr/include/spdlog/details/registry.h
/usr/include/spdlog/details/synchronous_factory.h
/usr/include/spdlog/details/thread_pool-inl.h
/usr/include/spdlog/details/thread_pool.h
/usr/include/spdlog/fmt
/usr/include/spdlog/fmt/bin_to_hex.h
/usr/include/spdlog/fmt/bundled
/usr/include/spdlog/fmt/bundled/LICENSE.rst
/usr/include/spdlog/fmt/bundled/chrono.h
/usr/include/spdlog/fmt/bundled/color.h
/usr/include/spdlog/fmt/bundled/compile.h
/usr/include/spdlog/fmt/bundled/core.h
/usr/include/spdlog/fmt/bundled/format-inl.h
/usr/include/spdlog/fmt/bundled/format.h
/usr/include/spdlog/fmt/bundled/locale.h
/usr/include/spdlog/fmt/bundled/ostream.h
/usr/include/spdlog/fmt/bundled/posix.h
/usr/include/spdlog/fmt/bundled/printf.h
/usr/include/spdlog/fmt/bundled/ranges.h
/usr/include/spdlog/fmt/fmt.h
/usr/include/spdlog/fmt/ostr.h
/usr/include/spdlog/formatter.h
/usr/include/spdlog/logger-inl.h
/usr/include/spdlog/logger.h
/usr/include/spdlog/sinks
/usr/include/spdlog/sinks/android_sink.h
/usr/include/spdlog/sinks/ansicolor_sink-inl.h
/usr/include/spdlog/sinks/ansicolor_sink.h
/usr/include/spdlog/sinks/base_sink-inl.h
/usr/include/spdlog/sinks/base_sink.h
/usr/include/spdlog/sinks/basic_file_sink-inl.h
/usr/include/spdlog/sinks/basic_file_sink.h
/usr/include/spdlog/sinks/daily_file_sink.h
/usr/include/spdlog/sinks/dist_sink.h
/usr/include/spdlog/sinks/dup_filter_sink.h
/usr/include/spdlog/sinks/msvc_sink.h
/usr/include/spdlog/sinks/null_sink.h
/usr/include/spdlog/sinks/ostream_sink.h
/usr/include/spdlog/sinks/ringbuffer_sink.h
/usr/include/spdlog/sinks/rotating_file_sink-inl.h
/usr/include/spdlog/sinks/rotating_file_sink.h
/usr/include/spdlog/sinks/sink-inl.h
/usr/include/spdlog/sinks/sink.h
/usr/include/spdlog/sinks/stdout_color_sinks-inl.h
/usr/include/spdlog/sinks/stdout_color_sinks.h
/usr/include/spdlog/sinks/stdout_sinks-inl.h
/usr/include/spdlog/sinks/stdout_sinks.h
/usr/include/spdlog/sinks/syslog_sink.h
/usr/include/spdlog/sinks/systemd_sink.h
/usr/include/spdlog/sinks/tcp_sink.h
/usr/include/spdlog/sinks/win_eventlog_sink.h
/usr/include/spdlog/sinks/wincolor_sink-inl.h
/usr/include/spdlog/sinks/wincolor_sink.h
/usr/include/spdlog/spdlog-inl.h
/usr/include/spdlog/spdlog.h
/usr/include/spdlog/tweakme.h
/usr/include/spdlog/version.h
/usr/lib64/cmake
/usr/lib64/cmake/spdlog
/usr/lib64/cmake/spdlog/spdlogConfig.cmake
/usr/lib64/cmake/spdlog/spdlogConfigTargets-release.cmake
/usr/lib64/cmake/spdlog/spdlogConfigTargets.cmake
/usr/lib64/cmake/spdlog/spdlogConfigVersion.cmake
/usr/lib64/libspdlog.a
/usr/lib64/pkgconfig/spdlog.pc

Enable command line overrides of default settings
* CPACK_GENERATOR
* CPACK_PACKAGE_RELOCATABLE

Enables command line setting of generated RPM version attributes
* CPACK_RPM_PACKAGE_RELEASE
* CPACK_RPM_PACKAGE_ARCHITECTURE

Adds dependency on pkgconfig RPM when not generating relocatable RPM
@gabime gabime merged commit 15ac7b0 into gabime:v1.x Feb 21, 2020
@gabime
Copy link
Owner

gabime commented Feb 21, 2020

Thanks @tcraigtyler Merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants