Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 145154 Details for
Bug 212132
net-p2p/dbhub - openrc scripts support and several ebuild improvements
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
Ebuild
dbhub-0.451-r1.ebuild (text/plain), 5.99 KB, created by
Petr Polezhaev
on 2008-03-03 00:18:38 UTC
(
hide
)
Description:
Ebuild
Filename:
MIME Type:
Creator:
Petr Polezhaev
Created:
2008-03-03 00:18:38 UTC
Size:
5.99 KB
patch
obsolete
># Copyright 1999-2007 Gentoo Foundation ># Distributed under the terms of the GNU General Public License v2 ># $Header: $ > >inherit eutils > >DESCRIPTION="Hub software for Direct Connect, fork of opendchub" >HOMEPAGE="http://dbhub.sourceforge.net/" >SRC_URI=" > mirror://sourceforge/${PN}/${P}.tgz > nls? ( > linguas_el? ( mirror://sourceforge/${PN}/lang_gr-${PV}.tar.gz ) > linguas_pl? ( mirror://sourceforge/${PN}/lang_pl-${PV}.tar.gz ) > linguas_ro? ( mirror://sourceforge/${PN}/lang_ro.${PV}.tar.gz ) > linguas_ru? ( mirror://sourceforge/${PN}/lang_ru.${PV}.tar.gz ) > ) > " > >LICENSE="GPL-2" >SLOT="0" >KEYWORDS="~amd64 ~ppc64 ~x86" > >IUSE="perl nls caps debug baselayout" >LINGUAS="el pl ro ru" > >RESTRICT="nomirror" > >DEPEND=" > perl? ( dev-lang/perl ) > caps? ( sys-libs/libcap ) > " > >RDEPEND="perl? ( dev-lang/perl )" > >pkg_setup() { > use baselayout || return 0 > > ewarn "You are ready to compile dbhub with baselayout support" > ewarn "Please notice, that this requires patching sources, to override" > ewarn "workdir argument (-w) pattern (so called workdir hack)" > ewarn "This means, that workdir agrument now will point to _config_ dir" > ewarn "and NOT to dir, where .dbhub contains. Default setting changed to" > ewarn "'\$HOME/.dbhub', so in most cases this is safe, but if use some" > ewarn "3dparty scripts, working with executable, you need to check if it use" > ewarn "workdir argument" > > enewgroup dbhub 411 > enewuser dbhub 411 -1 /etc/dbhub dbhub > > if uname -r | grep -q hardened; then > ewarn "" > ewarn "You building DBHub on hardened kernel." > ewarn "Please sure, that CONFIG_GRKERNSEC_SHM (Destory unused shared memory)" > ewarn "option is turned OFF (or disabled by sysctl)" > ewarn "or DBHub will not bind on TCP" > fi >} > >src_unpack() { > unpack ${A} > cd "${S}" > > epatch "${FILESDIR}/${P}-configure-gentify.patch" > use baselayout && epatch "${FILESDIR}/${P}-workdir-hack.patch" >} > >src_compile() { > econf \ > $(use_enable nls) \ > $(use_enable debug) \ > $(use_enable perl) \ > $(use_enable caps switch_user) \ > $(use_enable nls) \ > || die "econf failed" > > emake || die "emake failed" >} > >src_install() { > emake DESTDIR="${D}" install || die "emake install failed" > > if use nls; then > cd "${WORKDIR}" > > for lang_path in lang_*; do > local lang_key=${lang_path#lang_} > lang_key=$(echo ${lang_key%${lang_key#??}} | tr A-Z a-z) > > test "${lang_key}" == "gr" && lang_key='el' #Bug into naming languages > > docinto "langs/${lang_key}/" > > dodoc "${lang_path}"/* > done > > cd "${S}" > > elog "All selected languages installed in /usr/share/doc/${P}/langs/" > elog "Copy prefered into your config dir (default: /etc/dbhub:)" > elog "" > elog "Language files provided as-is, without any encoding coversion." > elog "If you want to convert them to any other than default encondig" > elog "you may use app-i18n/enca utilite to guess original encoding." > elog "" > elog "Currently, source encondings is:" > elog " Greek (misnamed 'gr' - by ISO 639-1: 'el'): utf-8" > elog " Polish (pl): cp1250" > elog " Romanian (ro): unknown =)" > elog " Russian (ru): cp1251" > fi > > if use baselayout; then > newinitd "${FILESDIR}/${P}.initd" ${PN} > newconfd "${FILESDIR}/${P}.confd" ${PN} > fi >} > >pkg_postinst() { > elog "" > > if use baselayout; then > elog "If you are doing fresh install, before use, please run" > elog "following command to preconfig dbhub:" > elog "emerge --config =${CATEGORY}/${PF}" > elog "And answer few basic questions" > elog "" > elog "If you already have working configs and want to use them," > elog "you can change DBHUB_CONFIG_DIR setting into /etc/conf.d/${PN}, or" > elog "copy contents of current config folder inside default directory." > elog "Please be sure, that new configs accesseble by dbhub user" > else > elog "Please notice, that no configs exists after installation." > elog "They will be created after first launch (dbhub will ask you some questions)/" > elog "Baselayout use-flag disabled, so no baselayout scripts provided" > fi >} > >pkg_config() { > built_with_use ${CATEGORY}/${PN} baselayout || \ > return $(eerror "Baselayout support not enabled!") > > local config_dir="/etc/dbhub" > > if [ -f "${config_dir}/config" ]; then > ewarn "Config in ${config_dir} already exists!" > ewarn "Please, remove or move it somewhere," > ewarn "if you want to reconfigure" > eerror "DBHub already configured" > return 1 > fi > > test -d "${config_dir}" || mkdir "${config_dir}" > keepdir "${config_dir}" > > while true; do > einfo "Port, which dbhub must working on:" > read -rp ' [411]: ' db_port; echo > test -z $db_port && db_port=411; > > if [[ ! $(echo $db_port | grep -E '^[[:digit:]]+$') \ > || $db_port -gt 65563 ]]; then > eerror "Port must be a positive number and less than 65563" > continue; > fi > > einfo "Nick of hub owner (without spaces or special characters)" > read -rp " [$(whoami)]: " db_owner; echo > test -z $db_owner && db_owner=$(whoami); > > while true; do > einfo 'Password for owner:' > read -rsp ' >' db_pass; echo > > if [ -z $db_pass ]; then > eerror "Empty password! Repeat please." > continue; > fi > > einfo 'Repeat password:' > read -rsp ' >' db_pass_repeat; echo > > test "${db_pass}" == "${db_pass_repeat}" && break; > > eerror "Passwords don't match!"; > eerror "Repeat?" > read -rp " (y/n) [n]: " > > echo $REPLY | grep -Eiq '^ye?s?$' || return 1; > done; > > einfo "Basic config:" > einfo " Port: ${db_port}" > einfo " Owner: ${db_owner}" > einfo " Password: <hidden>" > einfo "Correct?" > read -rp " (y/n) [y]: " > > echo $REPLY | grep -Eiq '^no?$' || break; > return; > done > > echo -e "${db_port}\n${db_owner}\n${db_pass}" | \ > /usr/bin/dbhub -w "${config_dir}" > /dev/null > killall dbhub > > test -f "${config_dir}/config" || die "Failed to configure dbhub" > > if [ $(ls /usr/share/doc/${PF}/langs/ | grep -c '') -eq 1 ]; then > einfo "The only selected language was copied in ${config_dir} as default" > > bzip2 -d < /usr/share/doc/${PF}/langs/*/lang.bz2 > ${config_dir}/lang > fi > > chown dbhub:dbhub -R "${config_dir}" > > einfo "DBHub succesfully configured. Check configs into ${config_dir}" >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 212132
:
145154
|
145155
|
145156
|
145158
|
145160
|
146130