Skip to content

Commit 5bc13ea

Browse files
committed
thunderbird-portable: use packer
1 parent 0c1db5a commit 5bc13ea

File tree

4 files changed

+98
-68
lines changed

4 files changed

+98
-68
lines changed

archlinuxcn/thunderbird-portable/PKGBUILD

Lines changed: 20 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -10,56 +10,40 @@ url="https://github.com/Kraftland/portable"
1010
license=('GPL-3.0-or-later')
1111
groups=()
1212
options=(!debug !strip)
13-
depends=("thunderbird" "portable")
1413

1514
optdepends=()
1615

17-
makedepends+=()
16+
makedepends+=(portable-packer thunderbird)
1817

1918
checkdepends=()
2019

2120
source=(
22-
portable-config
23-
thunderbird.sh
21+
config.toml
2422
thunderbird.desktop
2523
)
24+
provides+=(thunderbird)
25+
conflicts+=(thunderbird)
2626

2727

2828
md5sums=('ea5929c2da88108fa43a4d7a7c566050'
29-
'ad98beaed27a3b529c9ceb5038a6e987'
3029
'1d7c12414f01b38e33ebf19a70dcd708')
3130

3231
function package() {
33-
install -Dm644 portable-config \
34-
"${pkgdir}/usr/lib/portable/info/org.mozilla.thunderbird/config"
35-
install -Dm755 "thunderbird.sh" \
36-
"${pkgdir}/usr/bin/thunderbird-portable"
37-
install -Dm644 "thunderbird.desktop" "${pkgdir}/usr/share/applications/org.mozilla.thunderbird.desktop"
38-
install -d "${pkgdir}/usr/share/libalpm/hooks"
39-
40-
echo '''[Action]
41-
When = PostTransaction
42-
Exec = /usr/bin/ln "-sfr" "/usr/bin/thunderbird-portable" "/usr/bin/thunderbird"
43-
Depends = thunderbird
44-
Description = Configuring Thunderbird for Portable
45-
46-
[Trigger]
47-
Operation = Install
48-
Operation = Upgrade
49-
Type = Path
50-
Target = usr/bin/thunderbird-portable
51-
Target = usr/bin/thunderbird''' >"${pkgdir}/usr/share/libalpm/hooks/thunderbird-portable.hook"
52-
echo '''[Action]
53-
When = PostTransaction
54-
Exec = /usr/bin/rm "-f" "/usr/share/applications/org.mozilla.Thunderbird.desktop"
55-
Depends = thunderbird
56-
Description = Configuring Thunderbird for Portable
57-
58-
[Trigger]
59-
Operation = Install
60-
Operation = Upgrade
61-
Type = Path
62-
Target = usr/bin/thunderbird-portable
63-
Target = usr/bin/thunderbird''' >"${pkgdir}/usr/share/libalpm/hooks/thunderbird-portable-desktop.hook"
32+
depends=(glibc gtk3 mime-types dbus dbus-glib alsa-lib nss hunspell sqlite
33+
ttf-font libvpx zlib bzip2 botan libwebp libevent
34+
libjpeg-turbo libffi nspr gcc-libs libx11 libxrender libxfixes libxext libxcomposite libxdamage pango
35+
cairo gdk-pixbuf2 freetype2 fontconfig glib2
36+
pixman gnupg json-c libcanberra ffmpeg)
37+
depends+=(portable)
38+
export pkgdir
39+
export pkgname
40+
export srcdir
41+
portable-packer \
42+
-v \
43+
--distro arch \
44+
--mode copy thunderbird \
45+
--hash true \
46+
--config-ng "${srcdir}/config.toml" \
47+
--desktop-file "${srcdir}/thunderbird.desktop"
6448
}
6549

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
# This is a Portable configuration, using TOML 1.1.0
2+
# For syntax, check https://toml.io/en/v1.1.0
3+
4+
# The metadata section contains information of your sandbox.
5+
[metadata]
6+
# This is your Application ID, avoid conflict. Should be a reversed DNS name.
7+
# If the author's DNS domain name contains hyphen/minus characters ('-'), which are not allowed in D-Bus interface names, they should be replaced by underscores. If the DNS domain name contains a digit immediately following a period ('.'), which is also not allowed in interface names), the interface name should add an underscore before that digit. For example, if the owner of 7-zip.org defined an interface for out-of-process plugins, it might be named org._7_zip.Plugin.
8+
appID = "org.mozilla.thunderbird"
9+
10+
# This is a friendly name of an application. It should only contain ASCII characters and not spaces.
11+
friendlyName = "Thunderbird"
12+
13+
# This is the state directory of your application, relative to "XDG_DATA_HOME".
14+
stateDirectory = "Thunderbird_Data"
15+
16+
# The exec section defines how the underlying process is started.
17+
[exec]
18+
# target defines the program to start.
19+
target = "/usr/lib/thunderbird/thunderbird"
20+
21+
# The processes section defines how Portable tracks tasks.
22+
[processes]
23+
# Watch for spawned commands. When all of them exits, automatically terminate the sandbox. Defaults to true.
24+
track = true
25+
26+
# The system section controls general permission.
27+
[system]
28+
# Whether or not an application can call Inhibit Portal to prevent automatic suspend. Defaults to false.
29+
inhibitSuspend = false
30+
31+
# Whether or not an application can call GlobalShortcuts Portal to request shortcuts registration. Defaults to false.
32+
globalShortcuts = false
33+
34+
# Whether or not to expose all GPUs and prefer discrete graphics card. By default, Portable blocks any GPU except the integrated one to improve user experience and power consumption on hybrid systems.
35+
gameMode = false
36+
37+
# Inhibit suspend and idle on behalf of applications. Requires system.inhibitSuspend being true
38+
inhibitOnBehalf = false
39+
40+
# The network section defines behaviour of Portable's network firewall. Requires netsock for filtering.
41+
[network]
42+
# Whether or not an application can use network interfaces. Defaults to true.
43+
enable = true
44+
45+
# Whether or not to enable filtering on network packets. Defaults to false.
46+
filter = false
47+
48+
# Destinations to deny. Only effective if netsock is running and listening on /run/netsock/control.sock. IP literals are resolved directly, while strings are mapped to IP addresses by the system resolver. A special string of "private" means private IPs. Note that :53 is allowed regardless to avoid breaking DNS. Defaults to none, meaning sandbox can connect to whatever address.
49+
filterDest = ["private"]
50+
51+
# The privacy section defines several device exposure preference. By default, Portable does not allow apps to see physical devices. This includes discrete GPUs when gameMode is off, input devices, cameras, and all other PCI devices.
52+
[privacy]
53+
# When false, prevents application from connecting to X server on Wayland. Defaults to true.
54+
x11 = false
55+
56+
# When false, prevents application from connecting to legacy notifications endpoint. Defaults to true.
57+
classicNotifications = true
58+
59+
# When true, exposes camera devices in the sandbox. Defaults to false.
60+
cameras = false
61+
62+
# When true, allows application to connect to PipeWire server. Note that a proxy is set up to prevent privileged actions. Defaults to false.
63+
pipeWire = false
64+
65+
# When true, allows application to receive Input events, particularly useful for Games. Defaults to false.
66+
input = false
67+
68+
# Do not use. May break apps.
69+
[advanced]
70+
zink = false
71+
qt5Compat = true
72+
mprisName = []
73+
trayWake = false
74+
kDEStatus = true
75+
flatpakInfo = true
76+
77+
# Enables landlock for additional protection, breaks many apps.
78+
landlock = true

archlinuxcn/thunderbird-portable/portable-config

Lines changed: 0 additions & 30 deletions
This file was deleted.

archlinuxcn/thunderbird-portable/thunderbird.sh

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)