sublime-text/sublime-text.spec

85 lines
2.7 KiB
RPMSpec
Raw Permalink Normal View History

%define pkgver %(echo %version | cut -d. -f2)
Name: sublime-text
Version: 4155
Release: 2mamba
Summary: Sophisticated text editor for code, html and prose
Group: Graphical Desktop/Applications/Development
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
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/.*$
%global __requires_exclude ^libsqlite3.so.*$
%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
* Tue Oct 10 2023 Silvan Calarco <silvan.calarco@mambasoft.it> 4155-2mamba
- exclude requirement for libsqlite3.so()(64bit)
* Mon Sep 25 2023 Automatic Build System <autodist@mambasoft.it> 4155-1mamba
- automatic update by autodist
* Mon Jun 13 2022 Silvan Calarco <silvan.calarco@mambasoft.it> 4.4126-1mamba
- package created using the webbuild interface