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
e75c7ae7
Commit
e75c7ae7
authored
Mar 30, 2024
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
epm play sublime: rewrite via epm pack
parent
885d63e3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
53 deletions
+26
-53
sublime-text.sh
pack.d/sublime-text.sh
+18
-0
sublime.sh
play.d/sublime.sh
+2
-6
sublime-text.sh
repack.d/sublime-text.sh
+6
-47
No files found.
pack.d/sublime-text.sh
0 → 100755
View file @
e75c7ae7
#!/bin/sh
TAR
=
"
$1
"
RETURNTARNAME
=
"
$2
"
#VERSION="$3"
.
$(
dirname
$0
)
/common.sh
PRODUCT
=
sublime-text
PKGNAME
=
"
$(
basename
"
$TAR
"
|
sed
-e
"s|sublime_text_build_|
$PRODUCT
-|"
-e
's|_.*||'
)
"
mkdir
opt/
erc
$TAR
mv
-v
sublime
*
opt/
$PRODUCT
erc a
$PKGNAME
.tar opt
return_tar
$PKGNAME
.tar
play.d/sublime.sh
View file @
e75c7ae7
...
...
@@ -4,6 +4,7 @@ PKGNAME=sublime-text
SUPPORTEDARCHES
=
"x86_64 aarch64"
VERSION
=
"
$2
"
DESCRIPTION
=
'Sublime Text 4 from the official site'
URL
=
"https://www.sublimetext.com/"
.
$(
dirname
$0
)
/common.sh
...
...
@@ -23,12 +24,7 @@ esac
PKGURL
=
$(
epm tool eget
--list
--latest
https://www.sublimetext.com/download_thanks
"sublime_text_build_
${
VERSION
}
_
$arch
.tar.xz"
)
||
fatal
"Can't get package URL"
[
-n
"
$PKGURL
"
]
||
fatal
"Can't get package URL"
PKGFILE
=
$(
echo
/tmp/
$(
basename
$PKGURL
)
|
sed
-e
"s|/sublime_text_build_|/
$PKGNAME
-|"
)
epm tool eget
-O
$PKGFILE
$PKGURL
||
exit
epm
install
--repack
"
$PKGFILE
"
||
exit
rm
-fv
$PKGFILE
epm pack
$PKGNAME
"
$PKGURL
"
||
exit
echo
echo
"NOTE: Sublime Text 4 is a proprietary software. We recommend to use open source editors: Codium, VS Code, Atom."
repack.d/sublime-text.sh
View file @
e75c7ae7
...
...
@@ -15,57 +15,16 @@ 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
filter_from_requires
"python3(sublime_api)"
# move package to /opt
ROOTDIR
=
sublime_text
mkdir
-p
$BUILDROOT
/opt
mv
$BUILDROOT
/
$ROOTDIR
$BUILDROOT$PRODUCTDIR
subst
"s|
\"
/
$ROOTDIR
/|
\"
$PRODUCTDIR
/|"
$SPEC
#filter_from_requires "python3(sublime_api)"
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
install_file .
$PRODUCTDIR
/Icon/
${
res
}
/sublime-text.png /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;
add_bin_link_command
$PRODUCT
$PRODUCTDIR
/sublime_text
add_bin_link_command
$PRODUCTCUR
$PRODUCT
[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
install_file .
$PRODUCTDIR
/sublime_text.desktop /usr/share/applications/
$PRODUCT
.desktop
fix_desktop_file /opt/sublime_text/sublime_text
$PRODUCT
add_libs_requires
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