diff options
author | ivanp7 | 2021-09-25 04:34:48 +0300 |
---|---|---|
committer | ivanp7 | 2021-09-25 04:34:48 +0300 |
commit | cc9deaa736158199f668df9042fd301d07a9e1db (patch) | |
tree | c7119bbdd29ab8262101d3d49e6d91291bfe15ed | |
parent | 1b86b3429e5c49ef3fbfaf8552f695ad8fc94083 (diff) | |
download | aur-cc9deaa736158199f668df9042fd301d07a9e1db.tar.gz |
Fix configuration directory default according to XDG specs; provide sha256 sums for all files
-rw-r--r-- | .SRCINFO | 3 | ||||
-rw-r--r-- | PKGBUILD | 10 | ||||
-rw-r--r-- | fbconfig.patch | 39 |
3 files changed, 35 insertions, 17 deletions
@@ -1,7 +1,7 @@ pkgbase = fbterm pkgdesc = Framebuffer terminal emulator pkgver = 1.7_5 - pkgrel = 1 + pkgrel = 2 url = https://salsa.debian.org/debian/fbterm arch = x86_64 arch = armv7h @@ -26,4 +26,3 @@ pkgbase = fbterm sha256sums = SKIP pkgname = fbterm - @@ -4,7 +4,7 @@ pkgname=fbterm _gitname=fbterm _majorver=1.7 pkgver=1.7_5 -pkgrel=1 +pkgrel=2 pkgdesc='Framebuffer terminal emulator' arch=('x86_64' 'armv7h') url='https://salsa.debian.org/debian/fbterm' @@ -16,8 +16,12 @@ source=("http://deb.debian.org/debian/pool/main/f/fbterm/fbterm_1.7.orig.tar.gz" 'fbconfig.patch' 'fbterm.patch' '0001-Fix-build-with-gcc-6.patch' 'fix_ftbfs_crosscompile.patch' 'fix_ftbfs_epoll.patch' 'fbtermrc') sha256sums=('b98d487e84618503887e3996162354c482e24884bad8bf2219b6776372f306ad' - 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' - 'SKIP') + '7932367ff7831fcc4585ef6050bf0c32d74f12e77f3f5683b0f5c2685285b7b0' + '5cd1c14c640679a40f8a9d9781c2a5af5db7543c2296cda99f2886aa40468735' + '8054410ab97da3df03406543c6a471acf3323b9e5712da6455d7c49cad7489ce' + '73f0c87aaa5a74631c167fb765c0340dc28626b00d0a3cd065cebf71acc585f7' + '2b5daa2664adf1efb3e478c2f97376c055b1698422524d262fbae2e7a530a323' + '1759e8e3d4d9fd5b9f46f7813dbdc5df2fc9ef3b7b93f92c75d1267547666e45') prepare() { cd $srcdir/$_gitname-$_majorver diff --git a/fbconfig.patch b/fbconfig.patch index 1412f24fd7dd..5436b8479228 100644 --- a/fbconfig.patch +++ b/fbconfig.patch @@ -1,6 +1,14 @@ --- a/src/fbconfig.cpp 2010-10-18 11:20:11.000000000 +0300 -+++ b/src/fbconfig.cpp 2021-05-19 14:17:36.510535281 +0300 -@@ -38,16 +38,12 @@ ++++ b/src/fbconfig.cpp 2021-09-25 04:04:09.407720173 +0300 +@@ -28,6 +28,7 @@ + #include "config.h" + #include "fbconfig.h" + ++#define CONFIG_FILE_NAME "fbtermrc" + #define MAX_CONFIG_FILE_SIZE 10240 + + DEFINE_INSTANCE_DEFAULT(Config) +@@ -38,16 +39,19 @@ mConfigBuf = 0; mConfigEntrys = 0; @@ -9,28 +17,35 @@ - if (getuid()) return; - home = "/root"; - } -+ const s8 *home = getenv("XDG_CONFIG_HOME"); -+ if (!home) -+ return; ++ s8 name[256]; - s8 name[64]; +- s8 name[64]; - snprintf(name, sizeof(name), "%s/%s", home, ".fbtermrc"); -- ++ const s8 *home = getenv("XDG_CONFIG_HOME"); ++ if (!home || !home[0]) ++ { ++ home = getenv("HOME"); ++ if (!home || !home[0]) ++ return; + - checkConfigFile(name); -+ snprintf(name, sizeof(name), "%s/%s", home, "fbtermrc"); ++ snprintf(name, sizeof(name), "%s/.config/" CONFIG_FILE_NAME, home); ++ } ++ else ++ snprintf(name, sizeof(name), "%s/" CONFIG_FILE_NAME, home); struct stat cstat; if (stat(name, &cstat) == -1) return; - ---- a/doc/fbterm.1.in 2021-05-19 14:20:03.100094341 +0300 -+++ b/doc/fbterm.1.in 2021-05-19 14:19:21.990217395 +0300 -@@ -22,8 +22,7 @@ +--- a/doc/fbterm.1.in 2010-10-18 11:20:11.000000000 +0300 ++++ b/doc/fbterm.1.in 2021-09-25 04:27:09.778563998 +0300 +@@ -22,8 +22,8 @@ file. If that is not set, /bin/sh will be used. You should use the \fI--\fR argument to separate FbTerm's options from the arguments supplied to the \fIcommand\fR. -FbTerm first uses option value specified in command line arguments, then in the configure file \fI$HOME/.fbtermrc\fR. -If that file doesn't exist, FbTerm will create it with default options on startup. +FbTerm first uses option value specified in command line arguments, then in the configure file \fI$XDG_CONFIG_HOME/fbtermrc\fR. ++If \fIXDG_CONFIG_HOME\fR is unset or empty, FbTerm uses \fI$HOME/.config/fbtermrc\fR instead. .TP \fB-h, --help\fR display the help and exit |