gSharkDown / CMakeLists.txt

project("gsharkdown")
cmake_minimum_required(VERSION 2.8)

#
# Application information
# 
set(PACKAGE_NAME ${PROJECT_NAME})
set(PACKAGE_VERSION_MAJOR "0")
set(PACKAGE_VERSION_MINOR "7")
set(PACKAGE_VERSION_PATCH "0")
set(PACKAGE_VERSION "${PACKAGE_VERSION_MAJOR}.${PACKAGE_VERSION_MINOR}.${PACKAGE_VERSION_PATCH}")
set (GETTEXT_PACKAGE ${PROJECT_NAME})

file(WRITE "VERSION" ${PACKAGE_VERSION})

#
# Install data and lib
# 
install (DIRECTORY data DESTINATION "share/gsharkdown")
install (DIRECTORY lib DESTINATION "share/gsharkdown")
install (FILES gsharkdown.py VERSION HELP DESTINATION "share/gsharkdown")

install(CODE "execute_process(COMMAND ./build.sh WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/po)")
install (DIRECTORY locale DESTINATION "share" FILES_MATCHING PATTERN "gsharkdown.mo")

#
# Install internationalized desktop file
# 
install(CODE "message (STATUS \"Generating translated gsharkdown.desktop\")")
install(CODE "execute_process(COMMAND intltool-merge -d po \"${CMAKE_SOURCE_DIR}/gsharkdown.desktop.in\" \"${CMAKE_BINARY_DIR}/gsharkdown.desktop\" WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} OUTPUT_QUIET)")
install(FILES ${CMAKE_BINARY_DIR}/gsharkdown.desktop DESTINATION "share/applications")

#
# Generate and install shell script for launch gsd
# 
install(CODE "file (WRITE \"${CMAKE_BINARY_DIR}/bin_gsharkdown\" \"\#!/bin/bash\\n\\ncd ${CMAKE_INSTALL_PREFIX}/share/gsharkdown && python gsharkdown.py \$1\")")
install(PROGRAMS "${CMAKE_BINARY_DIR}/bin_gsharkdown" DESTINATION bin RENAME gsharkdown)

#
# Icons
# 
install(FILES "${CMAKE_SOURCE_DIR}/data/gsharkdown_16.png" DESTINATION "share/icons/hicolor/16x16/apps" RENAME gsharkdown_indicator.png)
install(FILES "${CMAKE_SOURCE_DIR}/data/gsharkdown_16.png" DESTINATION "share/icons/hicolor/16x16/apps" RENAME gsharkdown.png)
install(FILES "${CMAKE_SOURCE_DIR}/data/gsharkdown_16_playing.png" DESTINATION "share/icons/hicolor/16x16/apps" RENAME gsharkdown_indicator_playing.png)
install(FILES "${CMAKE_SOURCE_DIR}/data/gsharkdown_64.png" DESTINATION "share/icons/hicolor/64x64/apps" RENAME gsharkdown.png)
install(FILES "${CMAKE_SOURCE_DIR}/data/gsharkdown_128.png" DESTINATION "share/icons/hicolor/128x128/apps" RENAME gsharkdown.png)

#
# Packaging
# 
SET(CPACK_GENERATOR "DEB")
SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "Damián Nohales <damiannohales@gmail.com>")
SET(CPACK_PACKAGE_VERSION_MAJOR ${PACKAGE_VERSION_MAJOR})
SET(CPACK_PACKAGE_VERSION_MINOR ${PACKAGE_VERSION_MINOR})
SET(CPACK_PACKAGE_VERSION_PATCH ${PACKAGE_VERSION_PATCH})
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "gSharkDown player and downloader\n gSharkDown is a desktop client working as player and downloader\n for the famous service Grooveshark. The application\n allows you to play and download your favorite songs.")
SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/COPYING")
SET(CPACK_DEBIAN_PACKAGE_SECTION "sound")
SET(CPACK_DEBIAN_PACKAGE_PRIORITY "optional")
SET(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "all")
SET(CPACK_DEBIAN_PACKAGE_HOMEPAGE "http://gsharkdown.bultux.org/")
SET(CPACK_DEBIAN_PACKAGE_DEPENDS "python-pycurl, python-gobject, python-configobj, python-gtk2, python")
SET(CPACK_DEBIAN_PACKAGE_RECOMMENDS "python-appindicator, xdg-user-dirs, python-notify")
SET(CPACK_DEBIAN_PACKAGE_CONFLICTS "gsharkdown (<=0.5.2)")
 
INCLUDE(CPack)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.