summaryrefslogtreecommitdiff
path: root/packages/net/homeassistant/homeassistant-0.68.1.exheres-0
blob: dd2789d0011706a73f3e672d1672461a0fd314ef (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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
# Copyright 2016-2018 Timo Gurr <tgurr@exherbo.org>
# Distributed under the terms of the GNU General Public License v2

require pypi setup-py [ import=setuptools has_bin=true multibuild=false blacklist="2 3.4" test=pytest ] \
    systemd-service

SUMMARY="Open-source home automation platform running on Python 3"
DESCRIPTION="
The goal of Home Assistant is to be able to track and control all devices at home and offer a
platform for automating control.
"
HOMEPAGE+=" https://home-assistant.io"

LICENCES="Apache-2.0"
SLOT="0"
PLATFORMS="~amd64"
MYOPTIONS=""

# Need to figure out
RESTRICT="test"

DEPENDENCIES="
    build+run:
        group/${PN}
        user/${PN}
        dev-python/Jinja2[>=2.10][python_abis:*(-)?]
        dev-python/PyYAML[>=3.11&<4][python_abis:*(-)?]
        dev-python/aiohttp[>=3.1.3][python_abis:*(-)?]
        dev-python/astral[>=1.6][python_abis:*(-)?]
        dev-python/async-timeout[>=2.0.1][python_abis:*(-)?]
        dev-python/attrs[>=17.4.0][python_abis:*(-)?]
        dev-python/certifi[>=2017.4.17][python_abis:*(-)?]
        dev-python/pip[>=8.0.3][python_abis:*(-)?]
        dev-python/pytz[>=2017.2][python_abis:*(-)?]
        dev-python/requests[>=2.18.4&<3][python_abis:*(-)?]
        dev-python/voluptuous[>=0.11.1][python_abis:*(-)?]
    run:
        dev-python/SQLAlchemy[>=1.2.6][python_abis:*(-)?]
        dev-python/aiohttp-cors[>=0.7.0][python_abis:*(-)?]
        dev-python/colorlog[>=3.1.2][python_abis:*(-)?]
        dev-python/distro[>=1.2.0][python_abis:*(-)?]
        dev-python/home-assistant-frontend[>=20180426.0][python_abis:*(-)?]
        dev-python/netdisco[>=1.3.1][python_abis:*(-)?]
        dev-python/voluptuous-serialize[>=1.0.0][python_abis:*(-)?]
        dev-python/xmltodict[>=0.11.0][python_abis:*(-)?]
    suggestion:
        app-speech/svox [[
            description = [ Required for Home Assistant component: tts.picotts ]
        ]]
        dev-python/PyChromecast[>=2.1.0][python_abis:*(-)?] [[
            description = [ Required for Home Assistant component: media_player.cast ]
        ]]
        dev-python/PyJWT[>=1.6.0][python_abis:*(-)?] [[
            description = [ Required for Home Assistant component: notify.html5 ]
        ]]
        dev-python/pyHS100[>=0.3.0][python_abis:*(-)?] [[
            description = [ Required for Home Assistant component: light.tplink switch.tplink ]
        ]]
        dev-python/beautifulsoup4[>=4.6.0][python_abis:*(-)?] [[
            description = [ Required for Home Assistant component: device_tracker.linksys_ap, sensor.geizhals, sensor.scrape, sensor.sytadin ]
        ]]
        dev-python/gstreamer-player[>=1.1.0][python_abis:*(-)?] [[
            description = [ Required for Home Assistant component: media_player.gstreamer ]
        ]]
        dev-python/jsonrpc-async[>=0.6][python_abis:*(-)?] [[
            description = [ Required for Home Assistant component: media_player.kodi, notify.kodi ]
        ]]
        dev-python/jsonrpc-websocket[>=0.6][python_abis:*(-)?] [[
            description = [ Required for Home Assistant component: media_player.kodi ]
        ]]
        dev-python/limitlessled[>=1.1.0][python_abis:*(-)?] [[
            description = [ Required for Home Assistant component: light.limitlessled ]
        ]]
        dev-python/mutagen[>=1.40.0][python_abis:*(-)?] [[
            description = [ Required for Home Assistant component: tts ]
        ]]
        dev-python/onkyo-eiscp[>=1.2.4][python_abis:*(-)?] [[
            description = [ Required for Home Assistant component: media_player.onkyo ]
        ]]
        dev-python/paho-mqtt[>=1.3.1][python_abis:*(-)?] [[
            description = [ Required for Home Assistant component: mqtt, shiftr ]
        ]]
        dev-python/psutil[>=5.4.3][python_abis:*(-)?] [[
            description = [ Required for Home Assistant component: sensor.systemmonitor ]
        ]]
        dev-python/pylast[>=2.1.0][python_abis:*(-)?] [[
            description = [ Required for Home Assistant component: sensor.lastfm ]
        ]]
        dev-python/python-mpd2[>=1.0.0][python_abis:*(-)?] [[
            description = [ Required for Home Assistant component: media_player.mpd ]
        ]]
        dev-python/python-nmap[>=0.6.1][python_abis:*(-)?] [[
            description = [ Required for Home Assistant component: device_tracker.nmap_tracker ]
        ]]
        dev-python/pywebpush[>=1.6.0][python_abis:*(-)?] [[
            description = [ Required for Home Assistant component: notify.html5 ]
        ]]
        dev-python/snapcast[>=2.0.8][python_abis:*(-)?] [[
            description = [ Required for Home Assistant component: media_player.snapcast ]
        ]]
        dev-python/spotipy[>=2.4.4][python_abis:*(-)?] [[
            description = [ Required for Home Assistant component: media_player.spotify ]
        ]]
        dev-python/wakeonlan[>=1.0.0][python_abis:*(-)?] [[
            description = [ Required for Home Assistant component: media_player.panasonic_viera, media_player.samsungtv, switch.wake_on_lan ]
        ]]
        dev-python/websockets[>=3.2][python_abis:*(-)?] [[
            description = [ Required for Home Assistant component: spc, media_player.webostv ]
        ]]
        dev-python/xknx[>=0.8.5][python_abis:*(-)?] [[
            description = [ Required for Home Assistant component: knx ]
        ]]
        dev-python/zeroconf[>=0.20.0][python_abis:*(-)?] [[
            description = [ Required for Home Assistant component: zeroconf ]
        ]]
        sys-apps/net-tools [[
            description = [ Required for Home Assistant component: device_tracker.nmap_tracker ]
        ]]
        net-misc/iputils [[
            description = [ Required for Home Assistant component: switch.wake_on_lan ]
        ]]
        net-misc/youtube-dl[>=2018.04.16][python_abis:*(-)?] [[
            description = [ Required for Home Assistant component: media_extractor ]
        ]]
"

src_prepare() {
    setup-py_src_prepare

    # https://github.com/home-assistant/home-assistant/pull/13132
    edo sed \
        -e "/typing/d" \
        -i setup.py

    # can be more recent
    edo sed \
        -e 's:requests==2.18.4:requests>=2.18.4:g' \
        -e 's:voluptuous==0.11.1:voluptuous>=0.11.1:g' \
        -e 's:aiohttp==3.1.3:aiohttp>=3.1.3:g' \
        -e 's:async_timeout==2.0.1:async_timeout>=2.0.1:g' \
        -e 's:astral==1.6:astral>=1.6:g' \
        -e 's:attrs==17.4.0:attrs>=17.4.0:g' \
        -i homeassistant/package_constraints.txt \
        -i setup.py

    # Core components
    # homeassistant.components.recorder
    # homeassistant.components.sensor.sql
    # homeassistant.scripts.db_migrator
    edo sed \
        -e 's:sqlalchemy==1.2.6:sqlalchemy>=1.2.6:g' \
        -i homeassistant/components/recorder/__init__.py
    # homeassistant.components.emulated_hue
    # homeassistant.components.http
    edo sed \
        -e 's:aiohttp_cors==0.7.0:aiohttp_cors>=0.7.0:g' \
        -i homeassistant/components/__init__.py
    # homeassistant.scripts.check_config
    edo sed \
        -e 's:colorlog==3.1.2:colorlog>=3.1.2:g' \
        -i homeassistant/scripts/check_config.py
    # homeassistant.components.updater
    edo sed \
        -e 's:distro==1.2.0:distro>=1.2.0:g' \
        -i homeassistant/components/updater.py
    # homeassistant.components.frontend
    edo sed \
        -e 's:home-assistant-frontend==20180426.0:home-assistant-frontend>=20180426.0:g' \
        -i homeassistant/components/frontend/__init__.py
    # homeassistant.components.discovery
    edo sed \
        -e 's:netdisco==1.3.1:netdisco>=1.3.1:g' \
        -i homeassistant/components/discovery.py
    # homeassistant.components.config.config_entries
    edo sed \
        -e 's:voluptuous-serialize==1:voluptuous-serialize>=1:g' \
        -i homeassistant/components/config/config_entries.py
    # homeassistant.components.media_player.bluesound
    # homeassistant.components.sensor.startca
    # homeassistant.components.sensor.swiss_hydrological_data
    # homeassistant.components.sensor.ted5000
    # homeassistant.components.sensor.yr
    # homeassistant.components.sensor.zestimate
    edo sed \
        -e 's:xmltodict==0.11.0:xmltodict>=0.11.0:g' \
        -i homeassistant/components/sensor/{swiss_hydrological_data,ted5000,yr}.py


    # Additional components
    # homeassistant.components.media_player.cast
    edo sed \
        -e 's:pychromecast==2.1.0:pychromecast>=2.1.0:g' \
        -i homeassistant/components/media_player/cast.py
    # homeassistant.components.notify.html5
    edo sed \
        -e 's:PyJWT==1.6.0:PyJWT>=1.6.0:g' \
        -e 's:pywebpush==1.6.0:pywebpush>=1.6.0:g' \
        -i homeassistant/components/notify/html5.py
    # homeassistant.components.light.tplink
    # homeassistant.components.switch.tplink
    edo sed \
        -e 's:pyHS100==0.3.0:pyHS100>=0.3.0:g' \
        -i homeassistant/components/{light,switch}/tplink.py
    # homeassistant.components.device_tracker.linksys_ap
    # homeassistant.components.sensor.geizhals
    # homeassistant.components.sensor.scrape
    # homeassistant.components.sensor.sytadin
    edo sed \
        -e 's:beautifulsoup4==4.6.0:beautifulsoup4>=4.6.0:g' \
        -i homeassistant/components/device_tracker/linksys_ap.py \
        -i homeassistant/components/sensor/scrape.py
    # homeassistant.components.media_player.gstreamer
    edo sed \
        -e 's:gstreamer-player==1.1.0:gstreamer-player>=1.1.0:g' \
        -i homeassistant/components/media_player/gstreamer.py
    # homeassistant.components.media_player.kodi
    # homeassistant.components.notify.kodi
    edo sed \
        -e 's:jsonrpc-async==0.6:jsonrpc-async>=0.6:g' \
        -i homeassistant/components/media_player/kodi.py
    # homeassistant.components.media_player.kodi
    edo sed \
        -e 's:jsonrpc-websocket==0.6:jsonrpc-websocket>=0.6:g' \
        -i homeassistant/components/media_player/kodi.py
    # homeassistant.components.light.limitlessled
    edo sed \
        -e 's:limitlessled==1.1.0:limitlessled>=1.1.0:g' \
        -i homeassistant/components/light/limitlessled.py
    # homeassistant.components.tts
    edo sed \
        -e 's:mutagen==1.40.0:mutagen>=1.40.0:g' \
        -i homeassistant/components/tts/__init__.py
    # homeassistant.components.media_player.onkyo
    edo sed \
        -e 's:onkyo-eiscp==1.2.4:onkyo-eiscp>=1.2.4:g' \
        -i homeassistant/components/media_player/onkyo.py
    # homeassistant.components.mqtt
    # homeassistant.components.shiftr
    edo sed \
        -e 's:paho-mqtt==1.3.1:paho-mqtt>=1.3.1:g' \
        -i homeassistant/components/mqtt/__init__.py \
        -i homeassistant/components/shiftr.py
    # homeassistant.components.sensor.systemmonitor
    edo sed \
        -e 's:psutil==5.4.3:psutil>=5.4.3:g' \
        -i homeassistant/components/sensor/systemmonitor.py
    # homeassistant.components.sensor.lastfm
    edo sed \
        -e 's:pylast==2.1.0:pylast>=2.1.0:g' \
        -i homeassistant/components/sensor/lastfm.py
    # homeassistant.components.media_player.mpd
    edo sed \
        -e 's:python-mpd2==1.0.0:python-mpd2>=1.0.0:g' \
        -i homeassistant/components/media_player/mpd.py
    # homeassistant.components.device_tracker.nmap_tracker
    edo sed \
        -e 's:python-nmap==0.6.1:python-nmap>=0.6.1:g' \
        -i homeassistant/components/device_tracker/nmap_tracker.py
    # homeassistant.components.media_player.snapcast
    edo sed \
        -e 's:snapcast==2.0.8:snapcast>=2.0.8:g' \
        -i homeassistant/components/media_player/snapcast.py
    # homeassistant.components.media_player.spotify
    edo sed \
        -e "s:.*REQUIREMENTS.*:REQUIREMENTS = ['spotipy>=2.4.4']:g" \
        -e '/spotipy==2.4.4/d' \
        -i homeassistant/components/media_player/spotify.py
    # homeassistant.components.wake_on_lan
    # homeassistant.components.media_player.panasonic_viera
    # homeassistant.components.media_player.samsungtv
    # homeassistant.components.media_player.webostv
    # homeassistant.components.switch.wake_on_lan
    edo sed \
        -e 's:wakeonlan==1.0.0:wakeonlan>=1.0.0:g' \
        -i homeassistant/components/wake_on_lan.py \
        -i homeassistant/components/media_player/{panasonic_viera,samsungtv}.py \
        -i homeassistant/components/switch/wake_on_lan.py
    # homeassistant.components.spc
    # homeassistant.components.media_player.webostv
    edo sed \
        -e 's:websockets==3.2:websockets>=3.2:g' \
        -i homeassistant/components/spc.py \
        -i homeassistant/components/media_player/webostv.py
    # homeassistant.components.knx
    edo sed \
        -e 's:xknx==0.8.5:xknx>=0.8.5:g' \
        -i homeassistant/components/knx.py
    # homeassistant.components.zeroconf
    edo sed \
        -e 's:zeroconf==0.20.0:zeroconf>=0.20.0:g' \
        -i homeassistant/components/zeroconf.py
    # homeassistant.components.media_extractor
    edo sed \
        -e 's:youtube_dl==2018.04.16:youtube_dl>=2018.04.16:g' \
        -i homeassistant/components/media_extractor.py
}

src_install() {
    setup-py_src_install

    keepdir /var/lib/homeassistant
    edo chown homeassistant:homeassistant "${IMAGE}"/var/lib/homeassistant

    install_systemd_files
}