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

147 lines
4.0 KiB
Bash
Raw Normal View History

# Copyright 1999-2014 Gentoo Foundation
2014-08-16 09:01:13 +02:00
# Distributed under the terms of the GNU General Public License v2
# $Header: $
NOVELL_BUILDID="6Dvlz12hewI~"
NOVELL_FILE32="novell-client-2.0-sp2-patch2-sle11-i586.iso"
NOVELL_FILE64="novell-client-2.0-sp2-patch2-sle11-x86_64.iso"
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="NICI U.S./Worldwide (128 bit) Crypto"
HOMEPAGE="http://www.netiq.com/"
2014-08-16 09:01:13 +02:00
SRC_URI="x86? ( http://${NOVELL_ACCOUNT_USERNAME}:${NOVELL_ACCOUNT_PASSWORD}@cdn.novell.com/prot/${NOVELL_BUILDID}/patchfiles/${NOVELL_FILE32} )
amd64? ( http://${NOVELL_ACCOUNT_USERNAME}:${NOVELL_ACCOUNT_PASSWORD}@cdn.novell.com/prot/${NOVELL_BUILDID}/patchfiles/${NOVELL_FILE64} )
multilib? ( http://${NOVELL_ACCOUNT_USERNAME}:${NOVELL_ACCOUNT_PASSWORD}@cdn.novell.com/prot/${NOVELL_BUILDID}/patchfiles/${NOVELL_FILE32} )"
LICENSE="NetIQ-eDir-88"
2014-08-16 09:01:13 +02:00
SLOT="0"
KEYWORDS="~x86 ~amd64"
IUSE="multilib"
DEPEND=">=app-arch/p7zip-4.15"
RDEPEND="virtual/libc
net-nds/netiq-env"
src_unpack() {
cd "${WORKDIR}"
if use x86
then
narch=i586
nlib=lib
7z x "${DISTDIR}"/${NOVELL_FILE32}
mkdir -p "${WORKDIR}"/${PN}-${PV}
cd ${PN}-${PV}
rpm5_unpack "${WORKDIR}"/suse/${narch}/nici-2.7.6-4.${narch}.rpm
elif use amd64
then
narch=x86_64
nlib=lib64
7z x "${DISTDIR}"/${NOVELL_FILE64}
if has_multilib_profile
then
7z x -y "${DISTDIR}"/${NOVELL_FILE32}
fi
mkdir -p "${WORKDIR}"/${PN}-${PV}
cd ${PN}-${PV}
rpm5_unpack "${WORKDIR}"/suse/${narch}/nici64-${MY_PV}.${narch}.rpm
if has_multilib_profile
then
rpm5_unpack "${WORKDIR}"/suse/i586/nici-2.7.6-4.i586.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:"
if use x86
then
einfo " - ${NOVELL_FILE32}"
elif use amd64
then
einfo " - ${NOVELL_FILE64}"
fi
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"
}