Project

General

Profile

Bug #9739 » com.danplanet.chirp.yml

Flatpak build w libxml2 fix - Tony Fuller, 03/03/2022 07:41 PM

 
1
app-id: com.danplanet.chirp
2
runtime: org.freedesktop.Platform
3
runtime-version: '21.08'
4
sdk: org.freedesktop.Sdk
5
command: chirpw
6
finish-args:
7
  - --share=ipc
8
  - --socket=x11
9
  - --socket=wayland
10
  - --filesystem=home
11
  - --share=network
12
  - --device=all
13
modules:
14
  - upstream: https://github.com/flathub/shared-modules/tree/master/intltool
15
    name: intltool
16
    cleanup:
17
      - '*'
18
    sources:
19
      - type: archive
20
        url: https://launchpad.net/intltool/trunk/0.51.0/+download/intltool-0.51.0.tar.gz
21
        sha256: 67c74d94196b153b774ab9f89b2fa6c6ba79352407037c8c14d5aeb334e959cd
22
  - upstream: https://github.com/flathub/shared-modules/tree/master/gtk2
23
    name: gtk2
24
    cleanup:
25
      - /bin
26
      - /share/gtk-2.0
27
      - /share/aclocal
28
      - /share/gtk-doc
29
      - /lib/pkgconfig
30
      - /lib/gtk-2.0/include
31
      - /include
32
      - '*.la'
33
    x-cpe:
34
      product: gtk+
35
    config-opts:
36
      - --disable-dependency-tracking
37
      - --disable-gtk-doc-html
38
      - --disable-introspection
39
      - --with-xinput=xfree
40
    sources:
41
      - type: archive
42
        url: https://download.gnome.org/sources/gtk+/2.24/gtk+-2.24.32.tar.xz
43
        sha256: b6c8a93ddda5eabe3bfee1eb39636c9a03d2a56c7b62828b359bf197943c582e
44
      - type: patch
45
        path: gtk2-use-adwaita-theme.patch
46
  - upstream: https://github.com/flathub/shared-modules/tree/master/gtk2
47
    name: gnome-themes-extra
48
    rm-configure: true
49
    config-opts:
50
      - --disable-dependency-tracking
51
      - --disable-gtk3-engine
52
    cleanup:
53
      - /share/themes/Adwaita/gtk-3.0
54
      - /share/themes/Adwaita-dark/gtk-3.0
55
      - /share/themes/HighContrast/gtk-3.0
56
      - '*.la'
57
    sources:
58
      - type: archive
59
        url: https://download.gnome.org/sources/gnome-themes-extra/3.28/gnome-themes-extra-3.28.tar.xz
60
        sha256: 7c4ba0bff001f06d8983cfc105adaac42df1d1267a2591798a780bac557a5819
61
      - type: shell
62
        //: We want to avoid generating icons as its 99% of the build time and gnome
63
          runtime has it
64
        commands:
65
          - sed -i 's/icons//' themes/HighContrast/Makefile.am
66
      - type: script
67
        commands:
68
          - autoreconf -fsi
69
  - name: ensure-gtk2-installed-correctly
70
    build-commands:
71
      - pkg-config --print-errors --modversion "gtk+-2.0"
72
      - pkg-config --exists --print-errors "gtk+-2.0 >= 2.8.0"
73
  - upstream: https://github.com/flathub/shared-modules/tree/master/python2.7
74
    name: python-2.7
75
    sources:
76
      - type: archive
77
        url: https://www.python.org/ftp/python/2.7.18/Python-2.7.18.tar.xz
78
        sha256: b62c0e7937551d0cc02b8fd5cb0f544f9405bafc9a54d3808ed4594812edef43
79
    config-opts:
80
      - --enable-shared
81
      - --with-ensurepip=no
82
      - --with-system-expat
83
      - --with-system-ffi
84
      - --enable-loadable-sqlite-extensions=no
85
      - --with-dbmliborder=gdbm
86
      - --enable-unicode=ucs4
87
    post-install:
88
      - chmod 644 $FLATPAK_DEST/lib/libpython2.7.so.1.0
89
    cleanup:
90
      - /bin/2to3*
91
      - /bin/easy_install*
92
      - /bin/idle*
93
      - /bin/pydoc*
94
      - /bin/python*-config
95
      - /bin/pyvenv*
96
      - /include
97
      - /lib/pkgconfig
98
      - /lib/python*/config
99
      - /share
