Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
eepm
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
eepm
Commits
b9d2ca86
Commit
b9d2ca86
authored
Apr 15, 2022
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
epm play: add Sublime Text 4 support
parent
e90c858b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
100 additions
and
0 deletions
+100
-0
sublime.sh
play.d/sublime.sh
+32
-0
sublime-text.sh
repack.d/sublime-text.sh
+68
-0
No files found.
play.d/sublime.sh
0 → 100755
View file @
b9d2ca86
#!/bin/sh
PKGNAME
=
sublime-text
DESCRIPTION
=
'Sublime Text 4 from the official site'
.
$(
dirname
$0
)
/common.sh
arch
=
"
$(
$DISTRVENDOR
-a
)
"
case
"
$arch
"
in
x86_64
)
arch
=
x64
;;
aarch64
)
arch
=
arm64
;;
*
)
fatal
"
$arch
arch is not supported"
;;
esac
PKG
=
$(
$EGET
--list
--latest
https://www.sublimetext.com/download
"sublime_text_build_*_
$arch
.tar.xz"
)
||
fatal
"Can't get package URL"
[
-n
"
$PKG
"
]
||
fatal
"Can't get package URL"
PKGFILE
=
$(
echo
/tmp/
$(
basename
$PKGURL
)
|
sed
-e
"s|/sublime_text_build_|/
$PKGNAME
-|"
)
$EGET
-O
$PKGFILE
$PKGURL
||
exit
epm
install
--repack
"
$PKG
"
||
exit
rm
-fv
$PKGFILE
echo
echo
"NOTE: Sublime Text 4 is a proprietary software. We recommend use open source editors: Codium, VS Code, Atom."
repack.d/sublime-text.sh
0 → 100755
View file @
b9d2ca86
#!/bin/sh -x
# It will be run with two args: buildroot spec
BUILDROOT
=
"
$1
"
SPEC
=
"
$2
"
PRODUCT
=
sublime-text
PRODUCTCUR
=
subl
PRODUCTDIR
=
/opt/
$PRODUCT
.
$(
dirname
$0
)
/common.sh
subst
"s|^Group:.*|Group: Text tools|"
$SPEC
subst
"s|^URL:.*|URL: https://www.sublimetext.com|"
$SPEC
subst
"s|^Summary:.*|Summary: Sophisticated text editor for code, html and prose|"
$SPEC
subst
"s|^License: unknown
$|
License: Proprietary|"
$SPEC
# move package to /opt
ROOTDIR
=
sublime_text
mkdir
-p
$BUILDROOT
/opt
mv
$BUILDROOT
/
$ROOTDIR
$BUILDROOT$PRODUCTDIR
subst
"s|
\"
/
$ROOTDIR
/|
\"
$PRODUCTDIR
/|"
$SPEC
for
res
in
128x128 16x16 256x256 32x32 48x48
;
do
install
-dm755
"
$BUILDROOT
/usr/share/icons/hicolor/
${
res
}
/apps"
cp
$BUILDROOT$PRODUCTDIR
/Icon/
${
res
}
/sublime-text.png
$BUILDROOT
/usr/share/icons/hicolor/
${
res
}
/apps/sublime-text.png
pack_file /usr/share/icons/hicolor/
${
res
}
/apps/sublime-text.png
done
# add binary to the search path
mkdir
-p
$BUILDROOT
/usr/bin/
ln
-s
$PRODUCTDIR
/sublime_text
$BUILDROOT
/usr/bin/
$PRODUCT
subst
"s|%files|%files
\n
/usr/bin/
$PRODUCT
|"
$SPEC
ln
-s
$PRODUCTDIR
/sublime_text
$BUILDROOT
/usr/bin/
$PRODUCTCUR
subst
"s|%files|%files
\n
/usr/bin/
$PRODUCTCUR
|"
$SPEC
# create desktop file
mkdir
-p
$BUILDROOT
/usr/share/applications/
cat
<<
EOF
>
$BUILDROOT
/usr/share/applications/
$PRODUCT
.desktop
[Desktop Entry]
Version=1.0
Type=Application
Name=Sublime Text
GenericName=Text Editor
Comment=Sophisticated text editor for code, markup and prose
Exec=subl %F
Terminal=false
MimeType=text/plain;
Icon=sublime-text
Categories=TextEditor;Development;
StartupNotify=true
StartupWMClass=subl
Actions=Window;Document;
[Desktop Action Window]
Name=New Window
Exec=subl -n
OnlyShowIn=Unity;
[Desktop Action Document]
Name=New File
Exec=subl --command new_file
OnlyShowIn=Unity;
EOF
subst
"s|%files|%files
\n
/usr/share/applications/
$PRODUCT
.desktop|"
$SPEC
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment