stable/app-crypt/netiq-nici/netiq-nici-2.7.7.0.02.ebuild

133 lines
3.5 KiB
Bash
Raw Normal View History

# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
NOVELL_BUILDID="oHdJl37wCb0~"
NOVELL_FILE="eDirectory_88SP8_Linux_x86_64.tar.gz"
RESTRICT="mirror strip"
USE_RPMOFFSET_ONLY="1"
inherit novell eutils rpm5 multilib versionator
MY_PVV=$(replace_version_separator 3 '-')
MY_PV="${MY_PVV/_p/-}"
DESCRIPTION="Novell NICI U.S./Worldwide (128bit) Crypto"
HOMEPAGE="http://www.novell.com"
SRC_URI="http://${NOVELL_ACCOUNT_USERNAME}:${NOVELL_ACCOUNT_PASSWORD}@cdn.novell.com/prot/${NOVELL_BUILDID}/patchfiles/${NOVELL_FILE}"
LICENSE="Novell-NCL"
SLOT="0"
KEYWORDS="~x86 ~amd64"
IUSE="multilib"
DEPEND=">=app-arch/p7zip-4.15"
RDEPEND="virtual/libc
net-nds/netiq-env"
src_unpack() {
unpack ${A}
cd "${WORKDIR}"
if use x86
then
narch=i586
nlib=lib
mkdir -p "${WORKDIR}"/${PN}-${PV}
cd ${PN}-${PV}
rpm5_unpack ./../eDirectory/setup/32-bit/nici-${MY_PV}.${narch}.rpm
elif use amd64
then
narch=x86_64
nlib=lib64
mkdir -p "${WORKDIR}"/${PN}-${PV}
cd ${PN}-${PV}
rpm5_unpack ./../eDirectory/setup//nici64-${MY_PV}.${narch}.rpm
if has_multilib_profile
then
narch=i586
rpm5_unpack ./../eDirectory/setup/32-bit/nici-${MY_PV}.${narch}.rpm
fi
fi
}
src_compile() { :; }
src_install() {
into /opt/novell
if use x86
then
dolib.so "${WORKDIR}"/${PN}-${PV}/opt/novell/${nlib}/*
elif has_multilib_profile
then
dolib.so "${WORKDIR}"/${PN}-${PV}/opt/novell/${nlib}/*
ABI="x86" dolib.so "${WORKDIR}"/${PN}-${PV}/opt/novell/lib/*
ABI="x86" dosym ../../opt/novell/$(get_libdir)/libccs2.so /usr/$(get_libdir)/libccs2.so
else
dolib.so "${WORKDIR}"/${PN}-${PV}/opt/novell/${nlib}/*
fi
doman "${WORKDIR}"/${PN}-${PV}/opt/novell/man/*/*
into /usr
dosym ../../opt/novell/$(get_libdir)/libccs2.so /usr/$(get_libdir)/libccs2.so
insinto /etc/opt/novell/
doins "${WORKDIR}"/${PN}-${PV}/etc/opt/novell/nici*.cfg
if use x86 || has_multilib_profile
then
dosym opt/novell/nici.cfg /etc/nici.cfg
# ABI="x86" dosed "s$/opt/novell/lib$/opt/novell/$(get_libdir)$" /etc/opt/novell/nici.cfg
fi
if has_multilib_profile
then
dosed "s|/opt/novell/lib|/opt/novell/lib32|" /etc/opt/novell/nici.cfg
fi
diropts -m777
dodir /var/opt/novell/nici
exeinto /var/opt/novell/nici
doexe "${WORKDIR}"/${PN}-${PV}/var/opt/novell/nici/primenici*
doexe "${WORKDIR}"/${PN}-${PV}/var/opt/novell/nici/nicimud*
doexe "${WORKDIR}"/${PN}-${PV}/var/opt/novell/nici/set_server_mode*
insinto /var/opt/novell/nici
doins "${WORKDIR}"/${PN}-${PV}/var/opt/novell/nici/nicifk.new
doins "${WORKDIR}"/${PN}-${PV}/var/opt/novell/nici/xmgrcfg.wks
dodir /var/novell
dosym ../opt/novell/nici /var/novell/nici
}
pkg_postinst() {
if use x86
then
/var/opt/novell/nici/primenici
elif use amd64
then
/var/opt/novell/nici/primenici64
fi
}
pkg_nofetch() {
einfo "This files require you to register at ${HOMEPAGE} (free account)"
einfo "Please download following file:"
einfo " - ${NOVELL_FILE}"
einfo "from http://download.novell.com/Download?buildid=${NOVELL_BUILDID}"
einfo "and place it in ${DISTDIR}"
einfo ""
einfo "To get rid of downloading files from ${HOMEPAGE}"
einfo "you can create a file /etc/portage/novell.acc"
einfo "containing the novell account infos with following commands"
einfo "# echo \"NOVELL_ACCOUNT_USERNAME=\\\"balduin\\\"\" >> /etc/portage/novell.acc"
einfo "# echo \"NOVELL_ACCOUNT_PASSWORD=\\\"derfisch\\\"\" >> /etc/portage/novell.acc"
}