Skip to content

Commit 72dba58

Browse files
authored
Create help.install_from_source
1 parent f586357 commit 72dba58

1 file changed

Lines changed: 48 additions & 0 deletions

File tree

help.install_from_source

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
Examples for compiling software in the get-dependencies.sh script.
2+
3+
----------------
4+
Compiling using Meson
5+
----------------
6+
7+
echo "Installing from source..."
8+
echo "---------------------------------------------------------------"
9+
git clone https://gitlab.com/guillermop/master-key.git source && (
10+
cd ./source
11+
#Setiing Application Version for sharun.
12+
TAG=$(git tag --sort=-v:refname | grep -vi 'rc\|alpha' | head -1)
13+
git checkout "$TAG"
14+
echo "$TAG" > ~/version
15+
# Building
16+
meson setup build --prefix=/usr
17+
meson compile -C build
18+
meson install -C build
19+
)
20+
21+
-----------------------------------------
22+
Downloading swift compiler then compiling
23+
-----------------------------------------
24+
25+
SWIFT_VERSION="6.2"
26+
if [ "$ARCH" = "aarch64" ]; then
27+
URL="https://download.swift.org/swift-${SWIFT_VERSION}-release/ubuntu2204-aarch64/swift-${SWIFT_VERSION}-RELEASE/swift-${SWIFT_VERSION}-RELEASE-ubuntu22.04-aarch64.tar.gz"
28+
else
29+
URL="https://download.swift.org/swift-${SWIFT_VERSION}-release/ubuntu2204/swift-${SWIFT_VERSION}-RELEASE/swift-${SWIFT_VERSION}-RELEASE-ubuntu22.04.tar.gz"
30+
fi
31+
if [ ! -d "/opt/swift" ]; then
32+
curl -L "$URL" -o swift.tar.gz
33+
sudo mkdir -p /opt/swift
34+
sudo tar -xzf swift.tar.gz -C /opt/swift --strip-components=1
35+
fi
36+
export PATH="/opt/swift/usr/bin:$PATH"
37+
38+
echo "Installing swiftynotes from source packages..."
39+
echo "---------------------------------------------------------------"
40+
git clone https://github.com/makoni/swifty-notes-gtk.git source
41+
cd source
42+
mkdir -p Sources/CSpelling/include
43+
cp /usr/include/libspelling-1/libspelling.h Sources/CSpelling/include/
44+
export SWIFT_FLAGS="-Xcc -I$(pwd)/Sources/CSpelling/include"
45+
chmod +x packaging/release/assemble-install-root.sh
46+
./packaging/release/assemble-install-root.sh --prefix /usr --dest build-root
47+
sudo cp -rv build-root/usr/* /usr/
48+
cd ..

0 commit comments

Comments
 (0)