Repoman corrections (cool tool)
This commit is contained in:
@@ -1,176 +0,0 @@
|
||||
# Copyright 1999-2005 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /srv/svnroot/gentoo/net-nds/novell-xtier-base/novell-xtier-base-3.1.4_p4.ebuild,v 0.1 2006/07/22 15:25:32 Mario Fetka $
|
||||
|
||||
inherit eutils rpm
|
||||
|
||||
if [[ -z "${NOVELL_ACCOUNT_USERNAME}" && -z "${NOVELL_ACCOUNT_PASSWORD}" ]]; then
|
||||
einfo "Please add the NOVELL_ACCOUNT_USERNAME=\"...\" Variable to /etc/make.conf"
|
||||
einfo "Please add the NOVELL_ACCOUNT_PASSWORD=\"...\" Variable to /etc/make.conf"
|
||||
die "No login Informations."
|
||||
fi
|
||||
|
||||
MY_PV="${PV/_p/-}"
|
||||
DESCRIPTION="Novell Xtier Base"
|
||||
HOMEPAGE="http://www.novell.com"
|
||||
SRC_URI="http://${NOVELL_ACCOUNT_USERNAME}:${NOVELL_ACCOUNT_PASSWORD}@cache.novell.com/prot/5kA1ixCv1_k~/ncl_SLE10_bld711.tar.gz
|
||||
http://download.opensuse.org/distribution/SL-10.1/inst-source/suse/i586/binutils-2.16.91.0.5-18.i586.rpm"
|
||||
LICENSE="Novell-NCL"
|
||||
SLOT="0"
|
||||
KEYWORDS="~x86"
|
||||
IUSE="gtk"
|
||||
DEPEND=""
|
||||
RDEPEND="virtual/libc
|
||||
>=dev-libs/expat-2.0.0
|
||||
>=net-nds/novell-xtier-core-3.1.4
|
||||
>=sys-libs/ncurses-5.5
|
||||
>=sys-devel/gcc-4.1
|
||||
!net-misc/novell-xtier-base"
|
||||
RESTRICT="nomirror nostrip"
|
||||
|
||||
src_unpack() {
|
||||
unpack ncl_SLE10_bld711.tar.gz
|
||||
rpm_unpack ${DISTDIR}/binutils-2.16.91.0.5-18.i586.rpm
|
||||
mkdir -p ${WORKDIR}/${PN}-${MY_PV}
|
||||
cd ${PN}-${MY_PV}
|
||||
rpm_unpack ${WORKDIR}/ncl_build_711/NCL_disk/novell/i586/${PN}-${MY_PV}.sles10.i586.rpm
|
||||
}
|
||||
|
||||
src_compile() { :; }
|
||||
|
||||
src_install() {
|
||||
# still a hack
|
||||
cp "${WORKDIR}"/usr/lib/libbfd-*.so "${WORKDIR}/${PN}-${MY_PV}"/opt/novell/xtier/lib
|
||||
|
||||
|
||||
rm -rf "${WORKDIR}/${PN}-${MY_PV}"/etc/init.d
|
||||
chmod 755 "${WORKDIR}/${PN}-${MY_PV}"/opt/novell/xtier
|
||||
chmod 755 "${WORKDIR}/${PN}-${MY_PV}"/opt/novell/xtier/lib
|
||||
mv "${WORKDIR}/${PN}-${MY_PV}"/usr/share/doc/packages/${PN} "${WORKDIR}/${PN}-${MY_PV}"/usr/share/doc/${P}
|
||||
mv "${WORKDIR}/${PN}-${MY_PV}"/etc "${D}"/ || die "mv etc"
|
||||
mv "${WORKDIR}/${PN}-${MY_PV}"/opt "${D}"/ || die "mv opt"
|
||||
mv "${WORKDIR}/${PN}-${MY_PV}"/usr "${D}"/ || die "mv usr"
|
||||
mv "${WORKDIR}/${PN}-${MY_PV}"/var "${D}"/ || die "mv var"
|
||||
|
||||
insinto /etc/env.d
|
||||
doins "${FILESDIR}"/80novell-xtier
|
||||
|
||||
exeinto /etc/init.d
|
||||
newexe "${FILESDIR}"/novell-xregd12.initd novell-xregd
|
||||
|
||||
|
||||
}
|
||||
|
||||
pkg_preinst(){
|
||||
# ***************************************
|
||||
# ******* Begin of pre script ***********
|
||||
# ***************************************
|
||||
einfo "Running Novell XTier Base pre script..."
|
||||
# We just want to stop the novell-xregd service and export the XTier registry to a
|
||||
# temporary file if this is an upgrade.
|
||||
if [ -e "/etc/init.d/novell-xregd" ]; then
|
||||
#echo "Novell XTier Base pre script stoping novell-xregd for upgrade"
|
||||
/etc/init.d/novell-xregd stop
|
||||
fi
|
||||
# Check if we need to export the XTier registry
|
||||
# Note: We export the registry at this time to avoid losing its settings in case
|
||||
# that we have to rebuild the database.
|
||||
if [ -e "/var/opt/novell/xtier/xregd/db/xtier_registry.db" ]; then
|
||||
einfo " Exporting Xtier Registry to temporary file..."
|
||||
rm -f /var/opt/novell/xtier/xregd/xtier_registry.xml.export
|
||||
/opt/novell/xtier/bin/regutil -e /etc/opt/novell/xtier/xtier_registry.xml.export
|
||||
einfo " done exporting Xtier Xml Registry"
|
||||
fi
|
||||
|
||||
einfo "done running Novell XTier Base pre script!"
|
||||
|
||||
# Do necessary user and group administration
|
||||
enewgroup novlxtier
|
||||
enewuser novlxregd -1 -1 /var/opt/novell/xtier/xregd novlxtier
|
||||
einfo "done running Novell XTier Base pre script!"
|
||||
# ***************************************
|
||||
# ******* End of pre script *************
|
||||
# ***************************************
|
||||
}
|
||||
|
||||
|
||||
pkg_postinst(){
|
||||
# ***************************************
|
||||
# ******* Begin of post script **********
|
||||
# ***************************************
|
||||
echo "Running Novell XTier Base post script..."
|
||||
# Check if we need to import the XTier registry
|
||||
if [ ! -e "/var/opt/novell/xtier/xregd/db/xtier_registry.db" ]; then
|
||||
einfo " Importing Xtier Xml Registry..."
|
||||
|
||||
# Import the registry.
|
||||
# Note: We could be dealing with an upgrade from a Pre-XFlaim registry in which
|
||||
# case we would have saved the previous registry contents to let us upgrade to XFlaim based
|
||||
# registry without loosing configuration settings.
|
||||
einfo " Using newly installed registry file"
|
||||
mkdir -p /var/opt/novell/xtier/xregd/db/
|
||||
/opt/novell/xtier/bin/regutil -i /etc/opt/novell/xtier/xtier_registry.xml
|
||||
# Make sure that novlxregd has rights to the registry db
|
||||
chown -R novlxregd:novlxtier /var/opt/novell/xtier/xregd/db/
|
||||
einfo " done importing Xtier Xml Registry"
|
||||
else
|
||||
# The XTier registry exists, check its integrity.
|
||||
/opt/novell/xtier/bin/regutil -c
|
||||
if [ "$?" != "0" ]; then
|
||||
einfo " Existing XTier Registry Db Unsupported or Corrupted"
|
||||
einfo " Re-installing XTier Registry Db"
|
||||
|
||||
# Import the registry. Use registry file that was exported earlier if present to
|
||||
# avoid losing configuration settings that may have been made.
|
||||
if [ -e "/etc/opt/novell/xtier/xtier_registry.xml.export" ]; then
|
||||
/opt/novell/xtier/bin/regutil -i /etc/opt/novell/xtier/xregd/xtier_registry.xml.export
|
||||
else
|
||||
einfo " Exported registry file not found"
|
||||
einfo " Configuration settings stored in the registry after initial install have been lost"
|
||||
/opt/novell/xtier/bin/regutil -i /etc/opt/novell/xtier/xtier_registry.xml
|
||||
fi
|
||||
# Make sure that novlxregd has rights to the registry db
|
||||
chown -R novlxregd:novlxtier /var/opt/novell/xtier/xregd/db/
|
||||
einfo " done importing Xtier Xml Registry"
|
||||
fi
|
||||
fi
|
||||
# Make sure that we are not leaving the temporary registry xml file around
|
||||
rm -f /etc/opt/novell/xtier/xtier_registry.xml.export
|
||||
einfo "done running Novell XTier Base post script!"
|
||||
# ***************************************
|
||||
# ******* End of post script ************
|
||||
# ***************************************
|
||||
}
|
||||
|
||||
pkg_prerm(){
|
||||
# ***************************************
|
||||
# ******* Begin of pre-remove script ****
|
||||
# ***************************************
|
||||
einfo "Running Novell XTier Base preun script ..."
|
||||
# Stop novell-xregd
|
||||
/etc/init.d/novell-xregd stop
|
||||
# Check if we need to export the XTier registry
|
||||
if [ -e "/var/opt/novell/xtier/xregd/db/xtier_registry.db" ]; then
|
||||
einfo " Exporting Xtier Xml Registry..."
|
||||
rm -f /etc/opt/novell/xtier/xtier_registry.xml.export
|
||||
/opt/novell/xtier/bin/regutil -e /etc/opt/novell/xtier/xtier_registry.xml.export
|
||||
einfo " done exporting Xtier Xml Registry"
|
||||
fi
|
||||
einfo "done running Novell XTier Base preun script!"
|
||||
# ***************************************
|
||||
# ******* End of pre-remove script ******
|
||||
# ***************************************
|
||||
}
|
||||
|
||||
pkg_postrm(){
|
||||
# ***************************************
|
||||
# ******* Begin of postun script ********
|
||||
# ***************************************
|
||||
einfo "Running Novell XTier Base postun script ..."
|
||||
# Delete the var files
|
||||
rm -rf /var/opt/novell/xtier
|
||||
einfo "done running Novell XTier Base postun script!"
|
||||
# ***************************************
|
||||
# ******* End of postun script **********
|
||||
# ***************************************
|
||||
}
|
||||
Reference in New Issue
Block a user