1
0
mirror of synced 2024-12-22 21:00:20 +01:00

added files for syncthing ebuild

This commit is contained in:
Horea Christian 2015-07-22 03:26:06 +02:00
parent c202354dc8
commit f850ce283e
2 changed files with 21 additions and 31 deletions

View File

@ -1 +1,7 @@
DIST syncthing-linux-amd64-v0.11.16.tar.gz 4387631 SHA256 5ed60fa10c45b8c40436cd79d613111f74d06a8df5273f49a2c2cbcd7144409c SHA512 96a274da5e591ae500f4187e9798d02a5532ed5c8d13919a0da9105560cd053a448cb77f2c30e794626c41c8cf50c71f6b25e225234af6e2a79cc3ee309b087d WHIRLPOOL 0c1ac761eccc1afd77eb7b6c3c1abcd0df264df7aa798cae765f5a2296b9f6df21b55e76d94c4cd6227c54f0276e52779ec62f40f2c7b0ee7fbea8ce0a4f5dd7
AUX conf.d/syncthing 484 SHA256 bb6f20906f904dd3cb07df3453a94b105782bb10963abe2862ff6c4b31d5cffb SHA512 849f1aae8b345ee952cccff27ac8364afe2739ec4b6128c7e77794170f4ca60c5ea4a15e7e290fc06e3457c09522695e03662b06c6dd3309748f4a0609338c18 WHIRLPOOL a819d3fcafb9de2b2230a9b899e99adc33a8d7f3bd2ae6ab03717dea18598da3ae57590c9f2ee33b17b93eded3ae6f7b00af9f9c7aacf876d9ab47ac51c6eb65
AUX init.d/syncthing 848 SHA256 a1ae52a447d45b398c2c7c307f8e336fb41f6b81a373590e3f54755de4aebef5 SHA512 2d1bea328cd4b3f92b3071c6bff3493af6354224b9e39c195cea266d40c2d649fa4da77114e674266626a96e7ab2acc40e0c221603c0f7db1d4b32d03000f994 WHIRLPOOL 61ec40011e86bcbcef5b64faa281daeb74db9b0087023693b832184374c838e3e9829ba45f8c448ecc6ef5a3ef1e201ec494ae8d6eb7584f5072999297b8b6a8
DIST syncthing-0.11.11.tar.gz 3217356 SHA256 ed5606305c7f365dffc364b1f72a9a521a99341ddc0cfa75e89430a7558da779 SHA512 2b79b4dcb101322370b9fd0d06e1da3f48b4622dd815884aa2ea942527e6c2937afe8ddf3d036aff05cf7f094eb710a3eb838af4ef511f6e43b37230a218f580 WHIRLPOOL 45003a21c58d959e290fca8b529ae63917496b4e6b0af63dd2d8108a57685e4fa1242133620dbebca5956ae318d793d5462273e1fbffd992f2e1453b129bbb58
DIST syncthing-0.11.16.tar.gz 3375037 SHA256 1a71bfd5849323adbcd71859d853b3c0e313e314997a569128eb2dd659d4d055 SHA512 98f9cc91e6fb1f092afe901fb74a2c54588573385b089ae063e52695184e94c5bf6dc693f4a3ceb6dc04a95e9fdc4fdf1e5d598f4ab9fb93aee2b23e2c85a2ab WHIRLPOOL 0899d57f7a8eb0186271e82f269bb8f2bf5d63f68e4c7259564bfcdf2b4a2245e7d8d3aec4ecd3696382c9e5ce53bab70d25b4bfcf3314c7cfb7a9e3770d79e2
EBUILD syncthing-0.11.11.ebuild 2009 SHA256 5fe833337482c649b1d5ee9517c793940c81198e2b0fbaa38166b5dcd6dc7a32 SHA512 e024e56c6425131c5a8f44afed33818278ad91c05e30e5ede39e74d201c165457da1204204fdd81f45fba53943c957f17c3b2e4a193a505811ceeb914daebf3c WHIRLPOOL 816e49d151a3f43b1706b8cd0102e4da7e641641522d3c62cfaa61227e5e2d952ebea1b4eefbff5943d43b477c6c4b14c3c4383459903b3b961573ee58a138db
EBUILD syncthing-0.11.16.ebuild 1784 SHA256 3a71a412fef09fa84eaf69bfc9184238a8951d8e13e50e4881ac2918193c2936 SHA512 4a726e381967f82788624588278802f07ebd50c9d77fb185e8cc19dae9bebbd0abfa89305896b01d40013894d09710e2b49887bbe070050a2542354ce5c5905c WHIRLPOOL 38e56e1ae1c380477f9e248bf134b4a1ef3335a69747b5dc6a40dd2e005c96f272b0aae62d98ab87e0af510e6ab9a372764626eb15b9d969c38dd7029cfc07df
MISC metadata.xml 246 SHA256 1f13fca32620fcc919da81fb9aaa364149cb466bcd86f84f9b20543c3df586b9 SHA512 2e8003ef9d9e5dacc8cb6ebfb7cb6bf605385344fa4db7513aabf1bbf7c7e9052bae47b2faccbd727ccb3d6fb1da9e1881c3d9b711ff23d9d6ed035c0c53f639 WHIRLPOOL 79b333969e70df2668a774d99e5c6c3c6dae462a3c2bc5db4c4f8cbd7adb5d8ea04287d84828353be870d67459b35654e837331938eb920bff5e052d6452c34d

