summarylogtreecommitdiffstats
path: root/snapd.install
diff options
context:
space:
mode:
authorMaciek Borzecki2017-11-08 08:20:06 +0100
committerMaciek Borzecki2017-11-17 07:47:38 +0100
commit198d3e60baca1808dc53a9ddacc6a4e51721a1a1 (patch)
tree7e5a0d8af379d0ae876fdfd324913e0b37a481a3 /snapd.install
downloadaur-198d3e60baca1808dc53a9ddacc6a4e51721a1a1.tar.gz
snapd-git: initial packaging of -git package, based on upstream arch packaging
Arch packaging updates as compared to repo version: - convert the package to *-git (i.e. built from VCS) - update conflicts to fully replace community repo snapd package - update build to properly set up CGO_CFLAGS, CGO_CPPFLAGS, CGO_CXXFLAGS, CGO_LDFLAGS to include settings configured in /etc/makepkg.conf - use `go build` rather than `go install` in build step to prevent go from trying to install *.a in system locations - enable verbose build (go build -x -v) - refactor package() - do not hand install support files (systemd units, DBus service) - cleanup unused ubuntu core files - snapd environment file is now at /etc/default/snapd - package snap-exec binary - symlink /var/lib/snapd/snap to /snap so that --classic confinement snaps work Notes: `run-checks --unit` errors are currently masked until the upstream figures out integration of Arch into their CI workflow. Signed-off-by: Maciek Borzecki <maciek.borzecki@gmail.com>
Diffstat (limited to 'snapd.install')
-rw-r--r--snapd.install43
1 files changed, 43 insertions, 0 deletions
diff --git a/snapd.install b/snapd.install
new file mode 100644
index 000000000000..fd43f4f25caf
--- /dev/null
+++ b/snapd.install
@@ -0,0 +1,43 @@
+## arg 1: the new package version
+post_install() {
+ echo
+ echo 'To use snapd start/enable the snapd.socket'
+ echo
+ echo 'If you want your apps to be automatically updated'
+ echo 'from the store start/enable the snapd.refresh.timer'
+ echo
+ echo 'NOTE: Desktop entries show up after logging in again'
+ echo ' or rebooting after snapd installation'
+ echo
+ echo 'For more informations, see https://wiki.archlinux.org/index.php/Snapd'
+}
+
+_stop_services() {
+ /usr/bin/systemctl stop \
+ snapd.service \
+ snapd.socket \
+ snapd.refresh.timer \
+ snapd.refresh.service > /dev/null 2>&1
+}
+
+pre_remove() {
+ _stop_services
+}
+
+pre_upgrade() {
+ _stop_services
+}
+
+post_upgrade() {
+ /usr/bin/systemctl daemon-reload > /dev/null 2>&1 || :
+
+ # restore the services after an upgrade
+ if /usr/bin/systemctl -q is-enabled snapd.socket > /dev/null 2>&1; then
+ /usr/bin/systemctl start snapd.socket > /dev/null 2>&1 || :
+ fi
+ if systemctl -q is-enabled snapd.refresh.timer > /dev/null 2>&1; then
+ systemctl start snapd.refresh.timer > /dev/null 2>&1 || :
+ fi
+}
+
+# vim:set ts=2 sw=2 et: