jce bu gisti düzenledi . Düzenlemeye git
1 file changed, 21 insertions, 7 deletions
msedit.spec
| @@ -10,9 +10,12 @@ | |||
| 10 | 10 | %global commitdate 20250710 | |
| 11 | 11 | ||
| 12 | 12 | # icu soversion | |
| 13 | - | %global icu_sover 76 | |
| 14 | - | %if "%{__isa_bits}" == "64" | |
| 15 | - | %global lib64_suffix ()(64bit) | |
| 13 | + | %global icu_sover %(icu-config --version | cut -d. -f1) | |
| 14 | + | %global libicuuc libicuuc.so.%{icu_sover} | |
| 15 | + | %global libicui18n libicui18n.so.%{icu_sover} | |
| 16 | + | ||
| 17 | + | %if %[ %{?__isa_bits} != 32 ] | |
| 18 | + | %global lib_suffix ()(%{__isa_bits}bit) | |
| 16 | 19 | %endif | |
| 17 | 20 | ||
| 18 | 21 | Name: msedit | |
| @@ -33,8 +36,8 @@ BuildRequires: desktop-file-utils | |||
| 33 | 36 | BuildRequires: libicu-devel | |
| 34 | 37 | ||
| 35 | 38 | # For dlopen() libicu | |
| 36 | - | Requires: libicuuc.so.%{icu_sover}%{?lib64_suffix} | |
| 37 | - | Requires: libicui18n.so.%{icu_sover}%{?lib64_suffix} | |
| 39 | + | Recommends: %{libicuuc}%{?lib_suffix} | |
| 40 | + | Recommends: %{libicui18n}%{?lib_suffix} | |
| 38 | 41 | ||
| 39 | 42 | %global _description %{expand: | |
| 40 | 43 | %{summary} | |
| @@ -56,14 +59,20 @@ use. | |||
| 56 | 59 | ||
| 57 | 60 | %build | |
| 58 | 61 | # Set environment variables for ICU libraries | |
| 59 | - | EDIT_CFG_ICUUC_SONAME=libicuuc.so.%{icu_sover} | |
| 60 | - | EDIT_CFG_ICUI18N_SONAME=libicui18n.so.%{icu_sover} | |
| 62 | + | export EDIT_CFG_ICUUC_SONAME=%{libicuuc} | |
| 63 | + | export EDIT_CFG_ICUI18N_SONAME=%{libicui18n} | |
| 64 | + | export EDIT_CFG_ICU_RENAMING_VERSION=%{icu_sover} | |
| 61 | 65 | ||
| 62 | 66 | %cargo_build | |
| 63 | 67 | %{cargo_license_summary} | |
| 64 | 68 | %{cargo_license} > LICENSE.dependencies | |
| 65 | 69 | ||
| 66 | 70 | %install | |
| 71 | + | # Set environment variables for ICU libraries | |
| 72 | + | export EDIT_CFG_ICUUC_SONAME=%{libicuuc} | |
| 73 | + | export EDIT_CFG_ICUI18N_SONAME=%{libicui18n} | |
| 74 | + | export EDIT_CFG_ICU_RENAMING_VERSION=%{icu_sover} | |
| 75 | + | ||
| 67 | 76 | %cargo_install | |
| 68 | 77 | ||
| 69 | 78 | # de-conflict with vim | |
| @@ -89,6 +98,11 @@ mv %{buildroot}%{_mandir}/man1/edit.1 %{buildroot}%{_mandir}/man1/%{name}.1 | |||
| 89 | 98 | ||
| 90 | 99 | %if %{with check} | |
| 91 | 100 | %check | |
| 101 | + | # Set environment variables for ICU libraries | |
| 102 | + | export EDIT_CFG_ICUUC_SONAME=%{libicuuc} | |
| 103 | + | export EDIT_CFG_ICUI18N_SONAME=%{libicui18n} | |
| 104 | + | export EDIT_CFG_ICU_RENAMING_VERSION=%{icu_sover} | |
| 105 | + | ||
| 92 | 106 | %cargo_test | |
| 93 | 107 | %endif | |
| 94 | 108 | ||
jce bu gisti düzenledi . Düzenlemeye git
1 file changed, 36 insertions, 10 deletions
msedit.spec
| @@ -4,6 +4,11 @@ | |||
| 4 | 4 | # prevent library files from being installed | |
| 5 | 5 | %global cargo_install_lib 0 | |
| 6 | 6 | ||
| 7 | + | # Temporarily use a Git revision until next stable release | |
| 8 | + | %global commit e16b4abffc5e23d20e49de5f1461aebfc692268d | |
| 9 | + | %global shortcommit %{sub %{commit} 1 7} | |
| 10 | + | %global commitdate 20250710 | |
| 11 | + | ||
| 7 | 12 | # icu soversion | |
| 8 | 13 | %global icu_sover 76 | |
| 9 | 14 | %if "%{__isa_bits}" == "64" | |
| @@ -11,7 +16,7 @@ | |||
| 11 | 16 | %endif | |
| 12 | 17 | ||
| 13 | 18 | Name: msedit | |
| 14 | - | Version: 1.2.0 | |
| 19 | + | Version: 1.2.0^1.%{shortcommit} | |
| 15 | 20 | Release: %autorelease | |
| 16 | 21 | Summary: Simple editor inspired by the MS-DOS Editor | |
| 17 | 22 | SourceLicense: MIT | |
| @@ -20,10 +25,11 @@ SourceLicense: MIT | |||
| 20 | 25 | License: MIT AND (MIT OR Apache-2.0) | |
| 21 | 26 | ||
| 22 | 27 | URL: https://github.com/microsoft/edit | |
| 23 | - | Source: %{url}/archive/v%{version}/edit-%{version}.tar.gz | |
| 28 | + | Source: %{url}/archive/%{shortcommit}.tar.gz | |
| 24 | 29 | Patch: edit-fix-metadata.diff | |
| 25 | 30 | ||
| 26 | 31 | BuildRequires: cargo-rpm-macros >= 26 | |
| 32 | + | BuildRequires: desktop-file-utils | |
| 27 | 33 | BuildRequires: libicu-devel | |
| 28 | 34 | ||
| 29 | 35 | # For dlopen() libicu | |
| @@ -42,29 +48,45 @@ use. | |||
| 42 | 48 | %description %{_description} | |
| 43 | 49 | ||
| 44 | 50 | %prep | |
| 45 | - | %autosetup -n edit-%{version} -p1 | |
| 46 | - | ||
| 47 | - | # Patch the code to load the correct icu libraries | |
| 48 | - | # To avoid requiring the libicu-devel package at runtime | |
| 49 | - | sed -i src/sys/unix.rs \ | |
| 50 | - | -e "s/libicuuc.so/libicuuc.so.%{icu_sover}/g" \ | |
| 51 | - | -e "s/libicui18n.so/libicui18n.so.%{icu_sover}/g" | |
| 52 | - | ||
| 51 | + | %autosetup -n edit-%{commit} -p1 | |
| 53 | 52 | %cargo_prep | |
| 54 | 53 | ||
| 55 | 54 | %generate_buildrequires | |
| 56 | 55 | %cargo_generate_buildrequires | |
| 57 | 56 | ||
| 58 | 57 | %build | |
| 58 | + | # Set environment variables for ICU libraries | |
| 59 | + | EDIT_CFG_ICUUC_SONAME=libicuuc.so.%{icu_sover} | |
| 60 | + | EDIT_CFG_ICUI18N_SONAME=libicui18n.so.%{icu_sover} | |
| 61 | + | ||
| 59 | 62 | %cargo_build | |
| 60 | 63 | %{cargo_license_summary} | |
| 61 | 64 | %{cargo_license} > LICENSE.dependencies | |
| 62 | 65 | ||
| 63 | 66 | %install | |
| 64 | 67 | %cargo_install | |
| 68 | + | ||
| 65 | 69 | # de-conflict with vim | |
| 66 | 70 | mv %{buildroot}%{_bindir}/edit %{buildroot}%{_bindir}/%{name} | |
| 67 | 71 | ||
| 72 | + | # Change binary and icon in .desktop file then install it | |
| 73 | + | sed -i \ | |
| 74 | + | -e "s|Icon=edit|Icon=%{_datadir}/pixmaps/%{name}.ico|g" \ | |
| 75 | + | -e "s|Exec=edit %%F|Exec=%{name} %%F|g" assets/com.microsoft.edit.desktop | |
| 76 | + | desktop-file-install --dir=%{buildroot}%{_datadir}/applications assets/com.microsoft.edit.desktop | |
| 77 | + | ||
| 78 | + | # Install icon | |
| 79 | + | install -Dpm 0644 assets/edit.ico %{buildroot}%{_datadir}/pixmaps/%{name}.ico | |
| 80 | + | install -Dpm 0644 assets/edit.svg %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg | |
| 81 | + | ||
| 82 | + | # Change manpage to match binary name and install it | |
| 83 | + | sed -i \ | |
| 84 | + | -e "s|edit |msedit |g" \ | |
| 85 | + | -e "s|EDIT 1|MSEDIT 1|g" \ | |
| 86 | + | -e "s|fBedit|fBmsedit|g" assets/manpage/edit.1 | |
| 87 | + | install -Dpm0644 -t %{buildroot}%{_mandir}/man1 assets/manpage/*.1 | |
| 88 | + | mv %{buildroot}%{_mandir}/man1/edit.1 %{buildroot}%{_mandir}/man1/%{name}.1 | |
| 89 | + | ||
| 68 | 90 | %if %{with check} | |
| 69 | 91 | %check | |
| 70 | 92 | %cargo_test | |
| @@ -78,6 +100,10 @@ mv %{buildroot}%{_bindir}/edit %{buildroot}%{_bindir}/%{name} | |||
| 78 | 100 | %doc README.md | |
| 79 | 101 | %doc SECURITY.md | |
| 80 | 102 | %{_bindir}/%{name} | |
| 103 | + | %{_datadir}/applications/com.microsoft.edit.desktop | |
| 104 | + | %{_datadir}/icons/hicolor/scalable/apps/%{name}.svg | |
| 105 | + | %{_datadir}/pixmaps/%{name}.ico | |
| 106 | + | %{_mandir}/man1/%{name}.1* | |
| 81 | 107 | ||
| 82 | 108 | %changelog | |
| 83 | 109 | %autochangelog | |
jce bu gisti düzenledi . Düzenlemeye git
1 file changed, 22 insertions, 4 deletions
msedit.spec
| @@ -4,21 +4,31 @@ | |||
| 4 | 4 | # prevent library files from being installed | |
| 5 | 5 | %global cargo_install_lib 0 | |
| 6 | 6 | ||
| 7 | + | # icu soversion | |
| 8 | + | %global icu_sover 76 | |
| 9 | + | %if "%{__isa_bits}" == "64" | |
| 10 | + | %global lib64_suffix ()(64bit) | |
| 11 | + | %endif | |
| 12 | + | ||
| 7 | 13 | Name: msedit | |
| 8 | 14 | Version: 1.2.0 | |
| 9 | 15 | Release: %autorelease | |
| 10 | - | Summary: A simple editor for simple needs. | |
| 16 | + | Summary: Simple editor inspired by the MS-DOS Editor | |
| 11 | 17 | SourceLicense: MIT | |
| 12 | 18 | # MIT OR Apache-2.0: libc v0.2.172 | |
| 13 | 19 | # MIT: edit v1.2.0 | |
| 14 | 20 | License: MIT AND (MIT OR Apache-2.0) | |
| 15 | 21 | ||
| 16 | 22 | URL: https://github.com/microsoft/edit | |
| 17 | - | Source: https://github.com/microsoft/edit/archive/v%{version}/edit-%{version}.tar.gz | |
| 23 | + | Source: %{url}/archive/v%{version}/edit-%{version}.tar.gz | |
| 18 | 24 | Patch: edit-fix-metadata.diff | |
| 19 | 25 | ||
| 20 | 26 | BuildRequires: cargo-rpm-macros >= 26 | |
| 21 | - | Requires: libicu-devel | |
| 27 | + | BuildRequires: libicu-devel | |
| 28 | + | ||
| 29 | + | # For dlopen() libicu | |
| 30 | + | Requires: libicuuc.so.%{icu_sover}%{?lib64_suffix} | |
| 31 | + | Requires: libicui18n.so.%{icu_sover}%{?lib64_suffix} | |
| 22 | 32 | ||
| 23 | 33 | %global _description %{expand: | |
| 24 | 34 | %{summary} | |
| @@ -33,6 +43,13 @@ use. | |||
| 33 | 43 | ||
| 34 | 44 | %prep | |
| 35 | 45 | %autosetup -n edit-%{version} -p1 | |
| 46 | + | ||
| 47 | + | # Patch the code to load the correct icu libraries | |
| 48 | + | # To avoid requiring the libicu-devel package at runtime | |
| 49 | + | sed -i src/sys/unix.rs \ | |
| 50 | + | -e "s/libicuuc.so/libicuuc.so.%{icu_sover}/g" \ | |
| 51 | + | -e "s/libicui18n.so/libicui18n.so.%{icu_sover}/g" | |
| 52 | + | ||
| 36 | 53 | %cargo_prep | |
| 37 | 54 | ||
| 38 | 55 | %generate_buildrequires | |
| @@ -62,4 +79,5 @@ mv %{buildroot}%{_bindir}/edit %{buildroot}%{_bindir}/%{name} | |||
| 62 | 79 | %doc SECURITY.md | |
| 63 | 80 | %{_bindir}/%{name} | |
| 64 | 81 | ||
| 65 | - | %changelog | |
| 82 | + | %changelog | |
| 83 | + | %autochangelog | |
jce bu gisti düzenledi . Düzenlemeye git
Değişiklik yok
jce bu gisti düzenledi . Düzenlemeye git
1 file changed, 65 insertions
msedit.spec(dosya oluşturuldu)
| @@ -0,0 +1,65 @@ | |||
| 1 | + | # Partially generated by rust2rpm 27 | |
| 2 | + | %bcond check 1 | |
| 3 | + | ||
| 4 | + | # prevent library files from being installed | |
| 5 | + | %global cargo_install_lib 0 | |
| 6 | + | ||
| 7 | + | Name: msedit | |
| 8 | + | Version: 1.2.0 | |
| 9 | + | Release: %autorelease | |
| 10 | + | Summary: A simple editor for simple needs. | |
| 11 | + | SourceLicense: MIT | |
| 12 | + | # MIT OR Apache-2.0: libc v0.2.172 | |
| 13 | + | # MIT: edit v1.2.0 | |
| 14 | + | License: MIT AND (MIT OR Apache-2.0) | |
| 15 | + | ||
| 16 | + | URL: https://github.com/microsoft/edit | |
| 17 | + | Source: https://github.com/microsoft/edit/archive/v%{version}/edit-%{version}.tar.gz | |
| 18 | + | Patch: edit-fix-metadata.diff | |
| 19 | + | ||
| 20 | + | BuildRequires: cargo-rpm-macros >= 26 | |
| 21 | + | Requires: libicu-devel | |
| 22 | + | ||
| 23 | + | %global _description %{expand: | |
| 24 | + | %{summary} | |
| 25 | + | ||
| 26 | + | A text editor that pays homage to the classic MS-DOS Editor, but with a modern | |
| 27 | + | interface and input controls similar to VS Code. The goal is to provide an | |
| 28 | + | accessible editor that even users largely unfamiliar with terminals can easily | |
| 29 | + | use. | |
| 30 | + | } | |
| 31 | + | ||
| 32 | + | %description %{_description} | |
| 33 | + | ||
| 34 | + | %prep | |
| 35 | + | %autosetup -n edit-%{version} -p1 | |
| 36 | + | %cargo_prep | |
| 37 | + | ||
| 38 | + | %generate_buildrequires | |
| 39 | + | %cargo_generate_buildrequires | |
| 40 | + | ||
| 41 | + | %build | |
| 42 | + | %cargo_build | |
| 43 | + | %{cargo_license_summary} | |
| 44 | + | %{cargo_license} > LICENSE.dependencies | |
| 45 | + | ||
| 46 | + | %install | |
| 47 | + | %cargo_install | |
| 48 | + | # de-conflict with vim | |
| 49 | + | mv %{buildroot}%{_bindir}/edit %{buildroot}%{_bindir}/%{name} | |
| 50 | + | ||
| 51 | + | %if %{with check} | |
| 52 | + | %check | |
| 53 | + | %cargo_test | |
| 54 | + | %endif | |
| 55 | + | ||
| 56 | + | %files | |
| 57 | + | %license LICENSE | |
| 58 | + | %license LICENSE.dependencies | |
| 59 | + | %doc CODE_OF_CONDUCT.md | |
| 60 | + | %doc CONTRIBUTING.md | |
| 61 | + | %doc README.md | |
| 62 | + | %doc SECURITY.md | |
| 63 | + | %{_bindir}/%{name} | |
| 64 | + | ||
| 65 | + | %changelog | |