View File

@ -1,4 +1,4 @@
# Copyright 2014 Jonathan Vasquez <jvasquez1011@gmail.com>
# Copyright 2014-2015 Jonathan Vasquez <jvasquez1011@gmail.com>
# Distributed under the terms of the GNU General Public License v2
EAPI=5
@ -13,20 +13,18 @@ NAME="syncthing"
DESCRIPTION="Open Source Continuous File Synchronization"
HOMEPAGE="http://syncthing.net/"
SRC_URI="
amd64? ( https://github.com/${GITHUB_USER}/${GITHUB_REPO}/releases/download/v${GITHUB_TAG}/syncthing-linux-amd64-v${PV}.tar.gz )"
#https://github.com/$//archive/v${GITHUB_TAG}.tar.gz -> ${P}.tar.gz
#https://github.com/{GITHUB_USER}/${GITHUB_REPO}/releases/download/v${GITHUB_TAG}/syncthing-linux-amd64-v${PV}.tar.gz
SRC_URI="https://github.com/${GITHUB_USER}/${GITHUB_REPO}/archive/v${GITHUB_TAG}.tar.gz -> ${P}.tar.gz"
RESTRICT="mirror"
LICENSE="GPL-3+"
LICENSE="MPL-2.0"
SLOT="0"
KEYWORDS="~amd64"
KEYWORDS="~x86 ~amd64"
DEPEND=">=dev-lang/go-1.3.0"
S="${WORKDIR}"
configDir="/etc/${PN}"
configDir="~/.config/syncthing"
config="${configDir}/config.xml"
src_install() {
@ -44,36 +42,22 @@ src_install() {
go run build.go -version v${PV} -no-upgrade=true
# Copy compiled binary over to image directory
dobin "${WORKDIR}/syncthing-linux-amd64-v${PV}/syncthing"
dobin "bin/${PN}"
# Install the OpenRC init file
# Install the OpenRC init/conf files
doinitd "${FILESDIR}/init.d/${NAME}"
doconfd "${FILESDIR}/conf.d/${NAME}"
# Install the systemd unit file
systemd_newunit "${FILESDIR}/${PN}_.service" "${PN}@.service"
#Install the systemd user unit file
systemd_douserunit "${FILESDIR}/${PN}.service"
local systemdServiceFile="etc/linux-systemd/system/${PN}@.service"
systemd_dounit "${systemdServiceFile}"
}
pkg_postinst() {
if [[ ! -d "${configDir}" ]]; then
mkdir "${configDir}"
fi
if [[ ! -e "${config}" ]]; then
einfo "Generating default configuration file ..."
syncthing -generate "${configDir}"
# Remove 'default' folder (it has an incorrect path anyway)
sed -i '/<folder id="default"/,/<\/folder>/d' "${config}"
fi
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."
elog ""
elog "After checking your config, run 'rc-config start ${PN}' to start the application."
elog "Point your browser to the address above to access the Web UI."
elog "the 'address' section. This file will only be generated once you start syncthing."
elog ""
elog "Modify the /etc/conf.d/${PN} file and set the user/group/ and syncthing home directory"
elog "before launching. Afterwards, you can start ${PN} by doing a: rc-config start ${PN}"
}