Zrythm installer
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

121 lines
6.9 KiB

#!/usr/bin/make -f
#
# Copyright (C) 2020-2021 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/>.
%:
dh $@
override_dh_auto_configure:
mkdir -p debian/build
pwd
cd debian/build && \
PATH=$$PATH:/home/build/.local/bin \
@MESON_BIN@ --prefix=/usr ../.. \
-Dpkg_config_path=@LIBRARY_PKG_CONFIG_PATH@:@CARLA_PKG_CONFIG_PATH@ \
-Dtests=true -Ddseg_font=false -Dmanpage=true \
-Dbuildtype=debugoptimized -Dlsp_dsp=enabled \
-Dstatic_lsp_dsp=true -Dsdl=enabled \
-Dfallback_version=@ZRYTHM_PKG_SEMVER_VERSION@ \
-Dforce_fallback_for=libadwaita,libpanel,gtk4 \
-Drtaudio=auto -Drtmidi=auto -Dguile=enabled \
-Dcarla=enabled -Dgraphviz=enabled \
-Dtrial_ver=@TRIAL_TRUE_FALSE@ \
-Dextra_debug_info=true \
-Dcheck_updates=true \
-Dinstaller_ver=true \
-Dcarla_use_cv32_patchbay_variant=true \
-Dcarla_binaries_dir=@CARLA_FULL_BINS_PATH@
override_dh_auto_build:
cd debian/build && ninja -v
override_dh_auto_test:
echo test # cd debian/build && ninja test
override_dh_auto_install:
cd debian/build && \
PATH=$$PATH:/home/build/.local/bin \
@MESON_BIN@ install --skip-subprojects=libaudec,reproc,rtmidi,rtaudio,libcyaml,libpanel \
--destdir="${CURDIR}/debian/zrythm@DASH_TRIAL@"
rm -rf "${CURDIR}/debian/zrythm@DASH_TRIAL@/usr/include"
rm -rf "${CURDIR}/debian/zrythm@DASH_TRIAL@/usr/lib/libbacktrace"*
rm -rf "${CURDIR}/debian/zrythm@DASH_TRIAL@/usr/lib/libcm_reproc.a"
mkdir -p ${CURDIR}/debian/zrythm@DASH_TRIAL@/usr/lib/lv2
mkdir -p ${CURDIR}/debian/zrythm@DASH_TRIAL@/usr/lib/zrythm/carla
for file in carla-discovery-native carla-bridge-lv2-gtk2 carla-bridge-lv2-gtk3 carla-bridge-lv2-qt5 carla-bridge-lv2-x11 carla-bridge-native libcarla_host-plugin.so; do \
cp -Lv "@CARLA_FULL_BINS_PATH@/$$file" \
${CURDIR}/debian/zrythm@DASH_TRIAL@/usr/lib/$(DEB_HOST_MULTIARCH)/zrythm/carla/ ; \
done
for f in `ls @BUILT_ZPLUGINS_DIR@/lib/lv2`; do \
cp -RLv @BUILT_ZPLUGINS_DIR@/lib/lv2/$$f "${CURDIR}/debian/zrythm@DASH_TRIAL@/usr/lib/lv2/Zrythm-$$f"; \
done
if [ ! -f ${CURDIR}/debian/zrythm@DASH_TRIAL@/usr/lib/$(DEB_HOST_MULTIARCH)/zrythm/carla/libcarla_host-plugin.so ] ; then exit 1 ; fi
# copy all subproject libs
for f in `ls ${CURDIR}/debian/zrythm@DASH_TRIAL@/usr/lib/$(DEB_HOST_MULTIARCH)/*.so*`; do \
if [[ "$$f" != *"libzrythm.so"* ]]; then \
mv "$$f" ${CURDIR}/debian/zrythm@DASH_TRIAL@/usr/lib/$(DEB_HOST_MULTIARCH)/zrythm/ ; \
fi ; \
done
# copy all other libs
#cp -r /usr/lib/x86_64-linux-gnu/gtk-4.0 ${CURDIR}/debian/zrythm@DASH_TRIAL@/usr/lib/zrythm/
cp -r /usr/lib/$(DEB_HOST_MULTIARCH)/gdk-pixbuf-2.0 ${CURDIR}/debian/zrythm@DASH_TRIAL@/usr/lib/$(DEB_HOST_MULTIARCH)/zrythm/
for libname in gtk epoxy graphene gdk freetype pango harfbuzz cairo pixman fontconfig fribidi json-glib gio gmodule gobject gthread glib; do \
cp "/usr/lib/$(DEB_HOST_MULTIARCH)/lib$${libname}"*.so* ${CURDIR}/debian/zrythm@DASH_TRIAL@/usr/lib/$(DEB_HOST_MULTIARCH)/zrythm/ ; \
done
for libname in rsvg png; do \
if `ls "/usr/lib/$(DEB_HOST_MULTIARCH)/lib$${libname}"*.so*`; then \
cp "/usr/lib/$(DEB_HOST_MULTIARCH)/lib$${libname}"*.so* ${CURDIR}/debian/zrythm@DASH_TRIAL@/usr/lib/$(DEB_HOST_MULTIARCH)/zrythm/ ; \
fi ; \
done
sed -i 's|/usr/lib/$(DEB_HOST_MULTIARCH)/gdk-pixbuf-2.0/2.10.0/loaders|/usr/lib/$(DEB_HOST_MULTIARCH)/zrythm/gdk-pixbuf-2.0/2.10.0/loaders|g' ${CURDIR}/debian/zrythm@DASH_TRIAL@/usr/lib/$(DEB_HOST_MULTIARCH)/zrythm/gdk-pixbuf-2.0/2.10.0/loaders.cache
cat ${CURDIR}/debian/zrythm@DASH_TRIAL@/usr/lib/$(DEB_HOST_MULTIARCH)/zrythm/gdk-pixbuf-2.0/2.10.0/loaders.cache
patchelf --set-rpath /usr/lib/$(DEB_HOST_MULTIARCH)/zrythm/carla:/usr/lib/$(DEB_HOST_MULTIARCH)/zrythm ${CURDIR}/debian/zrythm@DASH_TRIAL@/usr/bin/zrythm
patchelf --set-rpath /usr/lib/$(DEB_HOST_MULTIARCH)/zrythm ${CURDIR}/debian/zrythm@DASH_TRIAL@/usr/lib/$(DEB_HOST_MULTIARCH)/zrythm/libadwaita-1.so.0
patchelf --replace-needed /usr/lib/zrythm/carla/libcarla_host-plugin.so libcarla_host-plugin.so ${CURDIR}/debian/zrythm@DASH_TRIAL@/usr/bin/zrythm
if [ -d "${CURDIR}/debian/zrythm@DASH_TRIAL@/usr/share/gtksourceview-5" ]; then \
mv "${CURDIR}/debian/zrythm@DASH_TRIAL@/usr/share/gtksourceview-5" "${CURDIR}/debian/zrythm@DASH_TRIAL@/usr/share/zrythm/gtksourceview-5" ; \
fi
# remove unused things
rm -rf "${CURDIR}/debian/zrythm@DASH_TRIAL@"/usr/include
rm -rf "${CURDIR}/debian/zrythm@DASH_TRIAL@"/usr/bin/cairo*
rm -rf "${CURDIR}/debian/zrythm@DASH_TRIAL@"/usr/bin/gtk*
rm -rf "${CURDIR}/debian/zrythm@DASH_TRIAL@"/usr/bin/pango*
rm -rf "${CURDIR}/debian/zrythm@DASH_TRIAL@"/usr/bin/wayland*
rm -rf "${CURDIR}/debian/zrythm@DASH_TRIAL@/usr/lib/$(DEB_HOST_MULTIARCH)/gtk-4.0"
rm -rf "${CURDIR}/debian/zrythm@DASH_TRIAL@/usr/lib/$(DEB_HOST_MULTIARCH)/gtksourceview"*
rm -rf "${CURDIR}/debian/zrythm@DASH_TRIAL@/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig"
rm -rf "${CURDIR}/debian/zrythm@DASH_TRIAL@/usr/share/aclocal"
rm -rf "${CURDIR}/debian/zrythm@DASH_TRIAL@/usr/share/doc"
rm -rf "${CURDIR}/debian/zrythm@DASH_TRIAL@/usr/share/gettext"
rm -rf "${CURDIR}/debian/zrythm@DASH_TRIAL@/usr/share/gtk-4.0"
rm -rf "${CURDIR}/debian/zrythm@DASH_TRIAL@/usr/share/man/man1/"pango*
rm -rf "${CURDIR}/debian/zrythm@DASH_TRIAL@/usr/share/"locale/*/LC_MESSAGES/gtk*
rm -rf "${CURDIR}/debian/zrythm@DASH_TRIAL@/usr/share/"locale/*/LC_MESSAGES/libadwaita*
rm -rf "${CURDIR}/debian/zrythm@DASH_TRIAL@/usr/share/"locale/*/LC_MESSAGES/gtksourceview*
cp /usr/share/glib-2.0/schemas/org.gtk.gtk4.Settings.ColorChooser.gschema.xml "${CURDIR}/debian/zrythm@DASH_TRIAL@/usr/share/"glib-2.0/schemas/org.zrythm.gtk4.Settings.ColorChooser.gschema.xml || true
cp /usr/share/glib-2.0/schemas/org.gtk.gtk4.Settings.FileChooser.gschema.xml "${CURDIR}/debian/zrythm@DASH_TRIAL@/usr/share/"glib-2.0/schemas/org.zrythm.gtk4.Settings.FileChooser.gschema.xml || true
cp /usr/share/glib-2.0/schemas/org.gtk.gtk4.Settings.EmojiChooser.gschema.xml "${CURDIR}/debian/zrythm@DASH_TRIAL@/usr/share/"glib-2.0/schemas/org.zrythm.gtk4.Settings.EmojiChooser.gschema.xml || true
rm -rf "${CURDIR}/debian/zrythm@DASH_TRIAL@/usr/share/"glib-2.0/schemas/org.gtk.gtk4*
rm -rf "${CURDIR}/debian/zrythm@DASH_TRIAL@/usr/share/vala"
rm -rf "${CURDIR}/debian/zrythm@DASH_TRIAL@/usr/share/icons/hicolor/scalable/actions"
override_dh_shlibdeps:
dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info
override_dh_strip:
echo "hello"