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
885d63e3
Commit
885d63e3
authored
Mar 30, 2024
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
epm play snap4arduino: rewrite via epm pack
parent
69a603ce
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
22 deletions
+29
-22
snap4arduino.sh
pack.d/snap4arduino.sh
+19
-0
snap4arduino.sh
play.d/snap4arduino.sh
+3
-5
snap4arduino.sh
repack.d/snap4arduino.sh
+7
-17
No files found.
pack.d/snap4arduino.sh
0 → 100755
View file @
885d63e3
#!/bin/sh
TAR
=
"
$1
"
RETURNTARNAME
=
"
$2
"
#VERSION="$3"
.
$(
dirname
$0
)
/common.sh
PRODUCT
=
"snap4arduino"
# Snap4Arduino_desktop-gnu-64_9.1.1
PKGNAME
=
"
$(
basename
"
$TAR
"
|
sed
-e
"s|Snap4Arduino_desktop-gnu-[36][24]
\_
|
$PRODUCT
-|"
)
"
mkdir
opt/
erc
$TAR
mv
-v
Snap4Arduino
*
opt/
$PRODUCT
erc a
$PKGNAME
opt
return_tar
$PKGNAME
play.d/snap4arduino.sh
View file @
885d63e3
...
...
@@ -2,7 +2,9 @@
PKGNAME
=
snap4arduino
SUPPORTEDARCHES
=
"x86_64 x86"
VERSION
=
"
$2
"
DESCRIPTION
=
"Snap4Arduino binds Snap! and Arduino together"
URL
=
"https://github.com/bromagosa/Snap4Arduino"
.
$(
dirname
$0
)
/common.sh
...
...
@@ -18,9 +20,5 @@ esac
PKGURL
=
$(
epm tool eget
--list
--latest
https://github.com/bromagosa/Snap4Arduino/releases
"Snap4Arduino_desktop-gnu-
$arch_
*.tar.gz"
)
#"
[
-n
"
$PKGURL
"
]
||
fatal
"Can't get package URL"
PKGFILE
=
$(
echo
/tmp/
$(
basename
$PKGURL
)
|
sed
-e
"s|/Snap4Arduino_desktop-gnu-
$arch
\_
|/
$PKGNAME
-|"
)
epm tool eget
-O
$PKGFILE
$PKGURL
||
exit
epm
install
--repack
"
$PKGFILE
"
||
exit
rm
-fv
$PKGFILE
epm pack
--install
$PKGNAME
"
$PKGURL
"
repack.d/snap4arduino.sh
View file @
885d63e3
...
...
@@ -4,40 +4,30 @@
BUILDROOT
=
"
$1
"
SPEC
=
"
$2
"
PRODUCT
=
Snap4Arduino
PRODUCTCUR
=
snap4arduino
PRODUCTDIR
=
/opt/
$PRODUCT
PRODUCT
=
snap4arduino
.
$(
dirname
$0
)
/common.sh
# TODO: move to json in pack.d
subst
"s|^Group:.*|Group: Development/Other|"
$SPEC
subst
"s|^License: unknown
$|
License: AGPL-3.0|"
$SPEC
subst
"s|^URL:.*|URL: https://snap4arduino.rocks/|"
$SPEC
subst
"s|^Summary:.*|Summary: A modification of the Snap! visual programming language that lets you seamlessly interact with almost all versions of the Arduino board.|"
$SPEC
# move package to /opt
ROOTDIR
=
$(
basename
$(
find
$BUILDROOT
-mindepth
1
-maxdepth
1
-type
d
))
mkdir
$BUILDROOT
/opt
mv
$BUILDROOT
/
$ROOTDIR
$BUILDROOT$PRODUCTDIR
subst
"s|
\"
/
$ROOTDIR
/|
\"
$PRODUCTDIR
/|"
$SPEC
add_bin_link_command
$PRODUCT
$PRODUCTDIR
/run
# add binary to the search path
mkdir
-p
$BUILDROOT
/usr/bin/
ln
-s
$PRODUCTDIR
/run
$BUILDROOT
/usr/bin/
$PRODUCTCUR
subst
"s|%files|%files
\n
/usr/bin/
$PRODUCTUR
|"
$SPEC
# TODO: copy icons
# create desktop file
mkdir
-p
$BUILDROOT
/usr/share/applications/
cat
<<
EOF
>
$BUILDROOT
/usr/share/applications/
$PRODUCT
.desktop
cat
<<
EOF
>
$PRODUCT
.desktop
[Desktop Entry]
Type=Application
Version=1.0
Icon=
$PRODUCTDIR
/icons/128x128x32.png
Exec=
$PRODUCT
DIR
/run
Exec=
$PRODUCT
Name=Snap4Arduino
Name[en]=Snap4Arduino
GenericName[en]=Use Snap! to control Arduino boards. Arduino goes lambda!
EOF
subst
"s|%files|%files
\n
/usr/share/applications/
$PRODUCT
.desktop|"
$SPEC
install_file
$PRODUCT
.desktop /usr/share/applications/
$PRODUCT
.desktop
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