summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 8cb0df2f676f76d001c2397c5f39f953c6dc11f5 (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
# Maintainer: devome <evinedeng@hotmail.com>

pkgname=tieba-cloud-sign
pkgver=20231124.154303
pkgrel=2
pkgdesc="Baidu Tieba Cloud Sign | 百度贴吧云签到"
arch=("any")
url="https://github.com/MoeNetwork/Tieba-Cloud-Sign"
license=("custom")
depends=("cronie" "mariadb" "php-fpm")
backup=("srv/${pkgname}/config.php")
optdepends=("php-gd: image processing for generating verification codes"
            "apache: http service"
            "caddy: http service"
            "nginx: http service")
source=("${pkgname}::git+${url}"
        "${pkgname}.crontab"
        "${pkgname}.tmpfiles")
sha256sums=('SKIP'
            'e12cea2de704c077dcbaa137d8bb25c3b166082c7b3e78d010517ea9822fdaba'
            '60586ea4deff1434c80421c8ffa47d074fa125c9297140d58ed2f83c82d3e130')

pkgver() {
    cd "${pkgname}"
    echo "$(git log -1 --format="%cd" --date='format:%Y%m%d.%H%M%S')"
}

package() {
    install -Dm644 "${pkgname}.crontab"  "${pkgdir}/etc/cron.d/${pkgname}"
    install -Dm644 "${pkgname}.tmpfiles" "${pkgdir}/usr/lib/tmpfiles.d/${pkgname}.conf"

    cd "${pkgname}"
    install -Dm644 license.html          "${pkgdir}/usr/share/licenses/${pkgname}/license.html"
    install -Dm644 README.md             "${pkgdir}/usr/share/doc/${pkgname}/README.md"

    rm -rf .git .gitignore .github docker README.md
    find . -type f -exec install -Dm644 {} "${pkgdir}/srv/${pkgname}/"{} \;
}