Initial commit

This commit is contained in:
2026-07-30 13:20:08 +03:00
commit cbbedd1b0e
6 changed files with 106 additions and 0 deletions
+3
View File
@@ -0,0 +1,3 @@
# Ignore BPM archives and signatures
*.bpm
*.bpm.sig
+9
View File
@@ -0,0 +1,9 @@
#!/bin/bash
# Github repository
REPO="linrunner/TLP"
# Get tag name using Github Rest API
TAG_NAME=$(curl -s -L -H "X-GitHub-Api-Version: 2022-11-28" -H "Authorization: token ${GITHUB_API_TOKEN}" https://api.github.com/repos/"$REPO"/releases/latest | jq -r '.tag_name')
echo "$TAG_NAME"
+42
View File
@@ -0,0 +1,42 @@
name: tlp
description: Optimize Linux laptop battery life
version: 1.10.2
revision: 1
url: https://linrunner.de/en/tlp/tlp.html
license: GPL-2.0-or-later
architecture: any
output_architecture: any
type: source
optional_depends:
- ethtol:For disabling Wake On Lan
- smartmontools:For displaying S.M.A.R.T data
downloads:
- url: https://github.com/linrunner/TLP/archive/refs/tags/${BPM_PKG_VERSION}.tar.gz
extract_to: ${BPM_SOURCE}
extract_strip_components: 1
checksum: a0b8bd8193d96853d2876c552b3b2bdf46bd1258fffc9ac598acc67eb73b56d5
split_packages:
- name: tlp
keep:
- etc/tlp.conf
depends:
- bash
- hdparm
- iw
- pciutils
- perl
- util-linux
- usbutils
- name: tlp-pd
description: Optimize Linux laptop battery life - Power Profiles Daemon
depends:
- glib
- python3
- python-dbus
- python-pygobject
- python-shtab
- tlp
conflicts:
- power-profiles-daemon
provides:
- power-profiles-daemon
+43
View File
@@ -0,0 +1,43 @@
# This is the recipe.sh script. It is executed by BPM in a temporary directory when compiling a source package
# BPM Expects the source code to be extracted into the automatically created 'source' directory which can be accessed using $BPM_SOURCE
# BPM Expects the output files to be present in the automatically created 'output' directory which can be accessed using $BPM_OUTPUT
# The package function is executed in the source directory
# This function is used to move the compiled files into the output directory
package_tlp() {
cd "$BPM_SOURCE"
export TLP_NO_INIT=1
export TLP_SBIN=/usr/sbin
export TLP_WITH_ELOGIND=1
export TLP_WITH_SYSTEMD=0
make DESTDIR="$BPM_OUTPUT" install-tlp install-man-tlp
# Install esvm service
install -Dm644 "$BPM_WORKDIR"/tlp.esv "$BPM_OUTPUT"/etc/esvm/services/tlp.esv
# Install package license
install -Dm644 "$BPM_SOURCE"/LICENSE "$BPM_OUTPUT"/usr/share/licenses/tlp/LICENSE
}
package_tlp-pd() {
cd "$BPM_SOURCE"
make DESTDIR="$BPM_OUTPUT" install-pd install-man-pd
# Fix path to 'tlp' binary in 'tlp-pd'
sed -i 's|"tlp", f"{profile}"|"/usr/sbin/tlp", f"{profile}"|g' "$BPM_OUTPUT"/usr/sbin/tlp-pd
# Set Exec field in dbus services to tlp-pd
sed -i 's|^Exec=.*|Exec=/usr/sbin/tlp-pd|' \
"$BPM_OUTPUT"/usr/share/dbus-1/system-services/org.freedesktop.UPower.PowerProfiles.service \
"$BPM_OUTPUT"/usr/share/dbus-1/system-services/net.hadess.PowerProfiles.service
# Install esvm service
install -Dm644 "$BPM_WORKDIR"/tlp-pd.esv "$BPM_OUTPUT"/etc/esvm/services/tlp-pd.esv
# Install package license
install -d "$BPM_OUTPUT"/usr/share/licenses
ln -sf "$BPM_OUTPUT"/usr/share/licenses/tlp "$BPM_OUTPUT"/usr/share/licenses/tlp-pd
}
+4
View File
@@ -0,0 +1,4 @@
name: tlp-pd
description: Start the TLP Power Profiles Daemon
type: background
start_cmd: tlp-pd
+5
View File
@@ -0,0 +1,5 @@
name: tlp
description: Enable the TLP daemon
type: simple
start_cmd: tlp init start
stop_cmd: tlp init stop