Browse Source

add archlinux to meson scripts

zplugins_osx
Alexandros Theodotou 2 years ago
parent
commit
a0a815efac
Signed by: alex
GPG Key ID: 022EAE42313D70F3
  1. 19
      arch/PKGBUILD.in
  2. 71
      arch/meson.build
  3. 16
      meson.build
  4. 2
      rpm/meson.build
  5. 5
      rpm/zrythm.spec.in
  6. 24
      scripts/make_arch_pkg.sh.in
  7. 29
      scripts/make_user_manual.sh.in
  8. 12
      scripts/meson.build

19
PKGBUILD.in → arch/PKGBUILD.in

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
# Maintainer: Alexandros Theodotou <alex at zrythm dot org>
pkgname=zrythm
pkgver=@VERSION@
pkgname=zrythm@DASH_TRIAL@
pkgver=@ZRYTHM_PKG_VERSION@
pkgrel=1
pkgdesc='a highly automated and intuitive digital audio workstation'
arch=('x86_64' 'i686')
@ -25,14 +25,15 @@ _rootdir="zrythm-${pkgver}" @@ -25,14 +25,15 @@ _rootdir="zrythm-${pkgver}"
# FIXME reenable tests
build() {
cd $_rootdir
PKG_CONFIG_PATH=/usr/lib/zrythm/lib/pkgconfig \
meson build --prefix=/usr -Dtests=false \
@MESON_BIN@ build --prefix=/usr -Dtests=false \
-Dpkg_config_path=@TEMP_LIBRARY_PKG_CONFIG_PATH@:@TEMP_CARLA_PKG_CONFIG_PATH@ \
-Dmanpage=true \
-Dbuildtype=debugoptimized -Dextra_debug_info=true \
-Dsdl=enabled -Drtaudio=enabled \
-Drtmidi=enabled -Dcarla=enabled -Dlsp_dsp=enabled -Dstatic_lsp_dsp=true \
-Dfallback_version=@VERSION@ \
-Dtrial_ver=false
-Drtmidi=enabled -Dcarla=enabled \
-Dlsp_dsp=enabled -Dstatic_lsp_dsp=true \
-Dfallback_version=@ZRYTHM_PKG_VERSION@ \
-Dtrial_ver=@TRIAL_TRUE_FALSE@
ninja -C build
}
@ -48,4 +49,8 @@ package() { @@ -48,4 +49,8 @@ package() {
DESTDIR="${pkgdir}/" ninja -C build install
mkdir -p "${pkgdir}/usr/lib/zrythm/lib"
cp -R /usr/lib/zrythm/lib/carla ${pkgdir}/usr/lib/zrythm/lib/
cp -RLv @TEMP_CARLA_PREFIX@/@LIBDIR@/carla \
${pkgdir}/usr/lib/zrythm/lib/
cp -RLv @BUILT_ZPLUGINS_DIR@/* \
${pkgdir}/usr/lib/zrythm/lib/lv2/
}

71
arch/meson.build

@ -0,0 +1,71 @@ @@ -0,0 +1,71 @@
# Copyright (C) 2020 Alexandros Theodotou <alex at zrythm dot org>
#
# This file is part of Zrythm
#
# Zrythm is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Zrythm is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with Zrythm. If not, see <https://www.gnu.org/licenses/>.
arch_conf = configuration_data ()
arch_conf.merge_from (global_conf)
arch_conf.set (
'BUILT_ZPLUGINS_DIR', zplugins_installation.full_path ())
pkgbuild = configure_file (
output: 'PKGBUILD',
input: 'PKGBUILD.in',
configuration: arch_conf,
)
arch_pkg_filename = run_command (
get_pkg_filename, 'ARCH', dash_trial).stdout ().strip ()
arch_pkg = custom_target (
'arch-pkg',
output: arch_pkg_filename,
input: [
pkgbuild, zrythm_src_tarball,
],
command: [
make_arch_pkg, '@OUTPUT@', '@INPUT0@', '@INPUT1@',
zrythm_src_tarball_filename, arch_pkg_filename,
],
depends: [
carla_installation,
lsp_dsp_lib_installation,
zplugins_installation,
],
install: true,
install_dir: get_option ('prefix'),
)
if not build_trial
manual_deps = []
foreach lang : locales
filename = 'Zrythm-' + zrythm_pkg_ver + '-' + lang + '.pdf'
manual_deps += custom_target (
'user-manuals-' + lang,
output: filename,
input: zrythm_src_tarball,
command: [
make_user_manual, '@OUTPUT@', '@INPUT0@',
zrythm_src_tarball_filename, lang,
],
install: true,
install_dir: get_option ('prefix') / 'manuals',
)
endforeach
endif
run_target (
'arch',
command: [ 'echo', 'done' ],
depends: [ arch_pkg, manual_deps ])

16
meson.build

@ -52,6 +52,12 @@ temp_zplugins_dir = temp_zplugins_prefix / temp_zplugins_suffix @@ -52,6 +52,12 @@ temp_zplugins_dir = temp_zplugins_prefix / temp_zplugins_suffix
temp_library_prefix = meson.build_root () / 'tmp_lib_prefix'
temp_library_pkgconfig_path = temp_library_prefix / libdir / 'pkgconfig'
dash_trial = build_trial ? '-trial' : ''
locales = get_option ('locales')
space_sep_locales = ''
foreach locale : locales
space_sep_locales += locale + ' '
endforeach
space_sep_locales.strip ()
global_conf = configuration_data ()
global_conf.set ('PREFIX', prefix)
@ -91,6 +97,8 @@ global_conf.set ( @@ -91,6 +97,8 @@ global_conf.set (
global_conf.set ('DASH_TRIAL', dash_trial)
global_conf.set (
'TRIAL_TRUE_FALSE', build_trial ? 'true' : 'false')
global_conf.set (
'SPACE_SEPARATED_LOCALES', space_sep_locales)
global_conf.set (
'MINGW_ZRYTHM_PKG_FILENAME', mingw_zrythm_pkg_filename)
global_conf.set (
@ -148,7 +156,15 @@ lsp_dsp_lib_installation = custom_target ( @@ -148,7 +156,15 @@ lsp_dsp_lib_installation = custom_target (
install: false,
)
is_arch = distro.contains ('arch')
if is_arch
subdir ('arch')
endif
is_debian = distro.contains ('debian') or distro.contains ('ubuntu')
if is_debian
subdir ('debian')
endif
is_rpm = distro.contains ('fedora')
if is_rpm
subdir ('rpm')
endif

2
rpm/meson.build

@ -22,7 +22,7 @@ rpm_conf.set ( @@ -22,7 +22,7 @@ rpm_conf.set (
specfile = configure_file (
output: 'zrythm.spec',
input: '@OUTPUT@.in',
input: 'zrythm.spec.in',
configuration: rpm_conf,
)

5
rpm/zrythm.spec.in

@ -95,7 +95,10 @@ ninja -C build @@ -95,7 +95,10 @@ ninja -C build
DESTDIR="%{buildroot}/" ninja -C build install
mkdir -p "%{buildroot}/usr/lib/zrythm/lib"
rm -rf "%{buildroot}/usr/lib64/libcm_reproc.a"
cp -R /usr/lib/zrythm/lib/carla %{buildroot}/usr/lib/zrythm/lib/
cp -RLv @TEMP_CARLA_PREFIX@/@LIBDIR@/carla \
%{buildroot}/usr/lib/zrythm/lib/
cp -RLv @BUILT_ZPLUGINS_DIR@/* \
%{buildroot}/usr/lib/zrythm/lib/lv2/
%find_lang zrythm
%files -f zrythm.lang

24
scripts/make_arch_pkg.sh.in

@ -0,0 +1,24 @@ @@ -0,0 +1,24 @@
#!@BASH@
set -e
out_pkg="$1"
pkgbuild=$2
zrythm_src_tarball="$3"
zrythm_src_tarball_filename="$4"
tempdir=`mktemp -d`
cp $pkgbuild $tempdir/
cp $zrythm_src_tarball $tempdir/
# build manuals
pushd $tempdir
makepkg -f
popd $tempdir
ls $tempdir
exit 1
#rm -rf $tempdir

29
scripts/make_user_manual.sh.in

@ -0,0 +1,29 @@ @@ -0,0 +1,29 @@
#!@BASH@
set -e
out_file="$1"
zrythm_src_tarball="$2"
zrythm_src_tarball_filename="$3"
lang="$4"
inner_dir="@ZRYTHM_INNER_DIR_NAME@"
meson_bin="@MESON_BIN@"
tempdir=`mktemp -d`
cp $zrythm_src_tarball $tempdir/
# build manuals
pushd $tempdir
tar xf $zrythm_src_tarball_filename
pushd $inner_dir
$meson_bin build
sed -i -e 's/latexpdf/latex/' doc/user/meson.build
ninja -C build latex-manual-$lang ;
make -C build/doc/user/$lang/latex ;
cp build/doc/user/$lang/*.pdf $out_file
#rm -rf $tempdir

12
scripts/meson.build

@ -39,6 +39,18 @@ make_rpm_pkg = configure_file ( @@ -39,6 +39,18 @@ make_rpm_pkg = configure_file (
configuration: scripts_conf,
)
make_arch_pkg = configure_file (
output: 'make_arch_pkg.sh',
input: 'make_arch_pkg.sh.in',
configuration: scripts_conf,
)
make_user_manual = configure_file (
output: 'make_user_manual.sh',
input: 'make_user_manual.sh.in',
configuration: scripts_conf,
)
make_carla = configure_file (
output: 'make_carla.sh',
input: 'make_carla.sh.in',

Loading…
Cancel
Save