summaryrefslogtreecommitdiff
path: root/app-emulation/snapd
diff options
context:
space:
mode:
Diffstat (limited to 'app-emulation/snapd')
-rw-r--r--app-emulation/snapd/Manifest1
-rw-r--r--app-emulation/snapd/snapd-2.15.2.ebuild63
2 files changed, 64 insertions, 0 deletions
diff --git a/app-emulation/snapd/Manifest b/app-emulation/snapd/Manifest
new file mode 100644
index 00000000..fd2e40df
--- /dev/null
+++ b/app-emulation/snapd/Manifest
@@ -0,0 +1 @@
+DIST snapd-2.15.2.tar.gz 684471 SHA256 d9c8c098f74c7ba9215ca0f0bf1083e15db2e150b0d1ee9b11d664c244f9b4cb SHA512 1b05fc66ec2f70e45bebdf280e3270401e268da3691e8b39eaa4f594b29e583342d065bd70a7f6678c13793c0f374944b35647b53e93fb9832367139b61411bb WHIRLPOOL 2c9fa5c6f0404e086cee16c9337e415b6a0e5faa7cdc4a421e12bac174c2be38b7d272c1707323c3ebc34ec6f109b69f368f2ee7cdba6b2e51d60e2332047106
diff --git a/app-emulation/snapd/snapd-2.15.2.ebuild b/app-emulation/snapd/snapd-2.15.2.ebuild
new file mode 100644
index 00000000..5d42f6e6
--- /dev/null
+++ b/app-emulation/snapd/snapd-2.15.2.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+inherit golang-vcs-snapshot
+inherit systemd
+
+EGO_PN=github.com/snapcore/snapd
+EGO_SRC=github.com/snapcore/snapd/...
+EGIT_COMMIT="181f66ac30bc3a2bfb8e83c809019c037d34d1f3"
+
+DESCRIPTION="Service and tools for management of snap packages"
+HOMEPAGE="http://snapcraft.io/"
+SRC_URI="https://github.com/snapcore/${PN}/archive/${PV}.tar.gz -> ${PF}.tar.gz"
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64"
+RESTRICT="mirror"
+RDEPEND="sys-apps/snap-confine
+ sys-fs/squashfs-tools:*"
+DEPEND="${RDEPEND}
+ dev-vcs/git
+ dev-vcs/bzr"
+src_compile() {
+ cp -sR "$(go env GOROOT)" "${T}/goroot" || die
+ rm -rf "${T}/goroot/src/${EGO_SRC}" || die
+ rm -rf "${T}/goroot/pkg/$(go env GOOS)_$(go env GOARCH)/${EGO_SRC}" || die
+ export GOROOT="${T}/goroot"
+ export GOPATH="${WORKDIR}/${P}"
+ cd src/${EGO_PN} && ./get-deps.sh
+ go install -v "${EGO_PN}/cmd/snapd" || die
+ go install -v "${EGO_PN}/cmd/snap" || die
+}
+
+src_install() {
+ export GOPATH="${WORKDIR}/${P}"
+ exeinto /usr/bin
+ dobin "$GOPATH/bin/snap"
+ exeinto /usr/lib/snapd/
+ doexe "$GOPATH/bin/snapd"
+ cd "src/${EGO_PN}" || die
+ systemd_dounit debian/snapd.{service,socket}
+ systemd_dounit debian/snapd.refresh.{service,timer}
+ sed -i -e 's/RandomizedDelaySec=/#RandomizedDelaySec=/' debian/snapd.refresh.timer
+ systemd_dounit debian/snapd.frameworks.target
+ systemd_dounit debian/snapd.frameworks-pre.target
+ dodir /etc/profile.d/
+ echo 'PATH=$PATH:/snap/bin' > ${D}/etc/profile.d/snapd.sh
+}
+
+pkg_postinst() {
+ systemctl enable snapd.socket
+ systemctl enable snapd.refresh.timer
+}
+
+pkg_postrm() {
+ systemctl disable snapd.service
+ systemctl stop snapd.service
+ systemctl disable snapd.socket
+ systemctl disable snapd.refresh.timer
+}