Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This patch introduces the /snap/patches directory for packagers to place patches used in the packaging process. A `patches` part is included to install these files under $SNAPCRAFT_STAGE/packages to be used by other parts. A Sed script is also included to patch the desktop entries' name and icon. Signed-off-by: 林博仁(Buo-ren Lin) <Buo.Ren.Lin@gmail.com>
- Loading branch information
Showing
3 changed files
with
72 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# /snap/patches | ||
|
||
Here are the patches that are required to build a snap package that functions correctly. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# This sed script patches the desktop entries of the snapped | ||
# application. | ||
# | ||
# Documentation: | ||
# | ||
# * GNU Sed Manual | ||
# https://www.gnu.org/software/sed/manual | ||
# * `sed` script overview - `sed` scripts | ||
# * `sed` commands summary - `sed` scripts | ||
# * The `s` Command - `sed` scripts | ||
# * Overview of basic regular expression syntax - Regular | ||
# Expressions: selecting text | ||
# * Back-references and Subexpressions - Regular Expressions: | ||
# selecting text | ||
|
||
## Append '(Snappy Edition)' to the application name to make it | ||
## distinguishable with the other same application using different | ||
## software distribution technologies | ||
## | ||
## FIXME: The appended string is not localizable, the proper way to | ||
## implement this is to probably use a new X-Snappy-Name keys | ||
## with localestring format to let the translators fill in | ||
## additional localized string and use these values to replace | ||
## the Name keys here. | ||
s/^\(Name\(\[.\+\]\)\?=.*\)$/\1 (Snappy Edition)/g | ||
|
||
## Fix-up application icon lookup | ||
s|^Icon=.*|Icon=\${SNAP}/meta/gui/icon.svg| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters