-
Notifications
You must be signed in to change notification settings - Fork 521
/
Copy pathbuild.sh
executable file
·60 lines (47 loc) · 1.61 KB
/
build.sh
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
#!/usr/bin/env bash
# homeassistant-core
set -euxo pipefail
echo "Installing Home Assistant Core ${HA_VERSION}..."
apt-get update
apt-get install -y --no-install-recommends \
autoconf \
libpcap0.8 \
libturbojpeg \
tcl
apt-get clean
rm -rf /var/lib/apt/lists/*
python3 -m sqlite3 -v
# Download and build SQLite
mkdir -p /tmp/sqlite
# Download SQLite from GitHub mirror
wget --quiet --show-progress --progress=bar:force:noscroll \
https://github.com/sqlite/sqlite/archive/refs/tags/version-${SQLITE_VERSION}.tar.gz \
-O /tmp/sqlite/sqlite.tar.gz
# Extract and build SQLite
tar -xzf /tmp/sqlite/sqlite.tar.gz -C /tmp/sqlite
cd /tmp/sqlite/sqlite-version-${SQLITE_VERSION}
./configure --prefix=/usr/local
make -j$(nproc)
make install
ln -sf /usr/local/lib/libsqlite3.so /usr/lib/libsqlite3.so
ln -sf /usr/local/lib/libsqlite3.so.0 /usr/lib/libsqlite3.so.0
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH:-}:/usr/local/lib
ldconfig
ls -l /usr/lib/libsqlite3.so
ls -l /usr/lib/libsqlite3.so.0
cd /
rm -rf /tmp/sqlite
python3 -m sqlite3 -v
pip3 install --no-cache-dir --ignore-installed blinker
pip3 install --no-cache-dir --verbose uv==0.5.0 ruff
# Install homeassistant-core
git clone --branch=${HA_VERSION} https://github.com/home-assistant/core /usr/src/homeassistant
uv pip install --no-cache-dir --verbose -r /usr/src/homeassistant/requirements_all.txt
uv pip install -e /usr/src/homeassistant
python3 -m compileall /usr/src/homeassistant
# Generate languages
cd /usr/src/homeassistant
python3 -m script.hassfest
python3 -m script.translations develop --all
# Copy Home Assistant S6-Overlay
cp -r rootfs/* /