diff options
author | timescam | 2022-02-14 09:33:37 +0800 |
---|---|---|
committer | timescam | 2022-02-14 09:33:37 +0800 |
commit | 294344125f89e17fc943d1368ee6cf76426784e6 (patch) | |
tree | 123526645b22b81e6533d9cf8b3c9cfb12612225 | |
download | aur-papirus-folders-doas-git.tar.gz |
initial commit
-rw-r--r-- | .SRCINFO | 21 | ||||
-rw-r--r-- | PKGBUILD | 39 | ||||
-rw-r--r-- | doas.diff | 36 | ||||
-rw-r--r-- | papirus-folders.hook | 11 |
4 files changed, 107 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..90b1bb8043cd --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,21 @@ +pkgbase = papirus-folders-doas-git + pkgdesc = Allows to change the color of folders (git version) w/ doas patch + pkgver = 1.11.0.0.g83a2225 + pkgrel = 1 + url = https://github.com/PapirusDevelopmentTeam/papirus-folders + arch = any + license = MIT + makedepends = git + depends = papirus-icon-theme + depends = opendoas + provides = papirus-folders + conflicts = papirus-folders + options = !strip + source = papirus-folders::git+https://github.com/PapirusDevelopmentTeam/papirus-folders.git + source = papirus-folders.hook + source = doas.diff + sha256sums = SKIP + sha256sums = 5c48cde4ad155e357857f56ec2ce4d26d3e3fdd12b141e349640775481539ed9 + sha256sums = 5451d155619be5b7992379e8d76c1766384feead3b404fad5bf4bccea6c3cd94 + +pkgname = papirus-folders-doas-git diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..7bc51e423af8 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,39 @@ +# Maintainer: timescam <timescam at duck dot com> + +pkgname=papirus-folders-doas-git +_pkgname=papirus-folders +pkgver=1.11.0.0.g83a2225 +pkgrel=1 +pkgdesc="Allows to change the color of folders (git version) w/ doas patch" +url="https://github.com/PapirusDevelopmentTeam/papirus-folders" +arch=("any") +license=("MIT") +depends=("papirus-icon-theme" "opendoas") +makedepends=("git") +provides=("papirus-folders") +conflicts=("papirus-folders") +options=("!strip") +source=("${_pkgname}::git+https://github.com/PapirusDevelopmentTeam/${_pkgname}.git" + "papirus-folders.hook" + "doas.diff") +sha256sums=("SKIP" + "5c48cde4ad155e357857f56ec2ce4d26d3e3fdd12b141e349640775481539ed9" + "5451d155619be5b7992379e8d76c1766384feead3b404fad5bf4bccea6c3cd94") + +pkgver() { + cd ${_pkgname} + git describe --long --tags | sed "s/^v//;s/-/./g" + +} + +prepare() { + cd "${_pkgname}" + patch -p1 -i ${srcdir}/doas.diff +} + +package() { + cd ${_pkgname} + make DESTDIR="${pkgdir}/" install + + install -Dm644 ../papirus-folders.hook "${pkgdir}/usr/share/libalpm/hooks/papirus-folders.hook" +} diff --git a/doas.diff b/doas.diff new file mode 100644 index 000000000000..573489e256ee --- /dev/null +++ b/doas.diff @@ -0,0 +1,36 @@ +diff --git a/papirus-folders b/papirus-folders +index cc54dca3..4beea74e 100755 +--- a/papirus-folders ++++ b/papirus-folders +@@ -174,8 +174,8 @@ get_real_user() { + + if [ -n "$PKEXEC_UID" ]; then + user="$(id -nu "$PKEXEC_UID")" +- elif [ -n "$SUDO_USER" ]; then +- user="$SUDO_USER" ++ elif [ -n "$DOAS_USER" ]; then ++ user="$DOAS_USER" + else + user="$(id -nu)" + fi +@@ -382,9 +382,8 @@ verify_privileges() { + + verbose "This operation requires root privileges." + +- if command -v sudo > /dev/null; then +- exec sudo USER_HOME="$USER_HOME" XDG_DATA_DIRS="$XDG_DATA_DIRS" \ +- "$THIS_SCRIPT" "${ARGS[@]}" ++ if command -v doas > /dev/null; then ++ exec doas "$THIS_SCRIPT" "${ARGS[@]}" + else + fatal "You need to be root to run this command." + fi +@@ -481,7 +480,7 @@ main() { + fi + + # set USER_HOME variable instead HOME to prevent changing user's icons +- # when running with sudo ++ # when running with doas + [ -n "$USER_HOME" ] || USER_HOME="$(get_user_home "$(id -nu)")" + + if [ -f "$THEME_NAME/index.theme" ]; then
\ No newline at end of file diff --git a/papirus-folders.hook b/papirus-folders.hook new file mode 100644 index 000000000000..1eb2b39778c4 --- /dev/null +++ b/papirus-folders.hook @@ -0,0 +1,11 @@ +[Action] +Depends=papirus-folders +Description=Restoring the last used color of the folders... +Exec=/usr/bin/papirus-folders -R +When=PostTransaction + +[Trigger] +Operation=Install +Operation=Upgrade +Target=papirus-icon-theme +Type=Package
\ No newline at end of file |