diff options
author | git user | 2023-07-23 18:24:19 +0200 |
---|---|---|
committer | git user | 2023-07-23 18:24:19 +0200 |
commit | 203068d976ba507765a9e2fc94368041ffd459e1 (patch) | |
tree | 7894f404cab6e9e3114e59efbdababf90099ff81 | |
parent | aeced7f579d7f4cef77e6aa625167f50fbf0a261 (diff) | |
download | aur-203068d976ba507765a9e2fc94368041ffd459e1.tar.gz |
Adopted, and switched to more up to date source.
-rw-r--r-- | .SRCINFO | 25 | ||||
-rwxr-xr-x | 30-gtk3-nocsd.sh | 22 | ||||
-rwxr-xr-x | 30-gtk3-nocsd.xinit.sh | 22 | ||||
-rw-r--r-- | PKGBUILD | 101 | ||||
-rw-r--r-- | gtk3-nocsd-git.install | 7 | ||||
-rw-r--r-- | gtk3-nocsd.install | 8 |
6 files changed, 109 insertions, 76 deletions
@@ -1,21 +1,24 @@ pkgbase = gtk3-nocsd-git - pkgdesc = A hack to disable gtk+ 3 client side decoration - pkgver = r63.3f91a6b + pkgdesc = A LD_PRELOAD library to disable gtk+ 3 client side decoration. + pkgver = 3.0.8+2.r84.20221015.a356bf7 pkgrel = 1 - url = https://github.com/ZaWertun/gtk3-nocsd - install = gtk3-nocsd-git.install + url = https://github.com/fredldotme/gtk3-nocsd + install = gtk3-nocsd.install arch = i686 arch = x86_64 - license = LGPL + license = LGPL2.1 makedepends = git makedepends = gobject-introspection + depends = bash + depends = glibc depends = gtk3 - provides = gtk3-nocsd + provides = gtk3-nocsd=3.0.8+2.r84.20221015.a356bf7 conflicts = gtk3-nocsd - source = git+https://github.com/ZaWertun/gtk3-nocsd.git - source = 30-gtk3-nocsd.sh - sha512sums = SKIP - sha512sums = ef7a812887072a19b7b365fd393d808806d1bdb4beb2aa4e46af9cb690dc2a7abc8976a8e5875d91742f3029330ac9229feb6d50141e0c2d35f0d3d8a7400830 + source = gtk3-nocsd::git+https://github.com/fredldotme/gtk3-nocsd.git + source = 30-gtk3-nocsd.xinit.sh + source = gtk3-nocsd.install + sha256sums = SKIP + sha256sums = b6a314bb7482f1de024805d669750957c41e350a82f87dd16ca72760d7d8f9f4 + sha256sums = 9827e52fb9d7385c4ec155411f8d2b1c2225878c107a1e2768f77f73589e99e4 pkgname = gtk3-nocsd-git - diff --git a/30-gtk3-nocsd.sh b/30-gtk3-nocsd.sh deleted file mode 100755 index 086823a86e89..000000000000 --- a/30-gtk3-nocsd.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash - -if [ -n "${GNOME_DESKTOP_SESSION_ID-}" ]; then - # just in case DESKTOP_SESSION wasn't properly set - _check=gnome -else - _check="${DESKTOP_SESSION-}" -fi - -case "${_check}" in - - gnome|gnome-*|*/gnome|*/gnome-*) - unset GTK_CSD - ;; - - *) - export GTK_CSD=0 - export LD_PRELOAD="/usr/\${LIB}/libgtk3-nocsd.so.0${LD_PRELOAD:+:$LD_PRELOAD}" - ;; -esac - -unset _check diff --git a/30-gtk3-nocsd.xinit.sh b/30-gtk3-nocsd.xinit.sh new file mode 100755 index 000000000000..f6239beca72b --- /dev/null +++ b/30-gtk3-nocsd.xinit.sh @@ -0,0 +1,22 @@ +#!/bin/sh + +if [ -n "${GNOME_DESKTOP_SESSION_ID-}" ]; then + # just in case DESKTOP_SESSION wasn't properly set + _session=gnome +else + _session="${DESKTOP_SESSION-}" +fi + +case "${_session}" in + + gnome|gnome-*|*/gnome|*/gnome-*) + unset GTK_CSD + ;; + + *) + export GTK_CSD=0 + export LD_PRELOAD="/usr/lib/libgtk3-nocsd.so.0${LD_PRELOAD:+:$LD_PRELOAD}" + ;; +esac + +unset _session @@ -1,57 +1,86 @@ -# Maintainer: Callum Parsey <neoninteger@protonmail.com> -# Contributor: Sefa Eyeoglu <contact@scrumplex.net> -# Contributor: Kazutoshi Noguchi <noguchi.kazutosi+lGlcOenS [at] gmail [dot] com> -# Contributor: Marco Kundt <mrckndt [at] gmail [dot] com> +# Maintainer: dreieck (https://aur.archlinux.org/account/dreieck) +# Contributor: Callum Parsey +# Contributor: Sefa Eyeoglu +# Contributor: Kazutoshi Noguchi +# Contributor: Marco Kundt -pkgname=gtk3-nocsd-git -pkgver=r63.3f91a6b +_pkgname="gtk3-nocsd" +_gitname="${_pkgname}" +_gituser='fredldotme' +pkgname="${_pkgname}-git" +pkgver=3.0.8+2.r84.20221015.a356bf7 pkgrel=1 -pkgdesc="A hack to disable gtk+ 3 client side decoration" -arch=("i686" "x86_64") -url="https://github.com/ZaWertun/gtk3-nocsd" -license=("LGPL") - +pkgdesc="A LD_PRELOAD library to disable gtk+ 3 client side decoration." +arch=( + "i686" + "x86_64" +) +url="https://github.com/${_gituser}/${_gitname}" +license=("LGPL2.1") +provides=("gtk3-nocsd=${pkgver}") conflicts=("gtk3-nocsd") -provides=("gtk3-nocsd") -depends=("gtk3") - +depends=( + "bash" + "glibc" + "gtk3" +) makedepends=( - "git" - "gobject-introspection" + "git" + "gobject-introspection" ) - +install="${_pkgname}.install" source=( - "git+https://github.com/ZaWertun/gtk3-nocsd.git" - "30-gtk3-nocsd.sh" + "${_gitname}::git+${url}.git" + "30-gtk3-nocsd.xinit.sh" + "${install}" ) - -sha512sums=( - "SKIP" - "ef7a812887072a19b7b365fd393d808806d1bdb4beb2aa4e46af9cb690dc2a7abc8976a8e5875d91742f3029330ac9229feb6d50141e0c2d35f0d3d8a7400830" +sha256sums=( + 'SKIP' + 'b6a314bb7482f1de024805d669750957c41e350a82f87dd16ca72760d7d8f9f4' + '9827e52fb9d7385c4ec155411f8d2b1c2225878c107a1e2768f77f73589e99e4' ) -install="$pkgname.install" +prepare() { + cd "${srcdir}/${_gitname}" -_gitname="gtk3-nocsd" + git log > git.log +} pkgver() { - cd "$srcdir/$_gitname" - printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" + cd "${srcdir}/${_gitname}" + + _ver="$(git describe --tags | sed -E -e 's|^[vV]||' -e 's|-g[0-9a-f]+$||' | tr '-' '+')" + _rev="$(git rev-list --count HEAD)" + _date="$(git log -1 --date=format:"%Y%m%d" --format="%ad")" + _hash="$(git rev-parse --short HEAD)" + + if [ -z "${_ver}" ]; then + error "Version could not be determined." + return 1 + else + printf '%s' "${_ver}.r${_rev}.${_date}.${_hash}" + fi } build() { - cd "$srcdir/$_gitname" - make + cd "${srcdir}/${_gitname}" + + make } package() { - cd "$srcdir/$_gitname" - install -D -m 0755 gtk3-nocsd "${pkgdir}"/usr/bin/gtk3-nocsd - install -D -m 0644 gtk3-nocsd.1 "${pkgdir}"/usr/share/man/man1/gtk3-nocsd.1 - install -D -m 0644 gtk3-nocsd.bash-completion "${pkgdir}"/usr/share/bash-completion/completions/gtk3-nocsd + cd "${srcdir}/${_gitname}" + + make DESTDIR="${pkgdir}" prefix='/usr' install - install -D -m 0644 libgtk3-nocsd.so.0 "${pkgdir}"/usr/lib/libgtk3-nocsd.so.0 + for _docfile in 'git.log' 'README.md' 'gedit-with-csd.png' 'gedit-without-csd.png' 'TODO'; do + install -Dvm644 "${_docfile}" "${pkgdir}/usr/share/doc/${_pkgname}/${_docfile}" + done + for _licensefile in COPYING; do + install -Dvm644 "${_licensefile}" "${pkgdir}/usr/share/licenses/${pkgname}/${_licensefile}" + ln -svr "${pkgdir}/usr/share/licenses/${pkgname}/${_licensefile}" "${pkgdir}/usr/share/doc/${_pkgname}/${_licensefile}" + done - cd "$srcdir" - install -D -m 0755 30-gtk3-nocsd.sh "${pkgdir}"/etc/X11/xinit/xinitrc.d/30-gtk3-nocsd.sh + cd "${srcdir}" + install -Dvm0755 '30-gtk3-nocsd.xinit.sh' "${pkgdir}/etc/X11/xinit/xinitrc.d/30-gtk3-nocsd.sh" } diff --git a/gtk3-nocsd-git.install b/gtk3-nocsd-git.install deleted file mode 100644 index f354edb0ce3f..000000000000 --- a/gtk3-nocsd-git.install +++ /dev/null @@ -1,7 +0,0 @@ -function post_install { - echo "You need to restart your X session to apply the changes." -} - -function post_upgrade { - post_install -} diff --git a/gtk3-nocsd.install b/gtk3-nocsd.install new file mode 100644 index 000000000000..604ac622dd4b --- /dev/null +++ b/gtk3-nocsd.install @@ -0,0 +1,8 @@ +function post_install { + echo "You need to restart your X session to apply the changes." + echo "Note that in gnome sessions, or when the files in '/etc/X11/xinit/xinitrc.d/' do not get executed, this package is no automatically activated and must be used per application by '/usr/bin/gtk3-nocsd'." +} + +function post_upgrade { + post_install +} |