100
      - /lib/python*/test
101
      - /lib/python*#/test
102
      - /lib/python*#/tests
103
      - /lib/python*/lib-tk/test
104
      - /lib/python*/lib-dynload/_*_test.*.so
105
      - /lib/python*/lib-dynload/_test*.*.so
106
      - /lib/python*/idlelib
107
      - /lib/python*/tkinter*
108
      - /lib/python*/turtle*
109
      - /lib/python*/lib2to3*
110
      - /lib/python2.7/config/libpython2.7.a
111
  - name: pycairo
112
    buildsystem: simple
113
    sources:
114
      - type: archive
115
        url: https://github.com/pygobject/pycairo/releases/download/v1.13.1/pycairo-1.13.1.tar.gz
116
        sha256: d8f58de67ddd01eda9e5112de57599b7d0154d71c9474821e98866c228794641
117
    build-commands:
118
      - python2 setup.py install
119
  - name: pygobject
120
    sources:
121
      - type: archive
122
        url: https://download.gnome.org/sources/pygobject/2.28/pygobject-2.28.7.tar.xz
123
        sha256: bb9d25a3442ca7511385a7c01b057492095c263784ef31231ffe589d83a96a5a
124
  - why_is_this_here: pygtk 2.24 does not compile with pango-1.44 so downgrade it.
125
      TODO See if CHIRP runs without pango.
126
    name: pango-1.42
127
    sources:
128
      - type: archive
129
        url: https://download.gnome.org/sources/pango/1.42/pango-1.42.4.tar.xz
130
        sha256: 1d2b74cd63e8bd41961f2f8d952355aa0f9be6002b52c8aa7699d9f5da597c9d
131
  - name: pygtk
132
    sources:
133
      - type: archive
134
        url: https://download.gnome.org/sources/pygtk/2.24/pygtk-2.24.0.tar.gz
135
        sha256: 6e3e54fa6e65a69ac60bd58cb2e60a57f3346ac52efe995f3d10b6c38c972fd8
136
  - name: libxml2
137
    sources:
138
      - type: archive
139
        url: http://xmlsoft.org/sources/libxml2-2.9.9.tar.gz
140
        sha256: 94fb70890143e3c6549f265cee93ec064c80a84c42ad0f23e85ee1fd6540a871
141
    config-opts :
142
      - --with-python=/app
143
  - name: pyserial
144
    buildsystem: simple
145
    sources:
146
      - type: archive
147
        url: https://github.com/pyserial/pyserial/releases/download/v3.2.1/pyserial-3.2.1.tar.gz
148
        sha256: 1eecfe4022240f2eab5af8d414f0504e072ee68377ba63d3b6fe6e66c26f66d1
149
    build-commands:
150
      - python2 setup.py install
151
  - name: python-future
152
    upstream: https://github.com/PythonCharmers/python-future
153
    buildsystem: simple
154
    sources:
155
      - type: archive
156
        url: https://files.pythonhosted.org/packages/45/0b/38b06fd9b92dc2b68d58b75f900e97884c45bedd2ff83203d933cf5851c9/future-0.18.2.tar.gz
157
        sha256: b1bead90b70cf6ec3f0710ae53a525360fa360d306a86583adc6bf83a4db537d
158
    build-commands:
159
      - python2 setup.py install
160
  - name: python-suds
161
    buildsystem: simple
162
    sources:
163
      - type: archive
164
        url: https://github.com/suds-community/suds/archive/v0.8.4.tar.gz
165
        sha256: 3fc1c6dc961e0c9b421e8355bff45104e8db7edb8764b33939c4a84afa98116e
166
    build-commands:
167
      - python2 setup.py install
168
  - name: chirp
169
    buildsystem: simple
170
    sources:
171
      - type: archive
172
        path: chirp-daily.tar.gz
173
    build-commands:
174
      - sed -i 's/Icon=chirp/Icon=com.danplanet.chirp/' share/chirp.desktop
175
      - sed -i 's#share/pixmaps#share/icons/hicolor/128x128/apps#' setup.py
176
      - sed -i 's#chirp.png#com.danplanet.chirp.png#' setup.py
177
      - sed -i 's#chirp.png#com.danplanet.chirp.png#' chirp/ui/mainapp.py
178
      - mv share/chirp.png share/com.danplanet.chirp.png
179
      - mv share/chirp.desktop share/com.danplanet.chirp.desktop
180
      - python2 setup.py install
(3-3/3)