summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 32874b082735f6bb079dee387a2fa9680ee7d047 (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
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
# Maintainer:  taotieren <admin@taotieren.com>

pkgbase=minigui-git
pkgname=(minigui{,-{mgutils,mgplus,mgeff,mgncs,chipmunk,mgncs4touch,mg-tools,mg-tests,mg-samples,mg-demos,cell-phone-ux-demo,res,docs,ministudo}}-git)
pkgver=5.0.11.r12.g0d1f1f02
pkgrel=1
arch=('x86_64')
_url="https://github.com/VincentWei"
url="${_url}/MiniGUI"
license=('GPLv3')
depends=(
        freetype2
        gtk2
        harfbuzz
        libdrm
        libevdev
        libjpeg-turbo
        libtool
        libinput
        libwebp
        libxml2
        libpng
        kmod
        mtdev
        openssl
        util-linux
        sqlite
        systemd
        xorg-server-xvfb
        zlib)
optdepends=()
makedepends=(git
            autoconf
            automake
            cmake
            make
            pkgconf)
backup=()
options=('!strip')
install=
source=("${pkgbase}::git+${url}.git"
        "minigui-mgutils::git+${_url}/mgutils.git"
        "minigui-mgplus::git+${_url}/mgplus.git"
        "minigui-mgeff::git+${_url}/mgeff.git"
        "minigui-mgncs::git+${_url}/mgncs.git"
        "minigui-mgncs4touch::git+${_url}/mgncs4touch.git"
        "minigui-mg-tools::git+${_url}/mg-tools.git"
        "minigui-mg-tests::git+${_url}/mg-tests.git"
        "minigui-mg-samples::git+${_url}/mg-samples.git"
        "minigui-mg-demos::git+${_url}/mg-demos.git"
        "minigui-chipmunk::git+${_url}/chipmunk.git"
        "minigui-cell-phone-ux-demo::git+${_url}/cell-phone-ux-demo.git"
        "minigui-res::git+${_url}/minigui-res.git"
        "minigui-docs::git+${_url}/minigui-docs.git"
        "minigui-ministudio::git+https://github.com/FMSoftCN/ministudo-guibuilder.git")

sha256sums=('SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP')

pkgver() {
    cd "${srcdir}/${pkgbase}"
    git describe --long --tags | sed 's/ver-//g;s/\([^-]*-g\)/r\1/;s/-/./g'
}

package_minigui-mgutils-git() {
    pkgdesc="A component of MiniGUI, provides users with a number of common dialog templates"
    url="${_url}/mgutils"
    depends=(minigui)
    provides=(${pkgname%-git})
    conflicts=(${pkgname%-git})

    cd "${srcdir}/${pkgname%-git}"

    ./autogen.sh
    ./configure --prefix=/usr \
        --disable-static \
        --with-targetname=mstudio \
        --with-libsuffix=msd

    make -j$NR_JOBS
    make DESTDIR="$pkgdir" install
}

package_minigui-mgplus-git() {
    pkgdesc="A MiniGUI component which provides support for advanced 2D graphics functions"
    url="${_url}/mgplus"
    depends=(minigui)
    provides=(${pkgname%-git})
    conflicts=(${pkgname%-git})

    cd "${srcdir}/${pkgname%-git}"

    ./autogen.sh
    ./configure --prefix=/usr \
        --disable-static \
        --with-targetname=mstudio \
        --with-libsuffix=msd

    make -j$NR_JOBS
    make DESTDIR="$pkgdir" install
}

package_minigui-mgeff-git() {
    pkgdesc="An animation framework for MiniGUI"
    url="${_url}/mgeff"
    depends=(
            minigui
            minigui-mgplus
            )
    provides=(${pkgname%-git})
    conflicts=(${pkgname%-git})

    cd "${srcdir}/${pkgname%-git}"
    ./autogen.sh
    ./configure --prefix=/usr \
                --with-targetname=mstudio \
                --with-libsuffix=msd

    make -j$NR_JOBS
    make DESTDIR="$pkgdir" install
}

package_minigui-mgncs-git() {
    pkgdesc="mGNCS provides a new control set and a new framework for MiniGUI apps."
    url="${_url}/mgncs"
    depends=(
            minigui
            minigui-mgutils
            )
    provides=(${pkgname%-git})
    conflicts=(${pkgname%-git})

    cd "${srcdir}/${pkgname%-git}"
    sed -i 's|$(prefix)/etc|/etc|g;s|	$(INSTALL_DATA)|#	$(INSTALL_DATA)|g' etc/Makefile.am
    ./autogen.sh
    ./configure --prefix=/usr \
        --disable-static \
        --with-targetname=mstudio \
        --with-libsuffix=msd  \
        --enable-guibuilder-support  \
        --enable-datasource          \
        --enable-old-mledit          \
        --enable-texteditor

    make -j$NR_JOBS
    make DESTDIR="$pkgdir" install
}

package_minigui-chipmunk-git() {
    pkgdesc="Chipmunk is a simple, lightweight, fast and portable 2D rigid body physics library written in C. "
    url="${_url}/chipmunk"
    depends=(
            cmake
            gtk2
            )
    provides=(${pkgname%-git} chipmunk)
    conflicts=(${pkgname%-git} chipmunk)
    replaces=(chipmunk)

    cd "${srcdir}/${pkgname%-git}"

# Ninja build
# see:https://wiki.archlinux.org/title/CMake_package_guidelines
#     cmake -DCMAKE_BUILD_TYPE=Release \
    cmake -DCMAKE_BUILD_TYPE=None \
        -DCMAKE_INSTALL_PREFIX=/usr

    make

    make DESTDIR="$pkgdir" install
}

package_minigui-mgncs4touch-git() {
    pkgdesc="A set of mGNCS-compliant controls for devices with a touch screen."
    url="${_url}/mgncs4touch"
    depends=(
            minigui
            minigui-mgutils
            minigui-mgplus
            minigui-mgeff
            minigui-mgncs
            minigui-chipmunk
            )
    provides=(${pkgname%-git})
    conflicts=(${pkgname%-git})

    cd "${srcdir}/${pkgname%-git}"

    sed -i 's|$(prefix)/etc|/etc|g;s|	$(INSTALL_DATA)|#	$(INSTALL_DATA)|g' etc/Makefile.am
    ./autogen.sh
    ./configure --prefix=/usr \
        --disable-static \
        --with-targetname=mstudio \
        --with-libsuffix=msd  \
        --enable-guibuilder-support

    make -j$NR_JOBS
    make DESTDIR="$pkgdir" install
}

package_minigui-mg-tools-git() {
    pkgdesc="A modern and proven cross-platform window system for embedded systems or smart IoT devices."
    url="${_url}/mg-tools"
    depends=(
            freetype2
            openssl
            minigui
            minigui-mgutils
            )
    provides=(${pkgname%-git})
    conflicts=(${pkgname%-git})

    cd "${srcdir}/${pkgname%-git}"
    ./autogen.sh
    ./configure --prefix=/usr

    make -j$NR_JOBS
    make DESTDIR="$pkgdir" install
}

package_minigui-mg-tests-git() {
    pkgdesc="Test code of MiniGUI Core"
    url="${_url}/mg-tests"
    depends=(
            minigui
            minigui-mgeff
            )
    provides=(${pkgname%-git})
    conflicts=(${pkgname%-git})

    cd "${srcdir}/${pkgname%-git}"
    ./autogen.sh
    ./configure --prefix=/usr

    make -j$NR_JOBS
    make DESTDIR="$pkgdir" install
}

package_minigui-mg-samples-git() {
    pkgdesc="Basic Samples for MiniGUI Core and Key MiniGUI Components."
    url="${_url}/mg-samples"
    depends=(
            minigui
            minigui-mgutils
            minigui-mgplus
            minigui-mgeff
            minigui-mgncs
            )
    provides=(${pkgname%-git})
    conflicts=(${pkgname%-git})

    cd "${srcdir}/${pkgname%-git}"
    ./autogen.sh
    ./configure --prefix=/usr

    make -j$NR_JOBS
    make DESTDIR="$pkgdir" install
}

package_minigui-mg-demos-git() {
    pkgdesc="A set of demos as supplements of cell-phone-ux-demo"
    url="${_url}/mg-demos"
    depends=(
            minigui
            minigui-mgutils
            minigui-mgplus
            minigui-mgeff
            minigui-mgncs
            minigui-mgncs4touch
            )
    provides=(${pkgname%-git})
    conflicts=(${pkgname%-git})

    cd "${srcdir}/${pkgname%-git}"
    ./autogen.sh
    ./configure --prefix=/usr

    make -j$NR_JOBS
    make DESTDIR="$pkgdir" install
}

package_minigui-cell-phone-ux-demo-git() {
    pkgdesc="This UX demo shows the new features of MiniGUI core, mGEff, mGNCS, and mGNCS4Touch components."
    url="${_url}/cell-phone-ux-demo"
    depends=(
            minigui
            minigui-mgutils
            minigui-mgplus
            minigui-mgeff
            minigui-mgncs
            minigui-mgncs4touch
            minigui-chipmunk
            )
    provides=(${pkgname%-git})
    conflicts=(${pkgname%-git})

    cd "${srcdir}/${pkgname%-git}"

    sed -i 's|$(prefix)/bin/etc|/etc|g' etc/Makefile.am
    ./autogen.sh
    ./configure --prefix=/usr

    make -j$NR_JOBS
    make DESTDIR="$pkgdir" install
}

package_minigui-res-git() {
    pkgdesc="Resources package for MiniGUI"
    url="${_url}/minigui-res"
    depends=(minigui)
    provides=(${pkgname%-git})
    conflicts=(${pkgname%-git})

    cd "${srcdir}/${pkgname%-git}"
    sed -i 's|prefix = $(TOPDIR)/usr/local|prefix = $(prefix)|g' config.linux
    ./autogen.sh
    ./configure --prefix=/usr

    make -j$NR_JOBS
    make DESTDIR="$pkgdir" install
}

package_minigui-docs-git() {
    pkgdesc="Documents for MiniGUI Core and MiniGUI Components."
    url="${_url}/minigui-docs"
    depends=(minigui)
    provides=(${pkgname%-git})
    conflicts=(${pkgname%-git})

    install -dm0755 ${pkgdir}/usr/share/doc
    cp -rv "${srcdir}"/${pkgname%-git}  "${pkgdir}"/usr/share/doc/
}

package_minigui-git() {
    pkgdesc="A modern and proven cross-platform window system for embedded systems or smart IoT devices."
    url="${_url}/MiniGUI"
#     depends=(
# #             chipmunk
#     )
    provides=(${pkgname%-git})
    conflicts=(${pkgname%-git})

    cd "${srcdir}/${pkgbase}"

    sed -i 's|$(prefix)/etc|/etc|g' etc/Makefile.am
    ./autogen.sh

    ./configure \
        $prefix_config \
        --prefix=/usr \
        --disable-static \
        --with-targetname=mstudio \
        --with-libsuffix=msd \
        --enable-pcxvfb \
        --disable-qvfbial \
        --disable-consoleial \
        --disable-dummyial \
        --disable-autoial \
        --disable-videodummy \
        --disable-videoqvfb \
        --disable-videofbcon \
        --disable-videocommlcd \
        --with-ttfsupport=ft2 \
        --enable-qpfsupport \
        --enable-upfsupport \
        --enable-gb18030support \
        --enable-unicodesupport \
        --enable-aboutdlg \
        --disable-savescreen \
        --disable-splash \
        --disable-screensaver \
        --with-runmode=ths \
        --enable-ctrlstatic \
        --enable-ctrlbutton \
        --enable-ctrlsledit \
        --enable-ctrlbidisledit \
        --enable-ctrlnewtextedit \
        --enable-ctrllistbox \
        --enable-ctrlpgbar \
        --enable-ctrlcombobox \
        --enable-ctrlpropsheet \
        --enable-ctrltrackbar \
        --enable-ctrlscrollbar \
        --enable-ctrlnewtoolbar \
        --enable-ctrlmenubtn \
        --enable-ctrlscrollview \
        --enable-ctrltextedit \
        --enable-ctrlmonthcal \
        --enable-ctrltreeview \
        --enable-ctrltreeview-rdr \
        --enable-ctrlspinbox \
        --enable-ctrlcoolbar \
        --enable-ctrllistview \
        --enable-ctrliconview \
        --enable-ctrlgridview \
        --enable-ctrlanimation \
        --disable-watermark \
        --disable-pngsupport \
        --disable-videodrm

    sed -i 's|/local||g' etc/mvfb.cfg
    sed -i 's|/local||g' etc/MiniGUI.cfg

    make -j$NR_JOBS
    make DESTDIR="$pkgdir" install
}

package_minigui-ministudo-git() {
    pkgdesc="GUIBuilder of miniStudio."
    depends=(minigui{,-{mgutils,mgplus,mgeff,mgncs,mgncs4touch,mg-tools,mg-tests,mg-samples,mg-demos,cell-phone-ux-demo,chipmunk,res,docs}})
    url="https://github.com/FMSoftCN/ministudo-guibuilder"

    provides=(${pkgname%-git})
    conflicts=(${pkgname%-git})
    # build GUIBuilder
    cd "${srcdir}/${pkgname%-git}"
    ./autogen.sh
    ./configure --prefix=/usr \
        --enable-werror

    make
    make DESTDIR="$pkgdir" install

    # resourse
    cd "${srcdir}/${pkgname%-git}/etc"
    make
    make DESTDIR="$pkgdir" install

    # tools/mgcfg-trans
    cd "${srcdir}/${pkgname%-git}/tools/mgcfg-trans"
    rm -f mgcfg-trans
    gcc lex.yy.c -o mgcfg-trans
    install -Dm755 mgcfg-trans -t $pkgdir/bin/

    # tools/res2c
    cd "${srcdir}/${pkgname%-git}/tools/res2"
    make clean
    make
    install -Dm755 cfg2c.py -t $pkgdir/bin/
    install -Dm755 res2c -t $pkgdir/bin/
}