summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: ec1846ffb863c994567fa72c733fe6b78631b632 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
pkgname=gnome-shell-extension-screen-autorotate
pkgver=29
_pkgver=29
pkgrel=1
pkgdesc="A GNOME extension to auto-rotate screen regardless of touch mode"
arch=("any")
url="https://github.com/shyzus/gnome-shell-extension-screen-autorotate"
license=("GPL")
depends=("gnome-shell" "iio-sensor-proxy")
conflicts=("gnome-shell-extension-screen-autorotate-git")
source=("$pkgname-${_pkgver}.tar.gz::$url/archive/v${_pkgver}.tar.gz")
sha256sums=('1aa9c6e5609ca15079aaef5a224cb824a8667e851263ea46780b278dddb5f686')

_uuid="screen-rotate@shyzus.github.io"

prepare() {
    source_dir="$srcdir/$pkgname-${_pkgver}"
    cd "$source_dir"
    local src
    for src in "${source[@]}"; do
        src="${src%%::*}"
        src="${src##*/}"

        [[ $src = *.patch ]] || continue
        echo "Applying patch $src..."
        patch -Np1 < "../$src"
    done
}

package() {

  source_dir="$srcdir/$pkgname-${_pkgver}/$_uuid"

  install -dm755 "${pkgdir}/usr/share/gnome-shell/extensions/${_uuid}"
  install -Dm755 -t "${pkgdir}/usr/share/gnome-shell/extensions/${_uuid}" "${source_dir}"/*.*

  install -dm755 "${pkgdir}/usr/share/glib-2.0/schemas"
  install -Dm644 -t "${pkgdir}/usr/share/glib-2.0/schemas" "${source_dir}/schemas"/*.xml

}