|
| 1 | +name : msedit |
| 2 | +version : 1.2.1 |
| 3 | +release : 1 |
| 4 | +source : |
| 5 | + - https://github.com/microsoft/edit/archive/refs/tags/v1.2.1.tar.gz : 41c719b08212fa4ab6e434a53242b2718ba313e8d24d090f244bb857d6a9d0fd |
| 6 | +homepage : https://github.com/microsoft/edit |
| 7 | +license : MIT |
| 8 | +component : editor |
| 9 | +networking : true |
| 10 | +summary : Microsoft Edit - A simple editor for simple needs |
| 11 | +description: | |
| 12 | + This editor pays homage to the classic MS-DOS Editor, but with a modern |
| 13 | + interface and input controls similar to VS Code. The goal is to provide an |
| 14 | + accessible editor that even users largely unfamiliar with terminals can |
| 15 | + easily use. |
| 16 | +
|
| 17 | +builddeps : |
| 18 | + - rust |
| 19 | + |
| 20 | +rundeps : |
| 21 | + - libicu |
| 22 | + |
| 23 | +setup : | |
| 24 | + # Patch rust-toolchain.toml to use stable instead of nightly |
| 25 | + %patch -p1 -i $pkgfiles/0001-solus-Use-stable-rust-toolchain.patch |
| 26 | + # Patch to use versioned ICU library names (libicuuc.so.76, libicui18n.so.76) |
| 27 | + %patch -p1 -i $pkgfiles/0002-solus-Use-versioned-ICU-libraries.patch |
| 28 | +
|
| 29 | + # Fix desktop file to use msedit instead of edit |
| 30 | + sed -i 's/Exec=edit %U/Exec=msedit %U/' assets/com.microsoft.edit.desktop |
| 31 | +
|
| 32 | + # Desktop file - add missing Categories field and fix icon name |
| 33 | + sed -e '/^Terminal=/a Categories=Utility;TextEditor;' \ |
| 34 | + -e 's/^Icon=.*/Icon=msedit/' \ |
| 35 | + assets/com.microsoft.edit.desktop > com.microsoft.edit.desktop |
| 36 | +
|
| 37 | + %cargo_fetch |
| 38 | +
|
| 39 | +build : | |
| 40 | + # Allow nightly features on stable Rust (as recommended by upstream) |
| 41 | + export RUSTC_BOOTSTRAP=1 |
| 42 | +
|
| 43 | + %cargo_build |
| 44 | +
|
| 45 | +install : | |
| 46 | + install -Dm00755 $workdir/target/release/edit $installdir/usr/bin/msedit |
| 47 | + install -Dm00644 assets/edit.svg $installdir/usr/share/icons/hicolor/scalable/apps/msedit.svg |
| 48 | + install -Dm00644 com.microsoft.edit.desktop $installdir/usr/share/applications/com.microsoft.edit.desktop |
| 49 | + install -Dm00644 $pkgfiles/com.microsoft.edit.metainfo.xml $installdir/usr/share/metainfo/com.microsoft.edit.metainfo.xml |
| 50 | + install -Dm00644 assets/manpage/edit.1 $installdir/usr/share/man/man1/msedit.1 |
| 51 | +
|
| 52 | +check : | |
| 53 | + # Allow nightly features on stable Rust (as recommended by upstream) |
| 54 | + export RUSTC_BOOTSTRAP=1 |
| 55 | + %cargo_test -- --ignored |
0 commit comments