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