summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: ab228e10f9d3b63de783b552c8f415b957e71e44 (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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
# Maintainer: devome <evinedeng@hotmail.com>
# Contributor: Carl Smedstad <carsme@archlinux.org>
# Contributor: Luis Martinez <luis dot martinez at disroot dot org>
# Contributor: S. Leduc <sebastien@sleduc.fr>
# Contributor: redfish <redfish@galactica.pw>
# Contributor: Amr Hassan <amr.hassan@gmail.com>
# Contributor: Nathan Owe <ndowens.aur at gmail dot com>
# Contributor: G. Richard Bellamy <rbellamy@pteradigm.com>

_pkgname=Flexget
pkgname=${_pkgname,,}
pkgver=3.13.5
pkgrel=1
pkgdesc="FlexGet is a program aimed to automate downloading or processing content (torrents, podcasts, etc.) from different sources like RSS-feeds, html-pages, various sites and more."
arch=(any)
url="https://github.com/${_pkgname}/${_pkgname}"
license=(MIT)
# run './geninfo.sh' to auto generate 'depends' variable after run 'updpkgsums'
depends=(
    "python-aniso8601"
    "python-apscheduler"
    "python-attrs"
    "python-autocommand"
    "python-babelfish"
    "python-beautifulsoup4"
    "python-blinker"
    "python-brotli"
    "python-certifi"
    "python-charset-normalizer"
    "python-cheroot"
    "python-cherrypy"
    "python-click"
    "python-colorama"
    "python-dateutil"
    "python-feedparser"
    "python-flask"
    "python-flask-compress"
    "python-flask-cors"
    "python-flask-login"
    "python-flask-restx"
    "python-guessit"
    "python-html5lib"
    "python-idna"
    "python-importlib_resources"
    "python-itsdangerous"
    "python-jaraco.collections"
    "python-jaraco.context"
    "python-jaraco.functools"
    "python-jaraco.text"
    "python-jinja"
    "python-jsonschema"
    "python-jsonschema-specifications"
    "python-loguru"
    "python-markdown-it-py"
    "python-markupsafe"
    "python-mdurl"
    "python-more-itertools"
    "python-packaging"
    "python-pendulum"
    "python-plumbum"
    "python-portend"
    "python-psutil"
    "python-pygments"
    "python-pynzb"
    "python-pyparsing"
    "python-pyrss2gen"
    "python-pytz"
    "python-pyyaml"
    "python-rebulk"
    "python-referencing"
    "python-requests"
    "python-rich"
    "python-rpds-py"
    "python-rpyc"
    "python-setuptools"
    "python-sgmllib3k"
    "python-six"
    "python-soupsieve"
    "python-sqlalchemy"
    "python-tempora"
    "python-typing_extensions"
    "python-tzdata"
    "python-tzlocal"
    "python-urllib3"
    "python-webencodings"
    "python-werkzeug"
    "python-zc.lockfile"
    "python-zstandard"
    "python-zxcvbn"
)
makedepends=('python-build' 'python-installer' 'python-setuptools' 'python-wheel')
optdepends=(
    "flexget-webui-v1: webui v1"
    "flexget-webui: webui v2"
    "python-cloudscraper"
    "python-deluge-client"
    "python-qbittorrent-api"
    "python-telegram-bot"
    "python-transmission-rpc"
)
source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/v${pkgver}.tar.gz"
        "${pkgname}.service"
        "${pkgname}@.service"
        "${pkgname}.user.service"
        "${pkgname}.sysusers"
        "${pkgname}.tmpfiles")
sha256sums=('8eb0772ab2b40fc3c4995467d9d890bb9a25161e85d81414963eee90b6050c8a'
            'b7578417ab5f671def7021133ae68900d82aaa81b5e80a2fec4d85e46eb1f8e9'
            'b9d354f6095aafe7a29cb8e90239b662a2584903a85fe3770f2b99bb8bdfff4a'
            '799921777b3714f074deaafbdd241ea7b99a0eccd65931708fd81457286f4f49'
            '919115d2ce9bdc49161c38897dc4b0b7fe9682c15b3f1a6b2c557a8534af6915'
            '81625d5cd816eadb179974a68a1a2ce80f316cd8e097c0d873f0aa7ead794909')
options=("!strip")

build() {
    cd "${_pkgname}-${pkgver}"
    python -m build --wheel --no-isolation
}

package() {
    local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")

    install -Dm644 "${pkgname}.service"       "${pkgdir}/usr/lib/systemd/system/${pkgname}.service"
    install -Dm644 "${pkgname}@.service"      "${pkgdir}/usr/lib/systemd/system/${pkgname}@.service"
    install -Dm644 "${pkgname}.user.service"  "${pkgdir}/usr/lib/systemd/user/${pkgname}.service"
    install -Dm644 "${pkgname}.sysusers"      "${pkgdir}/usr/lib/sysusers.d/${pkgname}.conf"
    install -Dm644 "${pkgname}.tmpfiles"      "${pkgdir}/usr/lib/tmpfiles.d/${pkgname}.conf"

    cd "${_pkgname}-${pkgver}"
    python -m installer --destdir="${pkgdir}" dist/*.whl
    install -Dm644 LICENSE                    "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
    ln -sf "/usr/share/flexget-webui/v1/app"  "${pkgdir}${site_packages}/${pkgname}/ui/v1/app"
    ln -sf "/usr/share/flexget-webui/v2/dist" "${pkgdir}${site_packages}/${pkgname}/ui/v2/dist"
}