From 47ddc9c4f5b4de67bb741df93f1ec62a1202f236 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Fri, 5 Jan 2024 18:10:55 +0100 Subject: [PATCH] package created using the webbuild interface [release 4.4126-1mamba;Mon Jun 13 2022] --- README.md | 1 + sublime-text.spec | 77 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 78 insertions(+) create mode 100644 sublime-text.spec diff --git a/README.md b/README.md index 58e3140..d88a31f 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,3 @@ # sublime-text +Sophisticated text editor for code, html and prose. diff --git a/sublime-text.spec b/sublime-text.spec new file mode 100644 index 0000000..4601230 --- /dev/null +++ b/sublime-text.spec @@ -0,0 +1,77 @@ +%define pkgver %(echo %version | cut -d. -f2) +Name: sublime-text +Version: 4.4126 +Release: 1mamba +Summary: Sophisticated text editor for code, html and prose +Group: Graphical Desktop/Applications/Development +Vendor: openmamba +Distribution: openmamba +Packager: Silvan Calarco +URL: http://www.sublimetext.com/ +Source: https://download.sublimetext.com/sublime_text_build_%{pkgver}_x64.tar.xz +Source1: https://download.sublimetext.com/sublime_text_build_%{pkgver}_arm64.tar.xz +License: Custom +## AUTOBUILDREQ-BEGIN +BuildRequires: glibc-devel +BuildRequires: libX11-devel +BuildRequires: libglib-devel +BuildRequires: libglvnd-devel +BuildRequires: libopenssl-devel +BuildRequires: libz-devel +## AUTOBUILDREQ-END + +%description +Sophisticated text editor for code, html and prose. + +#% debug_package + +%global __provides_exclude_from ^%{_datadir}/sublime-text/.*$ + +%prep +%setup -q -c -a0 +%ifarch x86_64 +tar xf %{SOURCE0} +%endif +%ifarch aarch64 +tar xf %{SOURCE1} +%endif + +sed -i "s|/opt/sublime_text|%{_datadir}/sublime-text|" sublime_text/sublime_text.desktop + +%build + +%install +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" + +install -dm755 %{buildroot}%{_datadir} +cp -a sublime_text %{buildroot}%{_datadir}/sublime-text + +for res in 128x128 16x16 256x256 32x32 48x48; do + install -dm755 %{buildroot}%{_datadir}/icons/hicolor/${res}/apps + ln -s %{_datadir}/sublime_text/Icon/${res}/sublime-text.png %{buildroot}%{_datadir}/icons/hicolor/${res}/apps/sublime-text.png +done + +install -dm755 %{buildroot}%{_datadir}/applications +install -Dm644 sublime_text/sublime_text.desktop %{buildroot}%{_datadir}/applications/sublime-text.desktop + +install -dm755 %{buildroot}%{_bindir} +ln -s %{_datadir}/sublime-text/sublime_text %{buildroot}%{_bindir}/subl + +%clean +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" + +%files +%defattr(-,root,root) +%{_bindir}/subl +%{_datadir}/applications/sublime-text.desktop +%{_datadir}/icons/hicolor/128x128/apps/sublime-text.png +%{_datadir}/icons/hicolor/16x16/apps/sublime-text.png +%{_datadir}/icons/hicolor/256x256/apps/sublime-text.png +%{_datadir}/icons/hicolor/32x32/apps/sublime-text.png +%{_datadir}/icons/hicolor/48x48/apps/sublime-text.png +%dir %{_datadir}/sublime-text +%{_datadir}/sublime-text/* + +%changelog +* Mon Jun 13 2022 Silvan Calarco 4.4126-1mamba +- package created using the webbuild interface