summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 857ec8882fca9d74d9a24f80dc85e4f61773a646 (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
41
42
43
44
45
46
47
48
49
50
# Maintainer: Yamada Hayao <development@fascode.net>

pkgname=lightdm-webkit2-theme-alter-git
_pkgname=lightdm-webkit2-theme-alter
pkgver=r58.82f1b9d
pkgrel=1
pkgdesc="AlterLinux webkit2 greeter theme"
arch=('any')
url=https://github.com/SereneTeam/lightdm-webkit2-theme-alter
license=('MIT')
depends=('lightdm' 'lightdm-webkit2-greeter')
optdepends=()
source=("git+https://github.com/SereneTeam/lightdm-webkit2-theme-alter.git")
md5sums=('SKIP')
conflicts=('lightdm-webkit2-theme-alter')

pkgver() {
    cd "${_pkgname}"
    printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build () {
    function remove () {
        local _list
        local _file
        _list=($(echo "$@"))
        for _file in "${_list[@]}"; do
            if [[ -f ${_file} ]]; then
                rm -f "${_file}"
            elif [[ -d ${_file} ]]; then
                rm -rf "${_file}"
            fi
        done
    }
    remove usr
    cd "${_pkgname}"
    remove ${_pkgname}
    remove .git
    remove README.md
    remove LICENSE
    mkdir -p ../usr/share/lightdm-webkit/themes/alter
    mv * ../usr/share/lightdm-webkit/themes/alter
    cd ..
    remove ${_pkgname}
}

package () {
    mkdir -p "$pkgdir"
    cp -r * "$pkgdir"
}