From 925e837119e2d523797e821cd6f850d2088da79a Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 12 Nov 2016 17:36:57 +0000 Subject: add snapcraft --- app-emulation/snapd/Manifest | 1 + app-emulation/snapd/snapd-2.15.2.ebuild | 63 ++++++++++++++++++++++++ sys-apps/snap-confine/Manifest | 1 + sys-apps/snap-confine/snap-confine-1.0.43.ebuild | 33 +++++++++++++ 4 files changed, 98 insertions(+) create mode 100644 app-emulation/snapd/Manifest create mode 100644 app-emulation/snapd/snapd-2.15.2.ebuild create mode 100644 sys-apps/snap-confine/Manifest create mode 100644 sys-apps/snap-confine/snap-confine-1.0.43.ebuild 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 +} diff --git a/sys-apps/snap-confine/Manifest b/sys-apps/snap-confine/Manifest new file mode 100644 index 00000000..8739c73d --- /dev/null +++ b/sys-apps/snap-confine/Manifest @@ -0,0 +1 @@ +DIST snap-confine-1.0.43.tar.gz 212433 SHA256 73920a610e7815eb395d4e5dc4879627821e7ac197624970009895aaffcc8962 SHA512 e6146cee995533cd0996902e29b5b70066e238f1c122e6d486d0eeddd32168b2bba58fa546c68d2d24d28898d46b8a156f02f62976de0cd4bf0ad731182db23f WHIRLPOOL cda64992b2d2e5f1f7eb164dc753ea16d998df3e7a6493c4b7901c511d315b23e4a444363c028ab9a0298dd87a8df65d7da409a38b61361f8e74352d6540e417 diff --git a/sys-apps/snap-confine/snap-confine-1.0.43.ebuild b/sys-apps/snap-confine/snap-confine-1.0.43.ebuild new file mode 100644 index 00000000..4bec088d --- /dev/null +++ b/sys-apps/snap-confine/snap-confine-1.0.43.ebuild @@ -0,0 +1,33 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=6 + +DESCRIPTION="The snap-confine program helps to launch snappy applications" +HOMEPAGE="http://snapcraft.io/" +SRC_URI="https://github.com/snapcore/${PN}/releases/download/${PV}/${P}.tar.gz" +RESTRICT="mirror" +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="amd64" + +DEPEND="dev-python/docutils + sys-devel/autoconf + sys-devel/automake + sys-devel/gcc + sys-devel/make + virtual/libudev" + +src_configure() { + econf --disable-apparmor +} + +src_compile() { + emake || die "emake failed" +} + +src_install() { + emake DESTDIR="${D}" install + dodoc README.md PORTING +} -- cgit v1.2.3