2022-05-04 14:24:00 +00:00
|
|
|
#
|
|
|
|
# spec file for package lapce
|
|
|
|
#
|
|
|
|
# Copyright (c) 2022 SUSE LLC
|
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
2022-08-06 10:59:30 +00:00
|
|
|
%global _commit_hash e65e40a8d352e6b26a337419c82d5b406d3cf2fc
|
2022-08-06 13:18:11 +00:00
|
|
|
%global rustflags -C linker=clang -C link-arg=-fuse-ld=mold
|
2022-05-04 14:24:00 +00:00
|
|
|
Name: lapce
|
2022-08-11 09:17:49 +00:00
|
|
|
Version: 0.1.3+git145
|
2022-05-04 14:24:00 +00:00
|
|
|
Release: 0
|
|
|
|
Summary: Lightning-fast and Powerful Code Editor written in Rust
|
|
|
|
URL: https://github.com/lapce/lapce
|
|
|
|
License: (0BSD OR Apache-2.0 OR MIT) AND (Apache-2.0 OR MIT) AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR ISC OR MIT) AND (Apache-2.0 OR MIT) AND (Apache-2.0 OR MIT OR Zlib) AND MIT AND (Artistic-2.0 OR CC0-1.0) AND BSD-2-Clause AND BSD-3-Clause AND BSL-1.0 AND CC0-1.0 AND ISC AND MIT AND (MIT OR Unlicense) AND MPL-2.0 AND MPL-2.0+ AND Zlib AND zlib-acknowledgement AND Apache-2.0
|
|
|
|
Group: Productivity/Text/Editors
|
2022-08-06 10:59:30 +00:00
|
|
|
Source0: https://github.com/lapce/lapce/archive/%{_commit_hash}.tar.gz#/%{name}-%{version}.tar.gz
|
2022-07-15 14:40:12 +00:00
|
|
|
Source1: vendor.tar.gz
|
2022-05-04 14:24:00 +00:00
|
|
|
Source2: cargo_config
|
|
|
|
BuildRequires: cargo-packaging
|
2022-08-11 08:32:41 +00:00
|
|
|
BuildRequires: clang
|
2022-05-04 14:24:00 +00:00
|
|
|
BuildRequires: cmake
|
2022-08-11 08:32:41 +00:00
|
|
|
BuildRequires: mold
|
2022-05-04 14:24:00 +00:00
|
|
|
BuildRequires: pkgconfig
|
|
|
|
BuildRequires: python3
|
2022-07-15 14:48:27 +00:00
|
|
|
BuildRequires: rust >= 1.62
|
2022-05-24 11:02:59 +00:00
|
|
|
BuildRequires: pkgconfig(atk) >= 2.18
|
|
|
|
BuildRequires: pkgconfig(cairo) >= 1.14
|
2022-08-08 08:34:59 +00:00
|
|
|
BuildRequires: pkgconfig(cairo-gobject)
|
2022-08-11 08:32:41 +00:00
|
|
|
BuildRequires: pkgconfig(expat)
|
2022-05-04 14:24:00 +00:00
|
|
|
BuildRequires: pkgconfig(fontconfig)
|
|
|
|
BuildRequires: pkgconfig(freetype2)
|
2022-05-24 11:02:59 +00:00
|
|
|
BuildRequires: pkgconfig(gdk-3.0) >= 3.22
|
|
|
|
BuildRequires: pkgconfig(gdk-pixbuf-2.0) >= 2.36.8
|
|
|
|
BuildRequires: pkgconfig(glib-2.0)
|
|
|
|
BuildRequires: pkgconfig(pango) >= 1.38
|
2022-05-04 14:24:00 +00:00
|
|
|
BuildRequires: pkgconfig(xcb)
|
|
|
|
BuildRequires: pkgconfig(xkbcommon)
|
2022-05-24 11:02:59 +00:00
|
|
|
ExclusiveArch: %{rust_tier1_arches}
|
2022-05-04 14:24:00 +00:00
|
|
|
|
|
|
|
%description
|
|
|
|
Lapce is written in pure Rust, with the UI in Druid
|
|
|
|
It uses Xi-Editor's Rope Science for text editing, and the
|
|
|
|
Wgpu Graphics API for rendering.
|
|
|
|
|
|
|
|
%prep
|
2022-08-06 10:59:30 +00:00
|
|
|
%autosetup -a1 -n %{name}-%{_commit_hash}
|
2022-05-04 14:24:00 +00:00
|
|
|
mkdir .cargo
|
|
|
|
cp %{SOURCE2} .cargo/config
|
|
|
|
|
|
|
|
%build
|
2022-08-06 14:05:54 +00:00
|
|
|
export CC=clang
|
2022-08-06 14:11:09 +00:00
|
|
|
export CXX=clang
|
2022-08-06 14:05:54 +00:00
|
|
|
export CARGO_FEATURE_VENDORED=1
|
|
|
|
export RUSTFLAGS="%{rustflags}"
|
2022-08-06 14:26:17 +00:00
|
|
|
cargo build --offline --profile release-lto --all-features
|
2022-05-04 14:24:00 +00:00
|
|
|
|
|
|
|
%install
|
2022-08-06 14:05:54 +00:00
|
|
|
install -Dm 0755 %{_builddir}/%{name}-%{version}/target/release-lto/%{name} %{buildroot}%{_bindir}/%{name}
|
|
|
|
install -Dm 0755 %{_builddir}/%{name}-%{version}/target/release-lto/%{name} %{buildroot}%{_bindir}/%{name}-proxy
|
2022-08-06 04:01:05 +00:00
|
|
|
install -Dm 0644 extra/linux/dev.%{name}.%{name}.appdata.xml %{buildroot}%{_datadir}/metainfo/dev.%{name}.%{name}.appdata.xml
|
|
|
|
install -Dm 0644 extra/linux/dev.%{name}.%{name}.desktop %{buildroot}%{_datadir}/applications/dev.%{name}.%{name}.desktop
|
|
|
|
install -Dm 0644 extra/images/dev.%{name}.%{name}.svg %{buildroot}%{_datadir}/pixmaps/dev.%{name}.%{name}.svg
|
2022-05-04 14:24:00 +00:00
|
|
|
|
|
|
|
%files
|
|
|
|
%license LICENSE
|
2022-08-06 14:05:54 +00:00
|
|
|
%doc README.md docs
|
2022-05-04 14:24:00 +00:00
|
|
|
%{_bindir}/lapce
|
2022-08-06 14:05:54 +00:00
|
|
|
%{_bindir}/lapce-proxy
|
2022-08-06 13:18:11 +00:00
|
|
|
%{_datadir}/metainfo/dev.lapce.lapce.metainfo.xml
|
|
|
|
%{_datadir}/applications/dev.lapce.lapce.desktop
|
|
|
|
%{_datadir}/pixmaps/dev.lapce.lapce.svg
|
2022-05-04 14:24:00 +00:00
|
|
|
|
|
|
|
%changelog
|