Skip to content

Commit 397555b

Browse files
authored
build on archlinux. make separate script for dependencies (#17)
1 parent 62fc8a3 commit 397555b

File tree

3 files changed

+101
-19
lines changed

3 files changed

+101
-19
lines changed

.github/workflows/blank2.yml

Lines changed: 12 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,26 @@
1-
name: mpv AppImage2
1+
name: mpv AppImage
22
concurrency:
33
group: build-${{ github.ref }}
44
cancel-in-progress: true
55

66
on:
77
schedule:
8-
- cron: "0 16 1/7 * *"
8+
- cron: "0 10 * * 0"
99
workflow_dispatch:
1010

1111
jobs:
1212
build:
1313
runs-on: ubuntu-24.04
14+
container: archlinux:latest
1415
steps:
1516
- uses: actions/checkout@v4
16-
17-
- name: build
17+
- name: Install dependencies
1818
run: |
19-
sudo apt update
20-
sudo apt install libxpresent-dev libpulse-dev libxcb-shm0-dev libvpx-dev \
21-
liblua5.2-dev libxkbcommon-dev libxcb-xfixes0-dev equivs libavutil-dev \
22-
libavcodec-dev libswscale-dev python3-dev cython3 g++ nasm yasm git \
23-
libavfilter-dev libxmu-dev libxcb1-dev libdbus-1-dev libx11-dev \
24-
libxinerama-dev libxrandr-dev intltool libtool libwayland-dev libarchive-dev \
25-
wayland-protocols devscripts libass-dev libx264-dev libxss-dev libdav1d-dev \
26-
libglib2.0-dev libpango1.0-dev binutils libxdg-basedir-dev libnotify-dev \
27-
libc++-dev libplacebo-dev libx265-dev ninja-build meson autotools-dev \
28-
autoconf automake make build-essential pkg-config desktop-file-utils zsync
19+
chmod +x ./get-dependencies.sh && ./get-dependencies.sh
2920
30-
chmod a+x ./mpv-AppImage.sh && ./mpv-AppImage.sh
21+
- name: Make AppImage
22+
run: |
23+
chmod +x ./mpv-appimage.sh && ./mpv-appimage.sh
3124
mkdir dist
3225
mv *.AppImage* dist/
3326
mv *.AppBundle* dist/
@@ -36,19 +29,19 @@ jobs:
3629
run: |
3730
cat ~/version
3831
echo "APP_VERSION=$(cat ~/version)" >> "${GITHUB_ENV}"
39-
32+
4033
- name: Upload artifact
4134
uses: actions/[email protected]
4235
with:
4336
name: AppImage
4437
path: 'dist'
45-
38+
4639
- name: Upload version file
4740
uses: actions/[email protected]
4841
with:
4942
name: version
5043
path: ~/version
51-
44+
5245
release:
5346
needs: [build]
5447
permissions: write-all
@@ -67,7 +60,7 @@ jobs:
6760
cat version
6861
export VERSION="$(<version)"
6962
echo "APP_VERSION=${VERSION}" >> "${GITHUB_ENV}"
70-
63+
7164
#Version Release
7265
- name: Del Previous Release
7366
run: |

get-dependencies.sh

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
#!/bin/sh
2+
3+
set -ex
4+
5+
sed -i 's/DownloadUser/#DownloadUser/g' /etc/pacman.conf
6+
7+
if [ "$(uname -m)" = 'x86_64' ]; then
8+
PKG_TYPE='x86_64.pkg.tar.zst'
9+
else
10+
PKG_TYPE='aarch64.pkg.tar.xz'
11+
fi
12+
LIBXML_URL="https://github.com/pkgforge-dev/llvm-libs-debloated/releases/download/continuous/libxml2-iculess-$PKG_TYPE"
13+
FFMPEG_URL="https://github.com/pkgforge-dev/llvm-libs-debloated/releases/download/continuous/ffmpeg-mini-$PKG_TYPE"
14+
OPUS_URL="https://github.com/pkgforge-dev/llvm-libs-debloated/releases/download/continuous/opus-nano-$PKG_TYPE"
15+
16+
echo "Installing build dependencies..."
17+
echo "---------------------------------------------------------------"
18+
pacman -Syu --noconfirm \
19+
alsa-lib \
20+
base-devel \
21+
desktop-file-utils \
22+
ffmpeg \
23+
git \
24+
glibc \
25+
hicolor-icon-theme \
26+
jack \
27+
lcms2 \
28+
libarchive \
29+
libass \
30+
libbluray \
31+
libcdio \
32+
libcdio-paranoia \
33+
libdrm \
34+
libdvdnav \
35+
libdvdread \
36+
libegl \
37+
libgl \
38+
libglvnd \
39+
libjpeg-turbo \
40+
libplacebo \
41+
libpulse \
42+
libsixel \
43+
libva \
44+
libvdpau \
45+
libx11 \
46+
libxext \
47+
libxkbcommon \
48+
libxpresent \
49+
libxrandr \
50+
libxss \
51+
libxv \
52+
luajit \
53+
mesa \
54+
meson \
55+
nasm \
56+
patchelf \
57+
libpipewire \
58+
rubberband \
59+
openal \
60+
uchardet \
61+
vulkan-headers \
62+
vulkan-icd-loader \
63+
wayland \
64+
wayland-protocols \
65+
wget \
66+
xorg-server-xvfb \
67+
zlib \
68+
zsync
69+
70+
#if [ "$(uname -m)" = 'x86_64' ]; then
71+
# pacman -Syu --noconfirm vulkan-intel haskell-gnutls gcc13 svt-av1
72+
#else
73+
# pacman -Syu --noconfirm vulkan-freedreno vulkan-panfrost
74+
#fi
75+
76+
echo "Installing debloated pckages..."
77+
echo "---------------------------------------------------------------"
78+
wget --retry-connrefused --tries=30 "$LIBXML_URL" -O ./libxml2-iculess.pkg.tar.zst
79+
wget --retry-connrefused --tries=30 "$FFMPEG_URL" -O ./ffmpeg-mini.pkg.tar.zst
80+
wget --retry-connrefused --tries=30 "$OPUS_URL" -O ./opus-nano.pkg.tar.zst
81+
pacman -U --noconfirm ./*.pkg.tar.zst
82+
rm -f ./*.pkg.tar.zst
83+
84+
# Remove vapoursynth since ffmpeg-mini doesn't link to it
85+
pacman -Rsndd --noconfirm vapoursynth
86+
87+
echo "All done!"
88+
echo "---------------------------------------------------------------"

mpv-AppImage.sh renamed to mpv-appimage.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ LIB4BN="https://raw.githubusercontent.com/VHSgunzo/sharun/refs/heads/main/lib4bi
1818
git clone "$REPO" ./mpv-build && (
1919
cd ./mpv-build
2020
printf "%s\n" "--enable-libdav1d" >> ffmpeg_options
21+
printf "%s\n" "--enable-small" >> ffmpeg_options
2122
./rebuild -j$(nproc)
2223
sudo ./install
2324
)

0 commit comments

Comments
 (0)