summaryrefslogtreecommitdiffstats
path: root/README.md
blob: 94dc20f5aaf65c36f1a42f48388051d8f871b87b (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
# siglo

GTK app to sync InfiniTime watch with PinePhone

'siglo' means century in Spanish

## Requirements
Gtk >= 3.30

## Download and Install
[Download the latest stable version from Flathub](https://flathub.org/apps/details/com.github.theironrobin.siglo) (Warning: SMS Notifications currently broken in flatpak https://github.com/theironrobin/siglo/issues/80).

### Alpine
Works for Alpine and other Alpine-based distribution, such as [postmarketOS](https://postmarketos.org/).

```sh
sudo apk add gettext glib-dev meson py3-dbus py3-pip python3 
pip3 install gatt 
```

### Arch Linux

```sh
sudo pacman -S --needed meson python-pip base-devel bluez bluez-utils dbus-python python-gobject
pip3 install gatt
```

### Fedora

```
sudo dnf install meson glib2-devel
pip3 install gatt
```

### Ubuntu

```sh
sudo apt install libgtk-3-dev python3-pip meson python3-dbus gtk-update-icon-cache desktop-file-utils gettext appstream-util libglib2.0-dev
pip3 install gatt requests black
```

## Build/Install

```
git clone https://github.com/theironrobin/siglo.git
cd siglo
mkdir build
meson build/
cd build
sudo ninja install
```

### Mocked Testing with Docker

While you won't get bluetooth connectivity, you can get some high-level vetting in a container, which
will open the way forward to better CI testing on GitHub.

The [`Dockerfile`](Dockerfile) contains all required dependencies, in addition to
[`xvfb`](https://www.x.org/releases/X11R7.6/doc/man/man1/Xvfb.1.xhtml) which allows us to make sure
the app can execute.

```sh
sudo docker build . --tag siglo; and sudo docker run --name siglo --volume (pwd):/siglo --rm -it siglo:latest
```

Once the container is running, you can launch the app:

```sh
/etc/init.d/dbus start && dbus-run-session xvfb-run -a -s "-screen 0 1024x768x24" siglo
```

## Building and installing Flatpak app

### Building and installing on target architecture

```sh
flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak install --user flathub org.gnome.Sdk//42 org.gnome.Platform//42

flatpak-builder --user --install --repo=repo --force-clean build-dir/ com.github.theironrobin.siglo.json
```

### Cross-compiling for PinePhone

Example cross-compiling for PinePhone on an `x86_64` Fedora machine:

```sh
sudo dnf install qemu-system-arm qemu-user-static
flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak install --user flathub org.gnome.Sdk/aarch64/42 org.gnome.Platform/aarch64/42

flatpak-builder --arch=aarch64 --repo=repo --force-clean build-dir com.github.theironrobin.siglo.json
flatpak build-bundle --arch=aarch64 ./repo/ siglo.flatpak com.github.theironrobin.siglo
```

Transfer the `siglo.flatpak` file on the PinePhone and install it with the following command:

```sh
sudo flatpak install ./siglo.flatpak
```

##

If this project helped you, you can buy me a cup of coffee :)
<br/><br/>
[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://paypal.me/theironrobin)
<br/><br/>
DOGE address: DLDNfkXoJeueb2GRx4scnmRc12SX1H22VW

Icons by svgrepo.com