archrelease: copy trunk to community-any
[ArchLinux/community.git] / lapce / trunk / PKGBUILD
blob739f1fe88a8f51921e19dcec7ec266cbdc47dcf7
1 # Maintainer: Caleb Maclennan <caleb@alerque.com>
2 # Contributor: George Rawlinson <grawlinson@archlinux.org>
4 pkgname=lapce
5 pkgver=0.2.7
6 pkgrel=1
7 pkgdesc='Lightning-fast and Powerful Code Editor'
8 arch=(x86_64)
9 url=https://lapce.dev
10 _url="https://github.com/$pkgname/$pkgname"
11 license=(Apache)
12 depends=(expat
13          fontconfig
14          freetype2
15          gcc-libs
16          gtk3
17          libxcb
18          libxkbcommon)
19 makedepends=(cargo
20              python
21              cmake)
22 options=('!lto')
23 _archive="$pkgname-$pkgver"
24 source=("$_url/archive/v$pkgver/$_archive.tar.gz")
25 sha256sums=('c4e0668bf98e83a8c451fe69173c51d8345511a1bd580c412750f3b940531c27')
27 prepare() {
28         cd "$_archive"
29         cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
32 build() {
33         cd "$_archive"
34         cargo build --frozen --profile release-lto --all-features
37 package() {
38         cd "$_archive"
39         install -Dm0755 -t "$pkgdir/usr/bin/" "target/release-lto/$pkgname"{,-proxy}
40         local lname=dev.lapce.lapce
41         install -Dm0644 -t "$pkgdir/usr/share/applications/" extra/linux/$lname.desktop
42         install -Dm0644 -t "$pkgdir/usr/share/metainfo/" extra/linux/$lname.metainfo.xml
43         install -Dm0644 extra/images/logo.png "$pkgdir/usr/share/pixmaps/$lname.png"