-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmix-install-flatpak
executable file
·86 lines (72 loc) · 2.08 KB
/
mix-install-flatpak
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
#!/bin/sh
### Package: mix-install-flatpak
### Version: v20241101.2300
### Author: Michael Gan "xmixahlx" michaelbgan@gmail.com
### License: GPLv3
### Script Dependencies: (none)
## OVERRIDES
# MIXTOOLSDIR
if [ -z $MIXTOOLSDIR ]; then
MIXTOOLSDIR="`pwd`"
PATH=$MIXTOOLSDIR:$PATH
fi
echo "*** MIXTOOLSDIR selected is $MIXTOOLSDIR."
# INSTALLDEPS
if [ -z $INSTALLDEPS ]; then
INSTALLDEPS=debian
fi
echo "*** INSTALLDEPS selected is $INSTALLDEPS."
# GITBRANCH
if [ -z $GITBRANCH ]; then
GITBRANCH=main
fi
echo "*** GITBRANCH selected is $GITBRANCH."
# DESTDIR
if [ -z $DESTDIR ]; then
DESTDIR=/usr/local
fi
echo "*** DESTDIR selected is $DESTDIR."
## VARS
RESDIR=$MIXTOOLSDIR/resources
DEVDIR=$MIXTOOLSDIR/upstream
GITURL=https://github.com
GITREPO=flatpak
GITTREE=flatpak
PKGDIR=$GITTREE\_$GITBRANCH
MULTILIBDIR=`gcc -dumpmachine`
## DEPS
# Provide INSTALLDEPS=debian to install dependencies.
if [ $INSTALLDEPS = debian ]; then
sudo apt-get -y install build-essential coreutils libc-bin git make \
attr bison dh-exec docbook docbook-to-man gir1.2-appstreamglib-1.0 \
gir1.2-freedesktop gir1.2-gcab-1.0 gir1.2-gdkpixbuf-2.0 gir1.2-malcontent-0 \
gir1.2-polkit-1.0 gir1.2-soup-2.4 gtk-doc-tools libappstream-glib-dev \
libassuan-dev libattr1-dev libdconf-dev libgcab-1.0-0 libgcab-dev \
libgdk-pixbuf-2.0-dev libgirepository1.0-dev libglib2.0-doc libgpg-error-dev \
libgpgme-dev libmalcontent-0-dev libosp5 libostree-doc libpolkit-agent-1-dev \
libpolkit-gobject-1-dev libpsl-dev libseccomp-dev libsoup-gnome2.4-1 \
libsoup2.4-dev libsqlite3-dev libyaml-dev libzstd-dev opensp ostree \
python3-lxml socat libcap-dev
fi
## PREP
set -e
mkdir -p $DEVDIR
cd $DEVDIR
## GIT
[ -d $PKGDIR ] || git clone --recursive --depth=1 $GITURL/$GITREPO/$GITTREE.git --branch=$GITBRANCH $PKGDIR
cd $PKGDIR
sudo rm -Rf tmpbuild
git clean -dfx
git reset --hard
git pull
git submodule update --init --recursive --depth=1
## CONFIGURE
meson tmpbuild --prefix=$DESTDIR --libdir=$DESTDIR/lib/$MULTILIBDIR --buildtype=release
## BUILD
ninja -C tmpbuild
## INSTALL
sudo ninja -C tmpbuild install
sudo ldconfig
## EXIT
exit
## ENJOY