Skip to content

Commit

Permalink
Package
Browse files Browse the repository at this point in the history
  • Loading branch information
rodlie committed Jan 31, 2024
1 parent a6daa27 commit 0e7f302
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 10 deletions.
15 changes: 5 additions & 10 deletions .github/workflows/c-cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,8 @@ jobs:
- name: Build
run: |
export CWD=`pwd`
mkdir $CWD/build-release-qt5
cd $CWD/build-release-qt5
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release ..
make
make DESTDIR=`pwd`/pkg install
tree pkg
mkdir $CWD/build-debug-qt5
cd $CWD/build-debug-qt5
cmake -DCMAKE_BUILD_TYPE=Debug ..
make
mkdir $CWD/build
cd $CWD/build
cmake -DCMAKE_INSTALL_PREFIX=/usr -DSERVICE_GROUP=plugdev -DCMAKE_BUILD_TYPE=Release ..
make -j2
cpack -G DEB
25 changes: 25 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
cmake_minimum_required(VERSION 3.0)

project(powerkit VERSION 2.0.0 LANGUAGES CXX)

set(PROJECT_HOMEPAGE_URL "https://github.com/rodlie/powerkit")
set(PROJECT_DESCRIPTION "Power manager for alternative X11 desktop environments and window managers")

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_AUTOMOC ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
Expand Down Expand Up @@ -194,3 +198,24 @@ install(FILES
docs/README.md
DESTINATION
${CMAKE_INSTALL_DOCDIR}/${PROJECT_NAME}-${PROJECT_VERSION})

# package
set(CPACK_SET_DESTDIR ON)
set(CPACK_PACKAGE_CONTACT ${PROJECT_HOMEPAGE_URL})
set(CPACK_PACKAGE_VERSION_MAJOR "${PROJECT_VERSION_MAJOR}")
set(CPACK_PACKAGE_VERSION_MINOR "${PROJECT_VERSION_MINOR}")
set(CPACK_PACKAGE_VERSION_PATCH "${PROJECT_VERSION_PATCH}")
set(CPACK_PACKAGE_NAME ${PROJECT_NAME})
set(CPACK_PACKAGE_DESCRIPTION ${PROJECT_DESCRIPTION})
set(CPACK_PACKAGE_VENDOR ${PROJECT_NAME})
set(CPACK_STRIP_FILES TRUE)

set(CPACK_RPM_SPEC_MORE_DEFINE "%define _build_id_links none")
set(CPACK_RPM_PACKAGE_LICENSE "BSD")
set(CPACK_RPM_PACKAGE_URL ${PROJECT_HOMEPAGE_URL})

set(CPACK_DEBIAN_PACKAGE_DEPENDS "xsecurelock")
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
set(CPACK_DEBIAN_PACKAGE_HOMEPAGE ${PROJECT_HOMEPAGE_URL})

include(CPack)

0 comments on commit 0e7f302

Please sign in to comment.