mirror of
https://github.com/cookiengineer/audacity
synced 2025-11-21 16:37:12 +01:00
Add a Dockerfile and PKGBUILD for Arch Linux
This commit is contained in:
committed by
Dmitry Vedenko
parent
cf328b9d87
commit
58f2b2f99e
21
linux/packages/arch/Dockerfile
Normal file
21
linux/packages/arch/Dockerfile
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
FROM archlinux:base-devel
|
||||||
|
|
||||||
|
LABEL maintainer="d.vedenko@audacityteam.org"
|
||||||
|
LABEL description="A build environment to check the builds for Arch package maintainers"
|
||||||
|
LABEL version="3.0"
|
||||||
|
|
||||||
|
RUN pacman -Syu --noconfirm
|
||||||
|
|
||||||
|
COPY ["dependencies.sh", "/dependencies.sh"]
|
||||||
|
RUN ./dependencies.sh
|
||||||
|
|
||||||
|
COPY ["entrypoint.sh", "/entrypoint.sh"]
|
||||||
|
|
||||||
|
RUN useradd -m user
|
||||||
|
#RUN echo "user ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/user
|
||||||
|
USER user
|
||||||
|
WORKDIR /home/user
|
||||||
|
|
||||||
|
COPY ["PKGBUILD", "/home/user/PKGBUILD"]
|
||||||
|
|
||||||
|
ENTRYPOINT ["bash", "-ex", "/entrypoint.sh"]
|
||||||
97
linux/packages/arch/PKGBUILD
Normal file
97
linux/packages/arch/PKGBUILD
Normal file
@@ -0,0 +1,97 @@
|
|||||||
|
pkgname=audacity-test
|
||||||
|
pkgver=3.0.3
|
||||||
|
pkgrel=1
|
||||||
|
pkgdesc="Audacity is an easy-to-use, multi-track audio editor and recorder"
|
||||||
|
groups=(audio)
|
||||||
|
url="https://audacityteam.org"
|
||||||
|
license=(GPL)
|
||||||
|
|
||||||
|
arch=(x86_64)
|
||||||
|
|
||||||
|
depends=(zlib
|
||||||
|
alsa-lib
|
||||||
|
gtk2
|
||||||
|
expat
|
||||||
|
libid3tag
|
||||||
|
libogg
|
||||||
|
libvorbis
|
||||||
|
flac
|
||||||
|
lame
|
||||||
|
twolame
|
||||||
|
libmad
|
||||||
|
libsndfile
|
||||||
|
jack
|
||||||
|
lilv
|
||||||
|
lv2
|
||||||
|
portsmf
|
||||||
|
portmidi
|
||||||
|
suil
|
||||||
|
vamp-plugin-sdk
|
||||||
|
libsoxr
|
||||||
|
soundtouch
|
||||||
|
libpng
|
||||||
|
libjpeg-turbo
|
||||||
|
libsm
|
||||||
|
)
|
||||||
|
|
||||||
|
makedepends=(
|
||||||
|
git
|
||||||
|
cmake
|
||||||
|
python-pip
|
||||||
|
ffmpeg
|
||||||
|
)
|
||||||
|
|
||||||
|
optdepends=('ffmpeg: additional import/export capabilities')
|
||||||
|
|
||||||
|
provides=(audacity audacity-test)
|
||||||
|
conflicts=(audacity audacity-test)
|
||||||
|
|
||||||
|
source=(
|
||||||
|
"audacity-sources.tar.gz"
|
||||||
|
"audacity-offline-dependencies-arch-linux.tar.gz"
|
||||||
|
)
|
||||||
|
|
||||||
|
md5sums=(
|
||||||
|
'SKIP'
|
||||||
|
'SKIP'
|
||||||
|
)
|
||||||
|
|
||||||
|
build() {
|
||||||
|
depsDir=$(readlink -f ./audacity-offline-dependencies)
|
||||||
|
python3 -m venv conan_env
|
||||||
|
|
||||||
|
source conan_env/bin/activate
|
||||||
|
pip3 install --no-index --find-links "$depsDir/pip_cache" conan
|
||||||
|
|
||||||
|
export CONAN_USER_HOME="$depsDir/conan_home"
|
||||||
|
mkdir -p $CONAN_USER_HOME
|
||||||
|
|
||||||
|
conan config home
|
||||||
|
conan config init
|
||||||
|
conan config set storage.download_cache="$CONAN_USER_HOME/download_cache"
|
||||||
|
|
||||||
|
cmake_args=(
|
||||||
|
-D CMAKE_BUILD_TYPE=Release
|
||||||
|
-D CMAKE_INSTALL_PREFIX=/usr
|
||||||
|
|
||||||
|
-D audacity_conan_allow_prebuilt_binaries=no
|
||||||
|
|
||||||
|
-D audacity_lib_preference=system # Change the libs default to 'system'
|
||||||
|
-D audacity_obey_system_dependencies=On # And force it!
|
||||||
|
|
||||||
|
-D audacity_use_pch=no
|
||||||
|
|
||||||
|
-D audacity_use_wxwidgets=local # wxWidgets 3.1 is not available
|
||||||
|
-D audacity_use_portaudio=local # System portaudio is not yet usable
|
||||||
|
|
||||||
|
-D audacity_use_sbsms=local # sbsms is only available in AUR
|
||||||
|
)
|
||||||
|
|
||||||
|
cmake -S audacity -B build "${cmake_args[@]}"
|
||||||
|
cmake --build build -- -j`nproc`
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
cd build
|
||||||
|
make DESTDIR="$pkgdir/" install
|
||||||
|
}
|
||||||
42
linux/packages/arch/dependencies.sh
Executable file
42
linux/packages/arch/dependencies.sh
Executable file
@@ -0,0 +1,42 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
build_deps=(
|
||||||
|
gcc
|
||||||
|
git
|
||||||
|
cmake
|
||||||
|
python-pip
|
||||||
|
)
|
||||||
|
|
||||||
|
deps=(
|
||||||
|
zlib
|
||||||
|
alsa-lib
|
||||||
|
gtk2
|
||||||
|
expat
|
||||||
|
libid3tag
|
||||||
|
libogg
|
||||||
|
libvorbis
|
||||||
|
flac
|
||||||
|
lame
|
||||||
|
twolame
|
||||||
|
libmad
|
||||||
|
libsndfile
|
||||||
|
jack
|
||||||
|
lilv
|
||||||
|
lv2
|
||||||
|
portsmf
|
||||||
|
portmidi
|
||||||
|
suil
|
||||||
|
vamp-plugin-sdk
|
||||||
|
libsoxr
|
||||||
|
soundtouch
|
||||||
|
# sbsms is not available on arch
|
||||||
|
# sbsms
|
||||||
|
libpng
|
||||||
|
libjpeg-turbo
|
||||||
|
libsm
|
||||||
|
ffmpeg
|
||||||
|
)
|
||||||
|
|
||||||
|
pacman -S --noconfirm \
|
||||||
|
"${build_deps[@]}" \
|
||||||
|
"${deps[@]}"
|
||||||
38
linux/packages/arch/entrypoint.sh
Normal file
38
linux/packages/arch/entrypoint.sh
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -euxo pipefail
|
||||||
|
|
||||||
|
cmake_args=(
|
||||||
|
-D CMAKE_BUILD_TYPE=Release
|
||||||
|
|
||||||
|
-D audacity_conan_allow_prebuilt_binaries=no
|
||||||
|
|
||||||
|
-D audacity_lib_preference=system # Change the libs default to 'system'
|
||||||
|
-D audacity_obey_system_dependencies=On # And force it!
|
||||||
|
|
||||||
|
-D audacity_use_pch=no
|
||||||
|
|
||||||
|
-D audacity_use_wxwidgets=local # wxWidgets 3.1 is not available
|
||||||
|
-D audacity_use_portaudio=local # System portaudio is not yet usable
|
||||||
|
|
||||||
|
-D audacity_use_sbsms=local # sbsms is only available in AUR
|
||||||
|
)
|
||||||
|
|
||||||
|
if [[ $1 == "prepare" ]]; then
|
||||||
|
tar -xzf /work_dir/audacity-sources.tar.gz
|
||||||
|
|
||||||
|
audacity/linux/packages/prepare_offline_dependencies.sh "${cmake_args[@]}"
|
||||||
|
|
||||||
|
cp audacity-offline-dependencies.tar.gz /work_dir/audacity-offline-dependencies-arch-linux.tar.gz
|
||||||
|
elif [[ $1 == "build" ]]; then
|
||||||
|
tar -xzf /work_dir/audacity-sources.tar.gz
|
||||||
|
tar -xzf /work_dir/audacity-offline-dependencies-arch-linux.tar.gz
|
||||||
|
|
||||||
|
audacity/linux/packages/build_package.sh "${cmake_args[@]}"
|
||||||
|
|
||||||
|
cp audacity-linux_x86_64.tar.gz /work_dir/audacity-arch-linux_x86_64.tar.gz
|
||||||
|
elif [[ $1 == "package" ]]; then
|
||||||
|
cp /work_dir/*.tar.gz ./
|
||||||
|
makepkg
|
||||||
|
cp *.zst /work_dir
|
||||||
|
fi
|
||||||
Reference in New Issue
Block a user