1name : snapd
2version : '2.30'
3homepage : https://snapcraft.io/
4release : 12
5source :
6- https://solus-project.com/sources/golang-revendor/snapd-2.30.tar.xz : 3505eb4c73bc6ddebad84a349d45aa7b9da68fc5bcfa6ffccf2b295c82427fe7
7license : GPL-3.0
8component : desktop.util
9summary : The snapd and snap tools enable systems to work with .snap files
10description: |
11Universal applications support - .snap files allow you to run Snap packages
12on any Linux distribution, with full sandboxing and additional security.
13builddeps :
14- pkgconfig(glib-2.0)
15- pkgconfig(libapparmor)
16- pkgconfig(libseccomp)
17- pkgconfig(libudev)
18- pkgconfig(libcap)
19- golang
20- python-docutils
21- xfsprogs-devel
22rundeps :
23- libselinux
24- squashfs-tools
25setup : |
26# Set up the version from packaging
27pushd src/github.com/snapcore/snapd
28./mkversion.sh "$version"
29
30%apply_patches
31
32# Now configure C portion
33pushd cmd
34%autogen
35%configure --enable-nvidia-biarch
36build : |
37commands=(snap snapctl snapd snap-exec snap-seccomp)
38for snapcracklepop in ${commands[@]}; do
39GOPATH="`pwd`" go install -v github.com/snapcore/snapd/cmd/$snapcracklepop
40done
41# snap-update-ns needs to be static.
42GOPATH="`pwd`" go build -o bin/snap-update-ns --ldflags '-extldflags "-static"' -v github.com/snapcore/snapd/cmd/snap-update-ns
43%make -C src/github.com/snapcore/snapd/cmd
44install : |
45# C portions
46%make_install -C src/github.com/snapcore/snapd/cmd
47
48# Golang binaries
49bincommands=(snap snapctl)
50dcommands=(snapd snap-exec snap-update-ns snap-seccomp)
51for tgtbin in ${bincommands[@]} ; do
52install -m 00755 bin/$tgtbin $installdir/usr/bin/.
53done
54for tgtbin in ${dcommands[@]} ; do
55install -m 00755 bin/$tgtbin $installdir/%libdir%/$package/.
56done
57
58# Move into the base dir so we can install stuff
59pushd src/github.com/snapcore/snapd
60
61# Completion
62install -m 00644 data/info $installdir/%libdir%/$package/info
63rm -vf $installdir/usr/bin/ubuntu-core-launcher
64
65# Polkit
66install -m 00644 -D data/polkit/io.snapcraft.snapd.policy $installdir/usr/share/polkit-1/actions/io.snapcraft.snapd.policy
67
68# systemd
69%make_install -C data/systemd \
70LIBEXECDIR="%libdir%" \
71SYSTEMDSYSTEMUNITDIR="%libdir%/systemd/system"
72
73# need tmpfiles to construct the void dir, the package is not allowed to
74# ship with it in Solus
75install -D -m 00644 $pkgfiles/snapd.tmpfiles $installdir/%libdir%/tmpfiles.d/snapd.conf
76rm -rf $installdir/var
77
78# You have snapd installed, so you wanna use it. Vendor-enable the .socket
79install -d -m 00755 $installdir/%libdir%/systemd/system/sockets.target.wants
80ln -sv ../snapd.socket $installdir/%libdir%/systemd/system/sockets.target.wants/snapd.socket
81
82# empty usr/src directory (i.e. linux-lts-headers linux-current-headers) to
83# satisfy bindmounts in confinement
84install -D -d -m 00755 $installdir/usr/src
85
86# Ensure we can integrate snapd in the environment
87install -D -m 0644 $pkgfiles/70-snapd.sh $installdir/usr/share/defaults/etc/profile.d/70-snapd.sh
88
89# bash completion
90install -D -m 00644 data/completion/snap $installdir/usr/share/bash-completion/completions/snap
91install -m 00644 data/completion/complete.sh $installdir/%libdir%/snapd/complete.sh
92install -m 00644 data/completion/etelpmoc.sh $installdir/%libdir%/snapd/etelpmoc.sh