Initial commit
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
# Ignore BPM archives and signatures
|
||||
*.bpm
|
||||
*.bpm.sig
|
||||
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Github repository
|
||||
REPO="wolfcw/libfaketime"
|
||||
|
||||
# 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')
|
||||
|
||||
# Trim 'v' character in TAG_NAME variable
|
||||
VERSION=$(echo "$TAG_NAME" | tr -d 'v')
|
||||
|
||||
echo "$VERSION"
|
||||
@@ -0,0 +1,15 @@
|
||||
name: libfaketime
|
||||
description: Report fake dates and times to programs without having to change the system-wide time.
|
||||
version: 0.9.11
|
||||
revision: 1
|
||||
url: https://github.com/wolfcw/libfaketime
|
||||
license: GPL-2.0-only
|
||||
maintainers:
|
||||
- [email protected]
|
||||
architecture: any
|
||||
type: source
|
||||
downloads:
|
||||
- url: https://github.com/wolfcw/libfaketime/archive/refs/tags/v${BPM_PKG_VERSION}.tar.gz
|
||||
extract_to: ${BPM_SOURCE}
|
||||
extract_strip_components: 1
|
||||
checksum: 5912d8b4179402058d3847c0ad389e688630ea38898847b1190e636e12c33e44
|
||||
@@ -0,0 +1,26 @@
|
||||
# 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 prepare function is executed in the root of the temp directory
|
||||
# This function is used for putting downloaded files to the correct location or applying patches
|
||||
prepare() {
|
||||
cd "$BPM_SOURCE"
|
||||
patch -Np1 -i "$BPM_WORKDIR"/0001-add-const-qualifiers-to-fix-build-with-iso-c23.patch
|
||||
}
|
||||
|
||||
# The build function is executed in the source directory
|
||||
# This function is used to compile the source code
|
||||
build() {
|
||||
export CFLAGS="$CFLAGS -std=c99"
|
||||
make PREFIX=/usr
|
||||
}
|
||||
|
||||
# The package function is executed in the source directory
|
||||
# This function is used to move the compiled files into the output directory
|
||||
package() {
|
||||
make DESTDIR="$BPM_OUTPUT" PREFIX=/usr install
|
||||
|
||||
# Install package license
|
||||
install -Dm644 "$BPM_SOURCE"/COPYING "$BPM_OUTPUT"/usr/share/licenses/libfaketime/COPYING
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
From dbe865dfdba0145d993d70b7fd4ec88b2f47554b Mon Sep 17 00:00:00 2001
|
||||
From: Tomas Korbar <[email protected]>
|
||||
Date: Mon, 15 Dec 2025 11:03:21 +0100
|
||||
Subject: [PATCH] Add const qualifiers to fix build with ISO C23
|
||||
|
||||
Fix https://github.com/wolfcw/libfaketime/issues/524
|
||||
---
|
||||
src/libfaketime.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/libfaketime.c b/src/libfaketime.c
|
||||
index ef1dca9..02839c8 100644
|
||||
--- a/src/libfaketime.c
|
||||
+++ b/src/libfaketime.c
|
||||
@@ -2666,7 +2666,7 @@ int timespec_get(struct timespec *ts, int base)
|
||||
static void parse_ft_string(const char *user_faked_time)
|
||||
{
|
||||
struct tm user_faked_time_tm;
|
||||
- char * tmp_time_fmt;
|
||||
+ const char * tmp_time_fmt;
|
||||
char * nstime_str;
|
||||
|
||||
if (!strncmp(user_faked_time, user_faked_time_saved, BUFFERLEN))
|
||||
@@ -3338,7 +3338,7 @@ static void prepare_config_contents(char *contents)
|
||||
bool str_array_contains(const char *haystack, const char *needle)
|
||||
{
|
||||
size_t needle_len = strlen(needle);
|
||||
- char *pos = strstr(haystack, needle);
|
||||
+ const char *pos = strstr(haystack, needle);
|
||||
while (pos) {
|
||||
if (pos == haystack || *(pos - 1) == ',') {
|
||||
char nextc = *(pos + needle_len);
|
||||
Reference in New Issue
Block a user