%global debug_package %{nil} %global source_date_epoch_from_changelog 0 %global __brp_mangle_shebangs_exclude_from ^/usr/src/.*$ %global crate gram %global app_id app.liten.Gram %global version 3.0.1 %global release 1 Name: gram Version: %{version} Release: %{release}%{?dist} Summary: The Gram Code Editor License: AGPL-3.0-or-later AND Apache-2.0 AND GPL-3.0-or-later URL: https://codeberg.org/GramEditor/gram Source0: https://codeberg.org/GramEditor/gram/archive/%{name}-%{version}.tar.gz BuildRequires: cargo-rpm-macros BuildRequires: clang BuildRequires: cmake BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: git-core BuildRequires: jq BuildRequires: make BuildRequires: mold #BuildRequires: alsa-lib-devel BuildRequires: elfutils-devel BuildRequires: fontconfig-devel BuildRequires: gettext-devel BuildRequires: libcurl-devel BuildRequires: libX11-xcb BuildRequires: libxkbcommon-x11-devel BuildRequires: libzstd-devel BuildRequires: openssl-devel #BuildRequires: perl-FindBin #BuildRequires: perl-IPC-Cmd #BuildRequires: perl-File-Compare #BuildRequires: perl-File-Copy #BuildRequires: perl-lib BuildRequires: sqlite-devel BuildRequires: vulkan-loader BuildRequires: wayland-devel ### for the desktop file BuildRequires: desktop-file-utils %description Gram is a powerful and modern code editor. It features solid performance and is highly configurable, yet comes with batteries included out of the box. Gram supports many popular programming languages and file formats, and can use gram extensions to support additional languages. Other features include built-in documentation, debugger support via the DAP protocol, source control using git and more. Gram started as a fork of the gram Editor. %prep %autosetup -p1 -n %{crate} export DO_STARTUP_NOTIFY="true" export APP_ID="%app_id" export APP_ICON="%app_id" export APP_NAME="Gram Editor" export APP_CLI="gram" export APP_ARGS="%U" envsubst < "crates/gram/resources/gram.desktop.in" > $APP_ID.desktop envsubst < "crates/gram/resources/flatpak/gram.metainfo.xml.in" > $APP_ID.metainfo.xml ## creates .cargo/config.toml #%%cargo_prep -N %build # build with clang like gram does export CC=$(which clang) ## install the wild linker from git HEAD #/usr/bin/env CARGO_HOME=.cargo RUSTC_BOOTSTRAP=1 cargo install --locked --bin wild --git https://github.com/davidlattimore/wild.git wild-linker #export PATH="$PATH:/builddir/build/BUILD/gram-%{version}-build/BUILDROOT/usr/bin:/builddir/.cargo/bin" #wild -v ||: export GRAM_RELEASE_CHANNEL=stable export GRAM_UPDATE_EXPLANATION="Please use the package manager to update Gram." # generates: error: no such command: `about` script/generate-licenses ||: # # use the wild linker to speed up the build process even more # cat >> config.toml < - 3.0.1-1 - initial release of version 3.0.1 for Fedora 44