Skip to content

Commit

Permalink
Support packaging in RPM format
Browse files Browse the repository at this point in the history
  • Loading branch information
thekvs committed Nov 20, 2016
1 parent b110a14 commit c404482
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 7 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ endif()

set(TARGET_VERSION_MAJOR 0)
set(TARGET_VERSION_MINOR 2)
set(TARGET_VERSION_PATCH 4)
set(TARGET_VERSION_PATCH 5)
set(APP_VERSION "${TARGET_VERSION_MAJOR}.${TARGET_VERSION_MINOR}.${TARGET_VERSION_PATCH}")

add_subdirectory(src)
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ installed ```-dev``` versions of the following packages:
To compile program run following (with obvious amendments) commands from build directory:
* ```$ cmake /path/to/radiotray-lite/ -DCMAKE_INSTALL_PREFIX=/usr/```
* ```$ make```
* ```$ cpack -G DEB``` to create package in ```.deb``` format or ```$ cpack -G RPM``` to create package in ```.rpm``` format.

To create package in a ```.deb``` format issue following command while staying in your build directory:
```$ cpack -G DEB```. Package will be created in the ```packages``` folder of the build directory.
Package will be created in the ```packages``` folder of the build directory.

### Configs
Copy your existing ```bookmarks.xml``` from [Radio Tray](http://radiotray.sourceforge.net/) (which is usually located at
Expand Down
14 changes: 10 additions & 4 deletions cmake/CPackConfig.cmake.in
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
set(APP_VERSION "@APP_VERSION@")
set(CPACK_GENERATOR DEB)
set(CPACK_CMAKE_GENERATOR "@CMAKE_GENERATOR@")
set(CPACK_OUTPUT_FILE_PREFIX packages)
set(CPACK_INSTALL_CMAKE_PROJECTS "@PROJECT_BINARY_DIR@;radiotray;ALL;/")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "online radio streaming player")
set(CPACK_PACKAGE_DESCRIPTION_FILE @CMAKE_ROOT@/Templates/CPack.GenericDescription.txt)
set(CPACK_PACKAGE_DESCRIPTION_FILE @CMAKE_SOURCE_DIR@/cmake/PackageDescription.txt)
set(CPACK_PACKAGING_INSTALL_PREFIX @CPACK_PACKAGING_INSTALL_PREFIX@)
set(CPACK_PACKAGE_NAME "radiotray-lite")
set(CPACK_DEBIAN_PACKAGE_SECTION "sound")
set(CPACK_PACKAGE_VERSION "${APP_VERSION}")

set(CPACK_DEBIAN_PACKAGE_SECTION "sound")
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Konstantin Sorokin <[email protected]>")
set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE @CPACK_DEBIAN_PACKAGE_ARCHITECTURE@)
set(CPACK_PACKAGE_FILE_NAME ${CPACK_PACKAGE_NAME}-${APP_VERSION}-@CPACK_DEBIAN_PACKAGE_ARCHITECTURE@-@CMAKE_CXX_COMPILER_ID@-@CMAKE_SYSTEM_NAME@)
set(CPACK_PACKAGE_FILE_NAME ${CPACK_PACKAGE_NAME}-${APP_VERSION}-@CPACK_DEBIAN_PACKAGE_ARCHITECTURE@)
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6, libgtkmm-3.0-1 | libgtkmm-3.0-1v5 (>= 3.10.1), libgstreamermm-0.10-2 (>= 0.10.11) | libgstreamermm-1.0-0v5 (>= 1.4.3), gstreamer0.10-plugins-base (>= 0.10.36) | gstreamer1.0-plugins-base (>= 1.2.4), gstreamer0.10-plugins-good (>= 0.10.31) | gstreamer1.0-plugins-good (>= 1.2.4), gstreamer0.10-plugins-bad (>= 0.10.23) | gstreamer1.0-plugins-bad (>= 1.2.4), libcurl3 (>= 7.35.0), libnotify4 (>= 0.7.6), libappindicator3-1")

set(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "/usr/share/applications;/usr/share/pixmaps")
set(CPACK_RPM_PACKAGE_URL "https://github.com/thekvs/radiotray-lite/")
set(CPACK_RPM_PACKAGE_LICENSE "GPLv3+")
set(CPACK_RPM_PACKAGE_GROUP, "Applications/Multimedia")
set(CPACK_RPM_PACKAGE_REQUIRES "glibc, gtkmm30, gstreamermm, gstreamer-plugins-base, gstreamer-plugins-good, gstreamer-plugins-bad-free, libcurl, libnotify, libappindicator-gtk3")
6 changes: 6 additions & 0 deletions cmake/PackageDescription.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Online radio streaming player:
- Runs on a Linux system tray.
- Has minimum interface possible.
- Plays most media formats (it uses gstreamer).
- Supports PLS, M3U, ASX, RAM, XSPF playlists.

0 comments on commit c404482

Please sign in to comment.