add local overlay

This commit is contained in:
Anton Schubert 2016-05-08 14:09:54 +02:00
commit 4883c62e9a
68 changed files with 2719 additions and 0 deletions

View file

@ -0,0 +1,64 @@
# Copyright 2014-2015 Jonathan Vasquez <jvasquez1011@gmail.com>
# Distributed under the terms of the GNU General Public License v2
EAPI=5
inherit user systemd
GITHUB_USER="syncthing"
GITHUB_REPO="syncthing"
GITHUB_TAG="${PV}"
NAME="syncthing"
DESCRIPTION="Open Source Continuous File Synchronization"
HOMEPAGE="http://syncthing.net/"
SRC_URI="https://github.com/${GITHUB_USER}/${GITHUB_REPO}/archive/v${GITHUB_TAG}.tar.gz -> ${P}.tar.gz"
RESTRICT="mirror"
LICENSE="MPL-2.0"
SLOT="0"
KEYWORDS="~x86 ~amd64"
DEPEND=">=dev-lang/go-1.4.2"
S="${WORKDIR}"
configDir="~/.config/syncthing"
config="${configDir}/config.xml"
src_install() {
# Create directory structure recommended by SyncThing Documentation
# Since Go is "very particular" about file locations.
local newBaseDir="src/github.com/${PN}"
local newWorkDir="${newBaseDir}/${PN}"
mkdir -p "${newBaseDir}"
mv "${P}" "${newWorkDir}"
cd "${newWorkDir}"
# Build SyncThing ;D
go run build.go -version v${PV} -no-upgrade=true
# Copy compiled binary over to image directory
dobin "bin/${PN}"
# Install the OpenRC init/conf files
doinitd "${FILESDIR}/init.d/${NAME}"
doconfd "${FILESDIR}/conf.d/${NAME}"
# Install the systemd service files
local systemdServiceFile="etc/linux-systemd/system/${PN}@.service"
systemd_dounit "${systemdServiceFile}"
local systemdUserFile="etc/linux-systemd/user/${PN}.service"
systemd_dounit "${systemdUserFile}"
}
pkg_postinst() {
elog "In order to be able to view the Web UI remotely (from another machine),"
elog "edit your ${config} and change the 127.0.0.1:8080 to 0.0.0.0:8080 in"
elog "the 'address' section. This file will only be generated once you start syncthing."
}