Skip to content

Commit

Permalink
Debian Package and CMake install
Browse files Browse the repository at this point in the history
  • Loading branch information
joka90 committed Aug 27, 2022
1 parent a3b8ba4 commit 2348fd8
Show file tree
Hide file tree
Showing 11 changed files with 115 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -348,3 +348,6 @@ ASALocalRun/
healthchecksdb

# End of https://www.gitignore.io/api/visualstudio

# Debian package build
obj-*/
17 changes: 15 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
CMAKE_MINIMUM_REQUIRED(VERSION 3.0)

#define project name
PROJECT(ryzenadj)
PROJECT(ryzenadj VERSION 0.11.1)

set(CMAKE_CXX_STANDARD 11)

Expand Down Expand Up @@ -37,4 +37,17 @@ target_link_libraries(${PROJECT_NAME} ${OS_LINK_LIBRARY})
ADD_LIBRARY (libryzenadj SHARED ${OS_SOURCE} ${COMMON_SOURCES})
set_target_properties(libryzenadj PROPERTIES PREFIX "")
target_link_libraries(libryzenadj ${OS_LINK_LIBRARY})
#SET_TARGET_PROPERTIES(libryzenadj PROPERTIES LINKER_LANGUAGE C)
set_target_properties(libryzenadj PROPERTIES
VERSION ${PROJECT_VERSION}
SOVERSION ${PROJECT_VERSION_MAJOR})
set_target_properties(libryzenadj PROPERTIES PUBLIC_HEADER "lib/ryzenadj.h;lib/nb_smu_ops.h;lib/ryzenadj_priv.h")

if (UNIX)
include(GNUInstallDirs)
install(TARGETS ${PROJECT_NAME} libryzenadj
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
)
endif (UNIX)
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,13 @@ The simplest way to build it:
cmake -DCMAKE_BUILD_TYPE=Release ..
make

### Package build

On Debian/Ubuntu:

dpkg-buildpackage -us -uc
sudo dpkg -i ../ryzenadj_*.deb ../libryzenadj0_*.deb

### Windows

It can be built by Visual Studio + MSVC automaticaly, or Clang + Nmake in command line.
Expand Down
8 changes: 8 additions & 0 deletions debian/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.debhelper/
debhelper-build-stamp
files
*.substvars
ryzenadj/
libryzenadj-dev/
libryzenadj0/
tmp/
11 changes: 11 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
ryzenadj (0.11.1-1) unstable; urgency=medium

New revision

-- Johan Källström <[email protected]> Sat, 27 Aug 2022 14:02:53 +0200

ryzenadj (0.11.0-1) unstable; urgency=medium

initial debian package release

-- Johan Källström <[email protected]> Sat, 27 Mar 2022 08:18:45 +0100
43 changes: 43 additions & 0 deletions debian/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
Source: ryzenadj
Section: admin
Priority: optional
Maintainer: Johan Källström <[email protected]>
Uploaders: Johan Källström <[email protected]>,
Build-Depends: cmake (>= 3.0~),
debhelper-compat (= 13),
libpci-dev
Standards-Version: 4.6.0
Homepage: https://github.com/FlyGoat/RyzenAdj/
Vcs-Browser: https://github.com/FlyGoat/RyzenAdj/
Vcs-Git: https://github.com/FlyGoat/RyzenAdj.git
Rules-Requires-Root: no


Package: ryzenadj
Architecture: any
Depends: ${misc:Depends},
${shlibs:Depends},
libryzenadj0 (= ${binary:Version}),
Description: Adjust power management settings for Ryzen Mobile Processors.
This is a commandline tool that allows you to adjust power management
settings for Ryzen Mobile Processors.

Package: libryzenadj0
Architecture: any
Depends: ${misc:Depends},
${shlibs:Depends},
Description: power management library for Ryzen Mobile Processors.
This library provides APIs to Adjust power management settings for
Ryzen Mobile Processors.

Package: libryzenadj-dev
Architecture: any
Depends: ${misc:Depends},
libryzenadj0 (= ${binary:Version})
Description: power management library - development files
for Ryzen Mobile Processors.
This library provides APIs to Adjust power management settings for
Ryzen Mobile Processors.
.
This package contains the files needed for developing applications that
use libryzenadj.
8 changes: 8 additions & 0 deletions debian/copyright
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Contact: [email protected]
Upstream-Name: ryzenadj
Source: https://github.com/FlyGoat/RyzenAdj/

Files: *
Copyright: 2019-2022, Jiaxun Yang <[email protected]>
License: LGPL-3
3 changes: 3 additions & 0 deletions debian/libryzenadj-dev.install
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
usr/include/*
usr/lib/*/libryzenadj.so

2 changes: 2 additions & 0 deletions debian/libryzenadj0.install
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
usr/lib/*/libryzenadj.so.*

14 changes: 14 additions & 0 deletions debian/rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/make -f

DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)

export DEB_BUILD_MAINT_OPTIONS=hardening=+all
export DH_VERBOSE = 1

%:
dh $@

override_dh_auto_configure:
dh_auto_configure -- \
-DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH) \
-DCMAKE_BUILD_TYPE=RelWithDebInfo
1 change: 1 addition & 0 deletions debian/ryzenadj.install
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
usr/bin/ryzenadj

0 comments on commit 2348fd8

Please sign in to comment.