diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2018-07-14 21:03:06 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2018-07-14 21:03:06 +0100 |
commit | 8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch) | |
tree | 7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /app-misc/dnetc | |
parent | 30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff) |
gentoo resync : 14.07.2018
Diffstat (limited to 'app-misc/dnetc')
-rw-r--r-- | app-misc/dnetc/Manifest | 15 | ||||
-rw-r--r-- | app-misc/dnetc/dnetc-2.9107.516.ebuild | 93 | ||||
-rw-r--r-- | app-misc/dnetc/dnetc-2.9108.517.ebuild | 93 | ||||
-rw-r--r-- | app-misc/dnetc/dnetc-2.9109.518.ebuild | 93 | ||||
-rw-r--r-- | app-misc/dnetc/dnetc-2.9110.519.ebuild | 93 | ||||
-rw-r--r-- | app-misc/dnetc/dnetc-2.9110.519b.ebuild | 95 | ||||
-rw-r--r-- | app-misc/dnetc/files/dnetc.confd | 18 | ||||
-rw-r--r-- | app-misc/dnetc/files/dnetc.initd | 88 | ||||
-rw-r--r-- | app-misc/dnetc/metadata.xml | 11 |
9 files changed, 599 insertions, 0 deletions
diff --git a/app-misc/dnetc/Manifest b/app-misc/dnetc/Manifest new file mode 100644 index 000000000000..f88f0cecd08b --- /dev/null +++ b/app-misc/dnetc/Manifest @@ -0,0 +1,15 @@ +AUX dnetc.confd 403 BLAKE2B e33eef2035a74a459202842a84164be35995232049ab8d1d2e47fb379dfe74f89597d7fdb15431e4953842a2b03dcd45e6b4354551509561d7d7ab43813fe128 SHA512 c088d9d02d55e3c99b3d6095487e061804bca1c571637d46a4234253d0ef8efe3ed22c93db2c48ad2e70223c96a3307c825d94114d87609bc764503b4f95e5ef +AUX dnetc.initd 2013 BLAKE2B 2da278fa7d03c7d23a9a64f218f911c4eddb9141519b488dae5d8f2123136f9d328fbcf2ff9fe61cdccb53c940f38b389b81911fe108d7a58d77b58f09f147aa SHA512 c3f23a7913331c318042517a517e29679a585bbf92f4da91aada528cbfe60f068959b2b7804658b14597734ddea23c6f2881cd8a150be8f5d4bf69c873214d29 +DIST dnetc516-linux-sparc-v7.tar.gz 881743 BLAKE2B 7c2c4a258e1c82dd9a1f4d6271df3b4ee46eaafc765bf7c054a53ddc9625f64dcdfcd86a51285f81ccf343a6086cc9ff404fccd0cd9c8fea2554d69fe17f618e SHA512 d70410773a14fe7237e0c542f45ab69f840dfd484622923da3abf723ffacf82bf94ecaa1d2089ab9326121ed4b3562ace7b267ed57bbf2c0971793b25fd30958 +DIST dnetc517-linux-amd64.tar.gz 645416 BLAKE2B a6181c82e7bdb8995930b3c93c88dd588f707ea6429e4f7f27961928129423be571f0c63e7aa5d5d9a8e5e3687a8bd54e6dc6835f5317273aa3f99ee863e8320 SHA512 b22b59af2352a95156ea4b584f48d82e4b64080130d922bbb1797b2c62f7c401ec1263f2f0bd57103134f8fc76ef41a7e09d7da083ef0b46c44be4239005c21b +DIST dnetc517-linux-x86-elf-uclibc.tar.gz 676398 BLAKE2B 9edfa3f11b837841b362dd81bdd9a39882b6bd45942f11f6c8ebde4966351a0ea4c003eb27a36c2fe187034571d48a5d851d5931dc6121196f2097a22f9a1c30 SHA512 7b56fa8c6819fd7060612c13c8fb17ca1e949abbca965b7599bb072751acd1d0e95f1a90fb67172c6d406b54e0c52549582489802e538670bdb6d12f8354e2a7 +DIST dnetc518-linux-amd64.tar.gz 644073 BLAKE2B 6e33120d54fab253ceee8d26ea1eb266ea10f69383a7735637ca9e905e98f51cd0052904bb695a6989a5a3b8996d6cad8d2b6807bbd88d7abedcdef8566a39d3 SHA512 95ad5144fbb1356806f6fd6f499891b36a0ea7c75794ada40cba9146c830adfd20044d8d3f3689186c9317b477aa95a6aae5d711c19534059b06b5d33367d785 +DIST dnetc518-linux-ppc-uclibc.tar.gz 717889 BLAKE2B afc3cfaa3700c03379a10fe72c5939f09ee4bdfb3dd4ea55195ec31a85d1a5797a99abe15acfcb87c081166b6c311913be33f2105f39e212e5fb2060685ad34e SHA512 c0d7592b1a5c98001355e71a1d31bc67bfef6b4c5f73c8e200717424ae4ea5c62558c413753e079f4e0b6bacdb921b395f46c168673e82049dcb69a0512d11eb +DIST dnetc519-linux-x86-elf-uclibc.tar.gz 676925 BLAKE2B f6a5d9bc1a7f1608079a9212c38a1b2854919ce3c0c9c3423c4f42f09976d90c418de966ba8ec86d1ddd1cfac4e40cf090e898297ac1146d2e9efc93bcd17e32 SHA512 87519867e8e993d7b6520d73133196d34391d0694d8d8bbc372bac4e0b21ceb1a22fcd000bd2f29841695ee7232c4584eb1b19a690f723320df023c52a581395 +DIST dnetc519b-linux-amd64.tar.gz 648333 BLAKE2B 54d787d5e9a98563bba1a0cc62f70900f0fa39becf6f48a66ae888e0ce0f1f2c64a79fc6c6b3fae724ed244e3f0286dc0f266332d851347b982bffcd1807696f SHA512 ea7899772ee8c5fbfbe96b6ec69b1a3237fe5ae96b17bb7e11e387fb833b471f3cce8809cf3c9987dfe33c7ca7082db560c36898094ace3e547077b7a5afc324 +EBUILD dnetc-2.9107.516.ebuild 2690 BLAKE2B 1d0864fcb4bc8c6d2e15bbb2521ecb4b6e7ce554f8253e012338de46b827e940518252cf1e4f2325b4d261f230c671930c84af93295041357835c8c4c5511ce7 SHA512 c052c46f1aa734c8ac3a0dc92326e7c9ba6171b82c8e874c253515477066ee0ddbc2145497fb2dd56992affa4afdcfc6c5f4c83fed8c8c78cee1649d044bafa3 +EBUILD dnetc-2.9108.517.ebuild 2682 BLAKE2B cf6f8b44cebb407442779860387614e2ec2616ab8239e1abd30e82868820a93d9ed7887204451d5735af313f004716740cd71503de50d14aa94af66a3abb0c51 SHA512 7134f249034c68baaca4f2cc9987de67faa938c3cbdea5bd969d7ec98dec9404c775832445cbf6b1febec356c5ce08bd284100902abbccd821d6bc1fedd04f25 +EBUILD dnetc-2.9109.518.ebuild 2684 BLAKE2B e846b3ec49427492731eb9af765c8098ae396301f76eb3836ec549a1737b1f59a647c13c550c712eb8ca9b3c0fd0d9e2bdad57705800c89d7af6e7f0316eee7e SHA512 8e9936bb3bca2fb51e6671984861d58aa7d1998251f25245239aec14d36be71df2d973c9109a5bb5ac5ba8adb7d024b7bffb49e63069ff2ab5b265cf9b03d13b +EBUILD dnetc-2.9110.519.ebuild 2684 BLAKE2B d44e8e92cae09536f8cbc69d5e308d436555677b30445dcb4404db9184bec4695f8e43a3706110bfdbcee44cecc0335ee356d777f062a9fca04033b79c694e16 SHA512 c267a5f62af380e4b6e8f9515d8b4fa046fffc5302fb6d47dc850bef3a882bd458416058b548ed867f4a6c4b811181293bd4c058fa0a20cdc8ca619982021567 +EBUILD dnetc-2.9110.519b.ebuild 2651 BLAKE2B 476920e8f442f3f14d813a335655c913c603700d3599cf6e9270c356b5168514b46063dfcfbd30dabe0dc552917fb35b5c4335719232a30f8779f2e72c85b858 SHA512 3c1a3120dd66cdabc6e41951e8fb6721449c094aa60448d151eacd20f440eb769f11faed0e724dc1b95d6629656d809b40949e85c0db8ff5bc003f8b5c5e6ade +MISC metadata.xml 357 BLAKE2B 10b84b6b4353d0dae2f48deae6622ca345c7723641b97ddd5e58e7ce7bbe438a065f3ac528a946bd99e089a45a8c2274417a51b05170d116a3fbd6e4bbb921a2 SHA512 6986582029e81ab7b8eec22c707c03c1996d0837ca9b4e7a0c31782be3f9c59a7d89c53980fdac00bb2a49555a774933704ac3fe390785840d072ac7ac9ac33d diff --git a/app-misc/dnetc/dnetc-2.9107.516.ebuild b/app-misc/dnetc/dnetc-2.9107.516.ebuild new file mode 100644 index 000000000000..bebbc0923b3b --- /dev/null +++ b/app-misc/dnetc/dnetc-2.9107.516.ebuild @@ -0,0 +1,93 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=2 +inherit user + +MAJ_PV=${PV:0:6} +MIN_PV=${PV:7:9} + +DESCRIPTION="distributed.net client" +HOMEPAGE="http://www.distributed.net" +#SRC_URI_x86="x86? ( http://http.distributed.net/pub/dcti/v${MAJ_PV}/dnetc${MIN_PV}-linux-x86-elf-uclibc.tar.gz )" +#SRC_URI_amd64="amd64? ( http://http.distributed.net/pub/dcti/v${MAJ_PV}/dnetc${MIN_PV}-linux-amd64.tar.gz )" +#SRC_URI_ppc="ppc? ( http://http.distributed.net/pub/dcti/v${MAJ_PV}/dnetc${MIN_PV}-linux-ppc-uclibc.tar.gz )" +SRC_URI_sparc="sparc? ( http://http.distributed.net/pub/dcti/v${MAJ_PV}/dnetc${MIN_PV}-linux-sparc-v7.tar.gz )" +SRC_URI="${SRC_URI_amd64} ${SRC_URI_ppc} ${SRC_URI_x86} ${SRC_URI_sparc}" + +LICENSE="distributed.net GPL-2" +SLOT="0" +KEYWORDS="~sparc" # x86,amd64,ppc not available for this version +IUSE="" +RESTRICT="mirror" + +DEPEND="" +RDEPEND="net-dns/bind-tools" + +QA_PRESTRIPPED="opt/distributed.net/dnetc" + +S=${WORKDIR}/dnetc + +src_prepare() { + binname="" + if use amd64; then + binname=dnetc${MIN_PV}-linux-amd64 + elif use x86; then + binname=dnetc${MIN_PV}-linux-x86-elf-uclibc + elif use ppc; then + binname=dnetc${MIN_PV}-linux-ppc-elf-uclibc + fi + [[ -z "${binname}" ]] && die "Name of dnetc binary for this platform undefined" + mv "${binname}" dnetc || die "$binname binary is missing" +} + +src_install() { + exeinto /opt/distributed.net + doexe dnetc + + doman dnetc.1 + dodoc docs/CHANGES.txt docs/dnetc.txt docs/readme.* + + newinitd "${FILESDIR}"/dnetc.initd dnetc + newconfd "${FILESDIR}"/dnetc.confd dnetc + + keepdir /var/spool/dnetc +} + +pkg_preinst() { + if [ -e /opt/distributed.net/dnetc ] && [ -e /etc/init.d/dnetc ]; then + einfo "flushing old buffers" + source /etc/conf.d/dnetc + + if [ -e /opt/distributed.net/dnetc.ini ]; then + # use ini file + /opt/distributed.net/dnetc -quiet -ini /opt/distributed.net/dnetc.ini -flush + elif [ ! -e /opt/distributed.net/dnetc.ini ] && [ ! -z ${EMAIL} ]; then + # email adress from config + /opt/distributed.net/dnetc -quiet -flush -e ${EMAIL} + fi + + einfo "removing old buffer files" + rm -f /opt/distributed.net/buff* + fi + + enewgroup dnetc + enewuser dnetc -1 -1 /opt/distributed.net dnetc +} + +pkg_postinst() { + chown -Rf dnetc:dnetc /opt/distributed.net + chmod 0555 /opt/distributed.net/dnetc + + elog "To run distributed.net client in the background at boot:" + elog " rc-update add dnetc default" + elog "" + elog "Either configure your email address in /etc/conf.d/dnetc" + elog "or create the configuration file /opt/distributed.net/dnetc.ini" +} + +pkg_postrm() { + if [ -d /opt/distributed.net ]; then + elog "All files has not been removed from /opt/distributed.net" + fi +} diff --git a/app-misc/dnetc/dnetc-2.9108.517.ebuild b/app-misc/dnetc/dnetc-2.9108.517.ebuild new file mode 100644 index 000000000000..b8ef427428da --- /dev/null +++ b/app-misc/dnetc/dnetc-2.9108.517.ebuild @@ -0,0 +1,93 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=2 +inherit user + +MAJ_PV=${PV:0:6} +MIN_PV=${PV:7:9} + +DESCRIPTION="distributed.net client" +HOMEPAGE="http://www.distributed.net" +SRC_URI_x86="x86? ( http://http.distributed.net/pub/dcti/v${MAJ_PV}/dnetc${MIN_PV}-linux-x86-elf-uclibc.tar.gz )" +SRC_URI_amd64="amd64? ( http://http.distributed.net/pub/dcti/v${MAJ_PV}/dnetc${MIN_PV}-linux-amd64.tar.gz )" +#SRC_URI_ppc="ppc? ( http://http.distributed.net/pub/dcti/v${MAJ_PV}/dnetc${MIN_PV}-linux-ppc-uclibc.tar.gz )" +#SRC_URI_sparc="sparc? ( http://http.distributed.net/pub/dcti/v${MAJ_PV}/dnetc${MIN_PV}-linux-sparc-v7.tar.gz )" +SRC_URI="${SRC_URI_amd64} ${SRC_URI_ppc} ${SRC_URI_x86} ${SRC_URI_sparc}" + +LICENSE="distributed.net GPL-2" +SLOT="0" +KEYWORDS="amd64 x86" # ppc not available for this version +IUSE="" +RESTRICT="mirror" + +DEPEND="" +RDEPEND="net-dns/bind-tools" + +QA_PRESTRIPPED="opt/distributed.net/dnetc" + +S=${WORKDIR}/dnetc + +src_prepare() { + binname="" + if use amd64; then + binname=dnetc${MIN_PV}-linux-amd64 + elif use x86; then + binname=dnetc${MIN_PV}-linux-x86-elf-uclibc + elif use ppc; then + binname=dnetc${MIN_PV}-linux-ppc-elf-uclibc + fi + [[ -z "${binname}" ]] && die "Name of dnetc binary for this platform undefined" + mv "${binname}" dnetc || die "$binname binary is missing" +} + +src_install() { + exeinto /opt/distributed.net + doexe dnetc + + doman dnetc.1 + dodoc docs/CHANGES.txt docs/dnetc.txt docs/readme.* + + newinitd "${FILESDIR}"/dnetc.initd dnetc + newconfd "${FILESDIR}"/dnetc.confd dnetc + + keepdir /var/spool/dnetc +} + +pkg_preinst() { + if [ -e /opt/distributed.net/dnetc ] && [ -e /etc/init.d/dnetc ]; then + einfo "flushing old buffers" + source /etc/conf.d/dnetc + + if [ -e /opt/distributed.net/dnetc.ini ]; then + # use ini file + /opt/distributed.net/dnetc -quiet -ini /opt/distributed.net/dnetc.ini -flush + elif [ ! -e /opt/distributed.net/dnetc.ini ] && [ ! -z ${EMAIL} ]; then + # email adress from config + /opt/distributed.net/dnetc -quiet -flush -e ${EMAIL} + fi + + einfo "removing old buffer files" + rm -f /opt/distributed.net/buff* + fi + + enewgroup dnetc + enewuser dnetc -1 -1 /opt/distributed.net dnetc +} + +pkg_postinst() { + chown -Rf dnetc:dnetc /opt/distributed.net + chmod 0555 /opt/distributed.net/dnetc + + elog "To run distributed.net client in the background at boot:" + elog " rc-update add dnetc default" + elog "" + elog "Either configure your email address in /etc/conf.d/dnetc" + elog "or create the configuration file /opt/distributed.net/dnetc.ini" +} + +pkg_postrm() { + if [ -d /opt/distributed.net ]; then + elog "All files has not been removed from /opt/distributed.net" + fi +} diff --git a/app-misc/dnetc/dnetc-2.9109.518.ebuild b/app-misc/dnetc/dnetc-2.9109.518.ebuild new file mode 100644 index 000000000000..071accd0bdd1 --- /dev/null +++ b/app-misc/dnetc/dnetc-2.9109.518.ebuild @@ -0,0 +1,93 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=2 +inherit user + +MAJ_PV=${PV:0:6} +MIN_PV=${PV:7:9} + +DESCRIPTION="distributed.net client" +HOMEPAGE="http://www.distributed.net" +#SRC_URI_x86="x86? ( http://http.distributed.net/pub/dcti/v${MAJ_PV}/dnetc${MIN_PV}-linux-x86-elf-uclibc.tar.gz )" +SRC_URI_amd64="amd64? ( http://http.distributed.net/pub/dcti/v${MAJ_PV}/dnetc${MIN_PV}-linux-amd64.tar.gz )" +SRC_URI_ppc="ppc? ( http://http.distributed.net/pub/dcti/v${MAJ_PV}/dnetc${MIN_PV}-linux-ppc-uclibc.tar.gz )" +#SRC_URI_sparc="sparc? ( http://http.distributed.net/pub/dcti/v${MAJ_PV}/dnetc${MIN_PV}-linux-sparc-v7.tar.gz )" +SRC_URI="${SRC_URI_amd64} ${SRC_URI_ppc} ${SRC_URI_x86} ${SRC_URI_sparc}" + +LICENSE="distributed.net GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc" # x86 not available for this version +IUSE="" +RESTRICT="mirror" + +DEPEND="" +RDEPEND="net-dns/bind-tools" + +QA_PRESTRIPPED="opt/distributed.net/dnetc" + +S=${WORKDIR}/dnetc + +src_prepare() { + binname="" + if use amd64; then + binname=dnetc${MIN_PV}-linux-amd64 + elif use x86; then + binname=dnetc${MIN_PV}-linux-x86-elf-uclibc + elif use ppc; then + binname=dnetc${MIN_PV}-linux-ppc-elf-uclibc + fi + [[ -z "${binname}" ]] && die "Name of dnetc binary for this platform undefined" + mv "${binname}" dnetc || die "$binname binary is missing" +} + +src_install() { + exeinto /opt/distributed.net + doexe dnetc + + doman dnetc.1 + dodoc docs/CHANGES.txt docs/dnetc.txt docs/readme.* + + newinitd "${FILESDIR}"/dnetc.initd dnetc + newconfd "${FILESDIR}"/dnetc.confd dnetc + + keepdir /var/spool/dnetc +} + +pkg_preinst() { + if [ -e /opt/distributed.net/dnetc ] && [ -e /etc/init.d/dnetc ]; then + einfo "flushing old buffers" + source /etc/conf.d/dnetc + + if [ -e /opt/distributed.net/dnetc.ini ]; then + # use ini file + /opt/distributed.net/dnetc -quiet -ini /opt/distributed.net/dnetc.ini -flush + elif [ ! -e /opt/distributed.net/dnetc.ini ] && [ ! -z ${EMAIL} ]; then + # email adress from config + /opt/distributed.net/dnetc -quiet -flush -e ${EMAIL} + fi + + einfo "removing old buffer files" + rm -f /opt/distributed.net/buff* + fi + + enewgroup dnetc + enewuser dnetc -1 -1 /opt/distributed.net dnetc +} + +pkg_postinst() { + chown -Rf dnetc:dnetc /opt/distributed.net + chmod 0555 /opt/distributed.net/dnetc + + elog "To run distributed.net client in the background at boot:" + elog " rc-update add dnetc default" + elog "" + elog "Either configure your email address in /etc/conf.d/dnetc" + elog "or create the configuration file /opt/distributed.net/dnetc.ini" +} + +pkg_postrm() { + if [ -d /opt/distributed.net ]; then + elog "All files has not been removed from /opt/distributed.net" + fi +} diff --git a/app-misc/dnetc/dnetc-2.9110.519.ebuild b/app-misc/dnetc/dnetc-2.9110.519.ebuild new file mode 100644 index 000000000000..3785ad20a0bd --- /dev/null +++ b/app-misc/dnetc/dnetc-2.9110.519.ebuild @@ -0,0 +1,93 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=2 +inherit user + +MAJ_PV=${PV:0:6} +MIN_PV=${PV:7:9} + +DESCRIPTION="distributed.net client" +HOMEPAGE="http://www.distributed.net" +SRC_URI_x86="x86? ( http://http.distributed.net/pub/dcti/v${MAJ_PV}/dnetc${MIN_PV}-linux-x86-elf-uclibc.tar.gz )" +#SRC_URI_amd64="amd64? ( http://http.distributed.net/pub/dcti/v${MAJ_PV}/dnetc${MIN_PV}-linux-amd64.tar.gz )" +#SRC_URI_ppc="ppc? ( http://http.distributed.net/pub/dcti/v${MAJ_PV}/dnetc${MIN_PV}-linux-ppc-uclibc.tar.gz )" +#SRC_URI_sparc="sparc? ( http://http.distributed.net/pub/dcti/v${MAJ_PV}/dnetc${MIN_PV}-linux-sparc-v7.tar.gz )" +SRC_URI="${SRC_URI_amd64} ${SRC_URI_ppc} ${SRC_URI_x86} ${SRC_URI_sparc}" + +LICENSE="distributed.net GPL-2" +SLOT="0" +KEYWORDS="~x86" # ppc,amd64 not available for this version +IUSE="" +RESTRICT="mirror" + +DEPEND="" +RDEPEND="net-dns/bind-tools" + +QA_PRESTRIPPED="opt/distributed.net/dnetc" + +S=${WORKDIR}/dnetc + +src_prepare() { + binname="" + if use amd64; then + binname=dnetc${MIN_PV}-linux-amd64 + elif use x86; then + binname=dnetc${MIN_PV}-linux-x86-elf-uclibc + elif use ppc; then + binname=dnetc${MIN_PV}-linux-ppc-elf-uclibc + fi + [[ -z "${binname}" ]] && die "Name of dnetc binary for this platform undefined" + mv "${binname}" dnetc || die "$binname binary is missing" +} + +src_install() { + exeinto /opt/distributed.net + doexe dnetc + + doman dnetc.1 + dodoc docs/CHANGES.txt docs/dnetc.txt docs/readme.* + + newinitd "${FILESDIR}"/dnetc.initd dnetc + newconfd "${FILESDIR}"/dnetc.confd dnetc + + keepdir /var/spool/dnetc +} + +pkg_preinst() { + if [ -e /opt/distributed.net/dnetc ] && [ -e /etc/init.d/dnetc ]; then + einfo "flushing old buffers" + source /etc/conf.d/dnetc + + if [ -e /opt/distributed.net/dnetc.ini ]; then + # use ini file + /opt/distributed.net/dnetc -quiet -ini /opt/distributed.net/dnetc.ini -flush + elif [ ! -e /opt/distributed.net/dnetc.ini ] && [ ! -z ${EMAIL} ]; then + # email adress from config + /opt/distributed.net/dnetc -quiet -flush -e ${EMAIL} + fi + + einfo "removing old buffer files" + rm -f /opt/distributed.net/buff* + fi + + enewgroup dnetc + enewuser dnetc -1 -1 /opt/distributed.net dnetc +} + +pkg_postinst() { + chown -Rf dnetc:dnetc /opt/distributed.net + chmod 0555 /opt/distributed.net/dnetc + + elog "To run distributed.net client in the background at boot:" + elog " rc-update add dnetc default" + elog "" + elog "Either configure your email address in /etc/conf.d/dnetc" + elog "or create the configuration file /opt/distributed.net/dnetc.ini" +} + +pkg_postrm() { + if [ -d /opt/distributed.net ]; then + elog "All files has not been removed from /opt/distributed.net" + fi +} diff --git a/app-misc/dnetc/dnetc-2.9110.519b.ebuild b/app-misc/dnetc/dnetc-2.9110.519b.ebuild new file mode 100644 index 000000000000..59faa0435084 --- /dev/null +++ b/app-misc/dnetc/dnetc-2.9110.519b.ebuild @@ -0,0 +1,95 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=2 +inherit user + +MAJ_PV=${PV:0:6} +MIN_PV=${PV:7:9} + +DESCRIPTION="distributed.net client" +HOMEPAGE="http://www.distributed.net" +#SRC_URI_x86="x86? ( http://http.distributed.net/pub/dcti/v${MAJ_PV}/dnetc${MIN_PV}-linux-x86-elf-uclibc.tar.gz )" +SRC_URI_amd64="amd64? ( http://http.distributed.net/pub/dcti/v${MAJ_PV}/dnetc${MIN_PV}-linux-amd64.tar.gz )" +#SRC_URI_ppc="ppc? ( http://http.distributed.net/pub/dcti/v${MAJ_PV}/dnetc${MIN_PV}-linux-ppc-uclibc.tar.gz )" +#SRC_URI_sparc="sparc? ( http://http.distributed.net/pub/dcti/v${MAJ_PV}/dnetc${MIN_PV}-linux-sparc-v7.tar.gz )" +SRC_URI="${SRC_URI_amd64} ${SRC_URI_ppc} ${SRC_URI_x86} ${SRC_URI_sparc}" + +LICENSE="distributed.net GPL-2" +SLOT="0" +KEYWORDS="~amd64" # ppc,x86 not available for this version +IUSE="" +RESTRICT="mirror" + +DEPEND="" +RDEPEND="net-dns/bind-tools" + +QA_PREBUILT="opt/distributed.net/dnetc" + +getS() { + case $ARCH in + amd64) suffix=amd64 ;; + x86) suffix=x86-elf-uclibc ;; + ppc) suffix=ppc-elf-uclibc ;; + esac + echo dnetc${MIN_PV:0:3}-linux-${suffix} +} + +src_prepare() { + export S="${WORKDIR}/$(getS)" + cd "${S}" + [[ -x dnetc ]] || die "Name of dnetc directory/binary for this platform undefined" +} + +src_install() { + export S="${WORKDIR}/$(getS)" + cd "${S}" + exeinto /opt/distributed.net + doexe dnetc + + doman dnetc.1 + dodoc docs/CHANGES.txt docs/dnetc.txt docs/readme.* + + newinitd "${FILESDIR}"/dnetc.initd dnetc + newconfd "${FILESDIR}"/dnetc.confd dnetc + + keepdir /var/spool/dnetc +} + +pkg_preinst() { + if [ -e /opt/distributed.net/dnetc ] && [ -e /etc/init.d/dnetc ]; then + einfo "flushing old buffers" + source /etc/conf.d/dnetc + + if [ -e /opt/distributed.net/dnetc.ini ]; then + # use ini file + /opt/distributed.net/dnetc -quiet -ini /opt/distributed.net/dnetc.ini -flush + elif [ ! -e /opt/distributed.net/dnetc.ini ] && [ ! -z ${EMAIL} ]; then + # email adress from config + /opt/distributed.net/dnetc -quiet -flush -e ${EMAIL} + fi + + einfo "removing old buffer files" + rm -f /opt/distributed.net/buff* + fi + + enewgroup dnetc + enewuser dnetc -1 -1 /opt/distributed.net dnetc +} + +pkg_postinst() { + chown -Rf dnetc:dnetc /opt/distributed.net + chmod 0555 /opt/distributed.net/dnetc + + elog "To run distributed.net client in the background at boot:" + elog " rc-update add dnetc default" + elog "" + elog "Either configure your email address in /etc/conf.d/dnetc" + elog "or create the configuration file /opt/distributed.net/dnetc.ini" +} + +pkg_postrm() { + if [ -d /opt/distributed.net ]; then + elog "All files has not been removed from /opt/distributed.net" + fi +} diff --git a/app-misc/dnetc/files/dnetc.confd b/app-misc/dnetc/files/dnetc.confd new file mode 100644 index 000000000000..f6f0da6b7e2d --- /dev/null +++ b/app-misc/dnetc/files/dnetc.confd @@ -0,0 +1,18 @@ +# configuration file for dnetc + +# Startup will look for configuration files in the following places, using the +# first one that it finds: +# 1. /etc/dnetc.conf +# 2. /opt/distributed.net/dnetc.ini + +# Values specified here will override those found in any client configuration +# file. + +# email adress +EMAIL= + +# buffer base dir +BUFFER_BASE_DIR=/var/spool/dnetc + +# keyserver address +KEYSERVER_ADDRESS= diff --git a/app-misc/dnetc/files/dnetc.initd b/app-misc/dnetc/files/dnetc.initd new file mode 100644 index 000000000000..f3a512074912 --- /dev/null +++ b/app-misc/dnetc/files/dnetc.initd @@ -0,0 +1,88 @@ +#!/sbin/openrc-run +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +opts="${opts} reload fetch flush" + +depend() { + use net +} + +processOpts() { + local retVal=1 + + DNETPATH="/opt/distributed.net" + DNETBIN="${DNETPATH}/dnetc" + + STARTOPTS="--start --chuid dnetc:dnetc --quiet \ + --exec ${DNETBIN}" + + DNETOPTS="-quiet" + + if [ -e /etc/dnetc.ini ] ; then + retVal=0 + DNETOPTS="${DNETOPTS} -ini /etc/dnetc.ini" + elif [ -e ${DNETPATH}/dnetc.ini ]; then + retVal=0 + DNETOPTS="${DNETOPTS} -ini ${DNETPATH}/dnetc.ini" + elif [ ! -z ${EMAIL} ]; then + retVal=0 + fi + + # override ini settings with values in /etc/conf.d/dnetc + + DNETOPTS="${DNETOPTS} ${EMAIL:+-e ${EMAIL}}" + if [ ! -z ${BUFFER_BASE_DIR} ] ; then + local buff_in="${BUFFER_BASE_DIR:+${BUFFER_BASE_DIR}/}buff-in" + local buff_out="${BUFFER_BASE_DIR:+${BUFFER_BASE_DIR}/}buff-out" + DNETOPTS="${DNETOPTS} -inbase ${buff_in}" + DNETOPTS="${DNETOPTS} -outbase ${buff_out}" + fi + DNETOPTS="${DNETOPTS} ${KEYSERVER_ADDRESS:+-a ${KEYSERVER_ADDRESS}}" + + # fair group cpu scheduler + uidpath="/sys/kernel/uids/`id -u dnetc`" + [ -d $uidpath ] && echo 2 >$uidpath/cpu_share + unset uidpath + + if [ ${retVal} -ne 0 ] ; then + eerror "Need some sort of configuration. Check /etc/conf.d/dnetc." + fi + + return ${retVal} +} + +start() { + processOpts || return 1 + ebegin "Starting distributed.net client" + start-stop-daemon ${STARTOPTS} -- ${DNETOPTS} + eend ${?} +} + +stop() { + processOpts || return 1 + ebegin "Stopping distributed.net client" + start-stop-daemon --stop --quiet --exec ${DNETBIN} -- + eend ${?} +} + +reload() { + processOpts || return 1 + ebegin "Reloading distributed.net client" + start-stop-daemon --stop --quiet --signal HUP --exec ${DNETBIN} + eend ${?} +} + +fetch() { + processOpts || return 1 + ebegin "Fetching distributed.net client buffers" + ${DNETBIN} ${DNETOPTS} -fetch + eend ${?} +} + +flush() { + processOpts || return 1 + ebegin "Flushing distributed.net client buffers" + ${DNETBIN} ${DNETOPTS} -flush + eend ${?} +} diff --git a/app-misc/dnetc/metadata.xml b/app-misc/dnetc/metadata.xml new file mode 100644 index 000000000000..40c9f16e0287 --- /dev/null +++ b/app-misc/dnetc/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>robbat2@gentoo.org</email> + <name>Robin H. Johnson</name> + </maintainer> + <longdescription> + a distributed client for the distributed.net cracking challenges. + </longdescription> +</pkgmetadata> |