# Maintainer: memdmp _reponame="OpenUtau" _repoowner="stakira" _repourl="https://github.com/${_repoowner}/${_reponame}" _reporef="c3ff44b01f5dcd0ef1bbdb5aa11ef1319cab3a03" # Must be a TAG OR BRANCH! Anything else may break shit. _reporefdate="20250610" # YYYYMMDD of the ref _buildtarget="Release" # or `Debug` for testing pkgname="openutau" pkgver=0.1.529 # for refs that aren't tags, use the previous release before it! pkgrel=0 pkgdesc="Open singing synthesis platform / Open source UTAU successor" url="https://www.openutau.com/" arch="x86_64" license="MIT" # so:ld-linux-x86-64.so.2 and so:libgcompat.so.0 are provided by gcompat # so:libfontconfig.so.1 is provided by fontconfig # TODO: once not in testing, add so:libonnxruntime.so provided by onnxruntime-dev depends="dotnet8-runtime so:libgcompat.so.0 so:ld-linux-x86-64.so.2 so:libfontconfig.so.1" # Docs say to use .NET 6, but thats testing repos only. # Bazel 8 and 9 remove required features for worldline for some reason. makedepends="dotnet8-sdk musl-dev zsh bazel7@testing linux-headers gcompat-libdl2" install="" subpackages="${pkgname}-worldline ${pkgname}-onnxruntime" options="net !check !strip" # network needed for dotnet restore, no check due to laziness for now, dotnet dies with strip # for when we're building off of a commit _pkgver="${pkgver}" if [[ "${pkgver}" != "${_reporef}" ]] && [[ "${pkgver}" != "v${_reporef}" ]]; then pkgver="${pkgver}_git${_reporefdate}";from_tag=false;else from_tag=true; fi source="${_reponame}-${_reporef}.tar.gz::${_repourl}/archive/${_reporef}.tar.gz build-worldline openutau.desktop openutau.svg UpdaterDialog.axaml.cs 0001-Remove-remaining-update-check-shit.patch" builddir="${srcdir}/${_reponame}-${_reporef}" _outdir="${builddir}/OpenUtau/bin/${_buildtarget}" prepare() { # Apply Patches dos2unix "${builddir}/OpenUtau/ViewModels/UpdaterViewModel.cs" default_prepare # Replace Dialog cp "${srcdir}/UpdaterDialog.axaml.cs" "${builddir}/OpenUtau/Views/UpdaterDialog.axaml.cs" # Replace version with the actual version where needed local displayed_version="$pkgver" if [[ "$from_tag" == "false" ]]; then displayed_version="${reporefdate:0:4}-${reporefdate:4:2}-${reporefdate:6:2} (${_reporef:0:7})" fi sed -i 's/v{System.Reflection.Assembly.GetEntryAssembly()?.GetName().Version}/'"${displayed_version}"'/g' OpenUtau/ViewModels/MainWindowViewModel.cs OpenUtau/ViewModels/MainWindowViewModel.cs } build() { cd "${builddir}" rm -rf runtimes/linux-* # Build worldline # TODO: consider packaging worldline seperately at some point builddir="${builddir}" CARCH="${CARCH}" "${srcdir}/build-worldline" # Build openutau itself export DOTNET_CLI_TELEMETRY_OPTOUT=1 # TODO: figure out how to move dotnet shit into a snapshot() dotnet restore --locked-mode --use-current-runtime --disable-build-servers --locked-mode OpenUtau dotnet publish OpenUtau --use-current-runtime --no-restore --no-self-contained --disable-build-servers "-p:PublishSingleFile=true;StaticExecutable=true" -c "${_buildtarget}" -o "${builddir}/OpenUtau/bin/${_buildtarget}" } package() { # Install the main binary mkdir -p "${pkgdir}/usr/bin" "${pkgdir}/usr/lib/openutau" install -Dm755 "${_outdir}/OpenUtau" "${pkgdir}/usr/lib/openutau/OpenUtau" ln -s "../lib/openutau/OpenUtau" "${pkgdir}/usr/bin/openutau" # Install dependencies # TODO: somehow split these into different packages mkdir -p "${pkgdir}/usr/lib/openutau" install -Dm755 "${_outdir}/libHarfBuzzSharp.so" "${pkgdir}/usr/lib/openutau/libHarfBuzzSharp.so" install -Dm755 "${_outdir}/libSkiaSharp.so" "${pkgdir}/usr/lib/openutau/libSkiaSharp.so" # when debugging: # tar caf "${pkgdir}/usr/lib/openutau/all.tar.gz" --directory="${_outdir}" . # Install desktop icons install -Dm755 "${srcdir}/${pkgname}.desktop" "${pkgdir}/usr/share/applications/${pkgname}.desktop" install -Dm644 "${srcdir}/${pkgname}.svg" "${pkgdir}/usr/share/icons/hicolor/scalable/apps/${pkgname}.svg" } onnxruntime() { pkgdesc="The onnxruntime library as provided by OpenUtau" install_if="${pkgname}=${pkgver}-r${pkgrel}" # options="!check !strip !tracedeps" install -Dm755 "${_outdir}/libonnxruntime.so" "${subpkgdir}/usr/lib/openutau/libonnxruntime.so" } worldline() { pkgdesc="The WORLDLINE-R resampler for OpenUtau" depends="so:libstdc++.so.6 so:libgcc_s.so.1" install_if="${pkgname}=${pkgver}-r${pkgrel}" # TODO: consider moving these to /usr/lib/ directly install -Dm755 "${builddir}/cpp/bazel-bin/worldline/libworldline.so" "${subpkgdir}/usr/lib/openutau/libworldline.so" } sha512sums=" d9fd1b694a7c204800a566e12c3b5ac755072236c6f86b59ee00c6762854e9b0982ae66a3d7bab0772ca811eeb2aee39df28404ca6c195f4e881a8be61f5db03 OpenUtau-c3ff44b01f5dcd0ef1bbdb5aa11ef1319cab3a03.tar.gz 49a405f189156c3873b49f3f3b9b5f95a1e432bcebd140d4a2a10d48eba1a7ed7bb8b0c9365f23f18a1f6adb067eb4027550bb44e1c4816d1b6ff4df2b520a89 build-worldline ecd2480ef21ac77678f727f848120590e052c48b9027da98eabcbf3a6dcc4cc250b8528e9d4e82ba7ea787b8978f5d2ea14d20065dace516c93d25022570ff11 openutau.desktop 3c8118d019c02b3f5b49c5f714229f9687169b3a1943adf48bf3980b5fc3304852bfc568aa7166eae5ea91e6bd7ff3903927e6ad94c2e7dc8fd9d56bd02f82ee openutau.svg 159c98095afcabc14824c2e0a7bdf67ee07d91eb7e1bfd9ea8e9296dbc98d062105e886cf763b3542b365bb0da5a8732ce3d97c0926230b0a0b2daeaef9a0997 UpdaterDialog.axaml.cs 494cc5b679b60623df6a4d81df6175176486c8d603e2ff2333eb22d6d5afaa29295c3a37dbb5e4ed176bda9e22b2b84d4c79190c12c71020bf6ba9e958fd2706 0001-Remove-remaining-update-check-shit.patch "