Browse Source

fix debian build

before_cleanup
Alexandros Theodotou 3 years ago
parent
commit
ad07a5ddd1
Signed by: alex
GPG Key ID: 022EAE42313D70F3
  1. 24
      debian/meson.build
  2. 9
      debian/rules.in
  3. 18
      meson.build
  4. 14
      scripts/make_carla.sh.in
  5. 35
      scripts/make_debian_pkg.sh.in
  6. 2
      scripts/make_lsp_dsp_lib.sh.in
  7. 4
      scripts/meson.build
  8. 22
      sources/meson.build

24
debian/meson.build vendored

@ -15,22 +15,26 @@ @@ -15,22 +15,26 @@
# You should have received a copy of the GNU Affero General Public License
# along with Zrythm. If not, see <https://www.gnu.org/licenses/>.
debian_conf = configuration_data ()
debian_conf.merge_from (global_conf)
debian_conf.set ('BUILT_ZPLUGINS_DIR', zplugins_installation.full_path ())
debian_changelog = configure_file (
output: 'changelog.in',
input: 'changelog',
configuration: global_conf,
output: 'changelog',
input: 'changelog.in',
configuration: debian_conf,
)
debian_control = configure_file (
output: 'control.in',
input: 'control',
configuration: global_conf,
output: 'control',
input: 'control.in',
configuration: debian_conf,
)
debian_rules = configure_file (
output: 'rules.in',
input: 'rules',
configuration: global_conf,
output: 'rules',
input: 'rules.in',
configuration: debian_conf,
)
debian_pkg_filename = run_command (
@ -39,12 +43,14 @@ debian_pkg = custom_target ( @@ -39,12 +43,14 @@ debian_pkg = custom_target (
'debian-pkg',
output: debian_pkg_filename,
input: [
debian_zrythm_src_tarball_gzipped,
debian_changelog, debian_rules,
'compat', debian_control, 'copyright',
],
command: [
make_debian_pkg, '@OUTPUT@', '@INPUT0@', '@INPUT1@',
'@INPUT2@', '@INPUT3@', '@INPUT4@',
'@INPUT5@', debian_pkg_filename,
],
depends: [
debian_zrythm_src_tarball_gzipped,

9
debian/rules.in vendored

@ -5,6 +5,7 @@ @@ -5,6 +5,7 @@
override_dh_auto_configure:
mkdir -p debian/build
pwd
cd debian/build && \
PATH=$$PATH:/home/build/.local/bin \
@MESON_BIN@ --prefix=/usr ../.. \
@ -26,7 +27,9 @@ override_dh_auto_test: @@ -26,7 +27,9 @@ override_dh_auto_test:
override_dh_auto_install:
cd debian/build && \
DESTDIR=${CURDIR}/debian/zrythm@DASH_TRIAL@ ninja install
mkdir -p ${CURDIR}/debian/zrythm@DASH_TRIAL@/usr/lib/zrythm/lib
cp -RLv @TEMP_CARLA_PREFIX@/lib/carla \
mkdir -p ${CURDIR}/debian/zrythm@DASH_TRIAL@/usr/lib/zrythm/lib/lv2
cp -RLv @TEMP_CARLA_PREFIX@/@LIBDIR@/carla \
${CURDIR}/debian/zrythm@DASH_TRIAL@/usr/lib/zrythm/lib/
if [ ! -f ${CURDIR}/debian/zrythm@DASH_TRIAL@/usr/lib/zrythm/lib/carla/libcarla_native-plugin.so ] ; then exit -1 ; fi
cp -RLv @BUILT_ZPLUGINS_DIR@ \
${CURDIR}/debian/zrythm@DASH_TRIAL@/usr/lib/zrythm/lib/lv2
if [ ! -f ${CURDIR}/debian/zrythm@DASH_TRIAL@/usr/lib/zrythm/lib/carla/libcarla_native-plugin.so ] ; then exit 1 ; fi

18
meson.build

@ -16,7 +16,7 @@ @@ -16,7 +16,7 @@
# along with Zrythm. If not, see <https://www.gnu.org/licenses/>.
project (
'zrythm-installer',
'zrythm-installer', [ 'c' ],
version: '0.1',
meson_version: '>=0.55.0',
license: 'AGPL-3-or-later',
@ -36,14 +36,15 @@ zplugins_ver = get_option ('zplugins-ver') @@ -36,14 +36,15 @@ zplugins_ver = get_option ('zplugins-ver')
carla_git_ver = get_option ('carla-git-ver')
lsp_dsp_lib_ver = get_option ('lsp-dsp-lib-ver')
build_trial = get_option ('build-trial')
zrythm_src_tarball_filename = 'zrythm-' + zrythm_pkg_ver + '.tar.gz'
zrythm_inner_dir_name = 'zrythm-' + zrythm_pkg_ver
zrythm_src_tarball_filename = zrythm_inner_dir_name + '.tar.gz'
zplugins_src_tarball_filename = 'zplugins-' + zplugins_ver + '.tar.gz'
mingw_prefix = 'mingw-w64-x86_64-'
mingw_zrythm_pkg_filename = mingw_prefix + 'zrythm-' + zrythm_pkg_ver + '-1-any.pkg.tar.zst'
mingw_zrythm_trial_pkg_filename = mingw_prefix + 'zrythm-trial-' + zrythm_pkg_ver + '-1-any.pkg.tar.zst'
debian_src_tarball_filename = 'zrythm_' + zrythm_pkg_ver + '.orig.tar.gz'
temp_carla_prefix = meson.build_root () / 'tmp_carla_prefix'
temp_carla_pkgconfig_path = meson.build_root () / 'tmp_carla_prefix'
temp_carla_pkgconfig_path = temp_carla_prefix / libdir / 'pkgconfig'
temp_zplugins_prefix = meson.build_root () / 'tmp_zplugins_prefix'
temp_zplugins_suffix = 'lib/lv2'
temp_zplugins_dir = temp_zplugins_prefix / temp_zplugins_suffix
@ -60,10 +61,17 @@ global_conf.set ( @@ -60,10 +61,17 @@ global_conf.set (
'MESON_SOURCE_ROOT', meson.source_root ())
global_conf.set (
'CC', cc.get_id ())
global_conf.set (
'LIBDIR', libdir)
global_conf.set (
'ZRYTHM_GIT_VERSION', zrythm_git_ver)
global_conf.set (
'ZRYTHM_PKG_VERSION', zrythm_pkg_ver)
global_conf.set (
'ZRYTHM_SOURCE_TARBALL_FILENAME',
zrythm_src_tarball_filename)
global_conf.set (
'ZRYTHM_INNER_DIR_NAME', zrythm_inner_dir_name)
global_conf.set (
'ZPLUGINS_VER', zplugins_ver)
global_conf.set (
@ -107,8 +115,8 @@ carla_installation = custom_target ( @@ -107,8 +115,8 @@ carla_installation = custom_target (
output: 'carla-native-plugin.pc',
input: carla_src_zip,
command: [
make_carla, 'sudo', '@INPUT@', carla_git_ver, '&&',
'cp', temp_lib_zrythm_dir + '/lib/pkgconfig/carla-native-plugin.pc', '@OUTPUT@',
make_carla, '@INPUT@', carla_git_ver, '&&',
'cp', temp_carla_pkgconfig_path / 'carla-native-plugin.pc', '@OUTPUT@',
],
install: false,
)

14
scripts/make_carla.sh.in

@ -1,16 +1,12 @@ @@ -1,16 +1,12 @@
#!@BASH@
# prefix to install in
prefix="$1"
# sudo or empty
sudo_or_empty="$2"
set -x
# full path to carla source zip
carla_source_zip="$3"
carla_source_zip="$1"
# carla git version
carla_git_ver="$4"
prefix="@TEMP_CARLA_PREFIX@"
carla_git_ver="@CARLA_GIT_VER@"
export CC=@CC@
@ -21,4 +17,4 @@ fi @@ -21,4 +17,4 @@ fi
tempdir=`mktemp -d`
unzip -o "$carla_source_zip" -d "$tempdir"
cd "$tempdir/Carla-$carla_git_ver"
make -j4 && $sudo_or_empty make install PREFIX="$prefix"
make -j4 && make install PREFIX="$prefix" LIBDIR=$prefix/@LIBDIR@

35
scripts/make_debian_pkg.sh.in

@ -1,27 +1,42 @@ @@ -1,27 +1,42 @@
#!@BASH@
set -xe
out_pkg="$1"
deb_changelog=$2
deb_rules=$3
deb_compat=$4
deb_control=$5
deb_copyright=$6
deb_source_tarball=$2
deb_changelog=$3
deb_rules=$4
deb_compat=$5
deb_control=$6
deb_copyright=$7
inner_dir="@ZRYTHM_INNER_DIR_NAME@"
tempdir=`mktemp -d`
deb_dir="$tempdir/debian"
deb_parent_dir=$tempdir/$inner_dir
deb_dir="$deb_parent_dir/debian"
deb_src_dir="$deb_dir/source"
mkdir -p $deb_parent_dir
mkdir -p $deb_src_dir
# prepare
cp $deb_source_tarball $tempdir/
cp $deb_changelog $deb_dir/changelog
cp $deb_compat $deb_dir/compat
cp $deb_control $deb_dir/control
cp $deb_copyright $deb_dir/copyright
cp $deb_rules $deb_dir/rules
echo "3.0 (quilt)" > $deb_src_dir/format
echo "3.0 (native)" > $deb_src_dir/format
# add tarball contents
tar -xzf $deb_source_tarball -C $tempdir
pushd $deb_parent_dir
debuild -us -uc
popd
cd $tempdir
debuild -us -uc
mv $tempdir/*.deb "$out_pkg"
rm -rf $tempdir
#rm -rf $tempdir

2
scripts/make_lsp_dsp_lib.sh.in

@ -11,6 +11,6 @@ tempdir=`mktemp -d` @@ -11,6 +11,6 @@ tempdir=`mktemp -d`
tar xf $tarball -C $tempdir
ls -l "$tempdir"
cd "$tempdir/lsp-dsp-lib"
make config PREFIX=$temp_lib_prefix
make config PREFIX=$temp_lib_prefix LIBDIR=$temp_lib_prefix/@LIBDIR@
make -j4 && make install
rm -rf $tempdir

4
scripts/meson.build

@ -15,10 +15,6 @@ @@ -15,10 +15,6 @@
# You should have received a copy of the GNU Affero General Public License
# along with Zrythm. If not, see <https://www.gnu.org/licenses/>.
_scripts_conf = {
'SCRIPTS_DIR': meson.current_build_dir (),
'BASH': bash.full_path (),
}
scripts_conf = configuration_data ()
scripts_conf.merge_from (global_conf)
scripts_conf.set ('SCRIPTS_DIR', meson.current_build_dir ())

22
sources/meson.build

@ -15,12 +15,26 @@ @@ -15,12 +15,26 @@
# You should have received a copy of the GNU Affero General Public License
# along with Zrythm. If not, see <https://www.gnu.org/licenses/>.
url = 'https://git.zrythm.org/cgit/zrythm/snapshot/zrythm-' + zrythm_git_ver + '.tar.gz'
orig_inner_dir_name = 'zrythm-' + zrythm_git_ver
orig_zrythm_src_tarball_filename = orig_inner_dir_name + '.tar.gz'
url = 'https://git.zrythm.org/cgit/zrythm/snapshot/' + orig_zrythm_src_tarball_filename
orig_zrythm_src_tarball = custom_target (
'orig-zrythm-source-tarball',
output: orig_zrythm_src_tarball_filename,
command: [
'wget', url, '-O', '@OUTPUT@',
],
install: false,
)
zrythm_src_tarball = custom_target (
'zrythm-source-tarball',
output: zrythm_src_tarball_filename,
input: orig_zrythm_src_tarball,
command: [
'wget', url, '-O', '@OUTPUT@',
'tar', 'xf', '@INPUT@', '&&',
'mv', orig_inner_dir_name, zrythm_inner_dir_name, '&&',
'tar', 'czf', '@OUTPUT@', zrythm_inner_dir_name,
],
install: false,
)
@ -33,8 +47,8 @@ debian_zrythm_src_tarball = custom_target ( @@ -33,8 +47,8 @@ debian_zrythm_src_tarball = custom_target (
'rm', '-rf', '@OUTPUT@', '&&',
# rezip because gzip says not valid gzip format
'tar', 'xf', '@INPUT@', '&&',
'tar', 'cf', '@OUTPUT@', 'zrythm-' + zrythm_git_ver, '&&',
'rm', '-rf', 'zrythm-' + zrythm_pkg_ver,
'tar', 'cf', '@OUTPUT@', zrythm_inner_dir_name, '&&',
'rm', '-rf', zrythm_inner_dir_name,
],
install: false,
)

Loading…
Cancel
Save