View | Details | Raw Unified
Collapse All | Expand All

(-) bacula-1.38.9.ebuild.old (-31 / +31 lines)
 Lines 103-113    Link Here 
}
}
src_unpack() {
src_unpack() {
	unpack ${A}
	unpack "${A}"
	cd ${S}
	cd "${S}"
	# adjusts default configuration files for several binaries
	# adjusts default configuration files for several binaries
	# to /etc/bacula/<config> instead of ./<config>
	# to /etc/bacula/<config> instead of ./<config>
	epatch ${FILESDIR}/${P}-default-configs.patch
	epatch "${FILESDIR}/${P}-default-configs.patch"
}
}
src_compile() {
src_compile() {
 Lines 133-139    Link Here 
	if ! use bacula-clientonly; then
	if ! use bacula-clientonly; then
		# select database support
		# select database support
		if [ ${mydb} == "postgresql" ]; then
		if [ "${mydb}" == "postgresql" ]; then
			myconf="${myconf} `use_with postgres postgresql`"
			myconf="${myconf} `use_with postgres postgresql`"
		else
		else
			myconf="${myconf} `use_with ${mydb}`"
			myconf="${myconf} `use_with ${mydb}`"
 Lines 168-183    Link Here 
		--with-fd-user=root \
		--with-fd-user=root \
		--with-fd-group=bacula \
		--with-fd-group=bacula \
		--enable-smartalloc \
		--enable-smartalloc \
		--host=${CHOST} ${myconf} || die "Configure failed!"
		"--host=${CHOST}" ${myconf} || die "Configure failed!"
	emake || die "Failed primary build!"
	emake || die "Failed primary build!"
}
}
src_install() {
src_install() {
	emake DESTDIR=${D} install || die "Failed install to ${D} !"
	emake DESTDIR="${D}" install || die "Failed install to ${D} !"
	if use static ; then
	if use static ; then
		cd ${D}/usr/sbin
		cd "${D}/usr/sbin"
		mv static-bacula-fd bacula-fd
		mv static-bacula-fd bacula-fd
		mv static-bconsole bconsole
		mv static-bconsole bconsole
		if ! use bacula-clientonly ; then
		if ! use bacula-clientonly ; then
 Lines 187-198    Link Here 
		if use gnome ; then
		if use gnome ; then
			mv static-gnome-console gnome-console
			mv static-gnome-console gnome-console
		fi
		fi
		cd ${S}
		cd "${S}"
	fi
	fi
	if use bacula-console ; then
	if use bacula-console ; then
		if use gnome ; then
		if use gnome ; then
			emake DESTDIR=${D} \
			emake DESTDIR="${D}" \
				install-menu \
				install-menu \
				install-menu-xsu || die "Failed to install gnome menu files to ${D}" \
				install-menu-xsu || die "Failed to install gnome menu files to ${D}" \
			make_desktop_entry \
			make_desktop_entry \
 Lines 209-215    Link Here 
		dodir /usr/libexec/bacula/updatedb
		dodir /usr/libexec/bacula/updatedb
		insinto /usr/libexec/bacula/updatedb/
		insinto /usr/libexec/bacula/updatedb/
		insopts -m0754
		insopts -m0754
		doins ${S}/updatedb/*
		doins "${S}"/updatedb/*
		fperms 0640 /usr/libexec/bacula/updatedb/README
		fperms 0640 /usr/libexec/bacula/updatedb/README
		# the logrotate configuration
		# the logrotate configuration
 Lines 218-224    Link Here 
			dodir /etc/logrotate.d
			dodir /etc/logrotate.d
			insinto /etc/logrotate.d
			insinto /etc/logrotate.d
			insopts -m0644
			insopts -m0644
			newins ${S}/scripts/logrotate bacula
			newins "${S}/scripts/logrotate" bacula
		fi
		fi
		# the logwatch scripts
		# the logwatch scripts
 Lines 227-258    Link Here 
			dodir /etc/log.d/scripts/services
			dodir /etc/log.d/scripts/services
			dodir /etc/log.d/conf/logfiles
			dodir /etc/log.d/conf/logfiles
			dodir /etc/log.d/conf/services
			dodir /etc/log.d/conf/services
			cd ${S}/scripts/logwatch
			cd "${S}/scripts/logwatch"
			emake DESTDIR=${D} install || die "Failed to install logwatch scripts to ${D} !"
			emake DESTDIR="${D}" install || die "Failed to install logwatch scripts to ${D} !"
			cd ${S}
			cd "${S}"
		fi
		fi
	fi
	fi
	# documentation
	# documentation
	for my_doc in ${S}/{ChangeLog,LICENSE,README,ReleaseNotes,kernstodo,doc/BaculaRoadMap_*.pdf}
	for my_doc in "${S}"/{ChangeLog,LICENSE,README,ReleaseNotes,kernstodo,doc/BaculaRoadMap_*.pdf}
	do
	do
		dodoc ${my_doc}
		dodoc "${my_doc}"
	done
	done
	if use doc ; then
	if use doc ; then
		dodoc ${WORKDIR}/${PN}-docs-${DOC_VER}/developers/developers.pdf
		dodoc "${WORKDIR}/${PN}-docs-${DOC_VER}/developers/developers.pdf"
		dodoc ${WORKDIR}/${PN}-docs-${DOC_VER}/manual/bacula.pdf
		dodoc "${WORKDIR}/${PN}-docs-${DOC_VER}/manual/bacula.pdf"
		diropts -m0755
		diropts -m0755
		dodir /usr/share/doc/${PF}/developers
		dodir "/usr/share/doc/${PF}/developers"
		dodir /usr/share/doc/${PF}/manual
		dodir "/usr/share/doc/${PF}/manual"
		insopts -m0644
		insopts -m0644
		insinto /usr/share/doc/${PF}/developers
		insinto /usr/share/doc/${PF}/developers
		doins ${WORKDIR}/${PN}-docs-${DOC_VER}/developers/developers/*
		doins "${WORKDIR}/${PN}-docs-${DOC_VER}"/developers/developers/*
		insinto /usr/share/doc/${PF}/manual
		insinto "/usr/share/doc/${PF}/manual"
		doins ${WORKDIR}/${PN}-docs-${DOC_VER}/manual/bacula/*
		doins "${WORKDIR}/${PN}-docs-${DOC_VER}"/manual/bacula/*
	fi
	fi
	# clean up permissions left broken by install
	# clean up permissions left broken by install
	fperms 0644 ${D}/usr/libexec/bacula/query.sql
	fperms 0644 "${D}/usr/libexec/bacula/query.sql"
	prepall
	prepall
	# setup init scripts
	# setup init scripts
 Lines 276-291    Link Here 
		my_scripts="bacula-all"
		my_scripts="bacula-all"
	fi
	fi
	for script in ${my_scripts}; do
	for script in ${my_scripts}; do
		cp ${FILESDIR}/${PV}/${script}-conf ${T}/${script}.conf
		cp "${FILESDIR}/${PV}/${script}-conf" "${T}/${script}.conf"
		cp ${FILESDIR}/${PV}/${script}-init ${T}/${script}.init
		cp "${FILESDIR}/${PV}/${script}-init" "${T}/${script}.init"
		if [ "${mydb}" == "sqlite" ]; then
		if [ "${mydb}" == "sqlite" ]; then
			sed -i -e "s:%database%::" ${T}/${script}.init
			sed -i -e "s:%database%::" "${T}/${script}.init"
		else
		else
			sed -i -e "s:%database%:${mydb}:" ${T}/${script}.init
			sed -i -e "s:%database%:${mydb}:" "${T}/${script}.init"
		fi
		fi
		sed -i -e "s:%services%:${my_services}:" ${T}/${script}.conf
		sed -i -e "s:%services%:${my_services}:" "${T}/${script}.conf"
		newexe ${T}/${script}.init ${script}
		newexe "${T}/${script}.init" "${script}"
		newins ${T}/${script}.conf ${script}
		newins "${T}/${script}.conf" "${script}"
	done
	done
	# make sure the working directory exists
	# make sure the working directory exists