118 lines
3.7 KiB
Bash
118 lines
3.7 KiB
Bash
# Copyright 1999-2010 Gentoo Foundation
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
# $Header: $
|
|
|
|
NOVELL_BUILDID="APl_7DgzXGA~"
|
|
NOVELL_FILE32="iprntlinuxclient504.tar.gz"
|
|
RESTRICT="mirror strip"
|
|
|
|
inherit novell eutils rpm5 nsplugins versionator
|
|
|
|
MY_PV=$(replace_version_separator 3 '-')
|
|
|
|
DESCRIPTION="Novell iPrint Client for Linux Low Security"
|
|
HOMEPAGE="http://www.novell.com"
|
|
SRC_URI="http://${NOVELL_ACCOUNT_USERNAME}:${NOVELL_ACCOUNT_PASSWORD}@cdn.novell.com/prot/${NOVELL_BUILDID}/${NOVELL_FILE32}"
|
|
|
|
LICENSE="Novell-NCL"
|
|
SLOT="0"
|
|
KEYWORDS="~x86 ~amd64"
|
|
IUSE="gtk linguas_cs linguas_de linguas_es linguas_fr linguas_hu linguas_it linguas_ja linguas_pl linguas_pt linguas_ru linguas_sl linguas_zh_cn linguas_zh_tw"
|
|
|
|
DEPEND="media-gfx/imagemagick"
|
|
|
|
RDEPEND="virtual/libc
|
|
dev-libs/atk
|
|
dev-libs/expat
|
|
dev-libs/glib
|
|
media-libs/fontconfig
|
|
media-libs/freetype
|
|
media-libs/libpng
|
|
>=net-print/cups-1.2
|
|
sys-libs/zlib
|
|
x11-libs/gtk+
|
|
x11-libs/pango
|
|
x11-libs/cairo
|
|
x11-libs/libXrender
|
|
x11-libs/libX11
|
|
x11-libs/libXext
|
|
!net-print/novell-iprint-xclient-sh
|
|
!net-print/novell-iprint-xclient-sl"
|
|
|
|
src_unpack() {
|
|
unpack ${A}
|
|
mkdir -p "${WORKDIR}"/${PN}-${MY_PV}
|
|
cd ${PN}-${MY_PV}
|
|
if use x86
|
|
then
|
|
ndir=x86
|
|
narch=i586
|
|
nlib=lib
|
|
elif use amd64
|
|
then
|
|
ndir=x86_64
|
|
narch=x86_64
|
|
nlib=lib64
|
|
fi
|
|
rpm5_unpack "${WORKDIR}"/linux-sled11/${ndir}/novell-iprint-xclient-sl-${MY_PV}.${narch}.rpm
|
|
}
|
|
|
|
src_compile() {
|
|
CUPSDIR=`cups-config --serverbin`
|
|
}
|
|
|
|
src_install() {
|
|
for x in cs de es fr hu it ja pl pt ru sl zh_cn zh_tw
|
|
do
|
|
if use linguas_${x}
|
|
then
|
|
cp "${WORKDIR}"/${PN}-${MY_PV}/opt/novell/iprint/share/locale/${x}/LC_MESSAGES/iprint-client.mo "${WORKDIR}"/${x}.mo
|
|
domo "${WORKDIR}"/${x}.mo
|
|
fi
|
|
done
|
|
insinto /etc/opt/novell/iprint
|
|
doins "${WORKDIR}"/${PN}-${MY_PV}/etc/opt/novell/iprint/*
|
|
into /opt/novell/iprint
|
|
dobin "${WORKDIR}"/${PN}-${MY_PV}/opt/novell/iprint/bin/*
|
|
insinto /opt/novell/iprint/plugin
|
|
doins "${WORKDIR}"/${PN}-${MY_PV}/opt/novell/iprint/plugin/npnipp.so
|
|
doins "${WORKDIR}"/${PN}-${MY_PV}/opt/novell/iprint/plugin/libiprint-plugin.so
|
|
inst_plugin /opt/novell/iprint/plugin/npnipp.so
|
|
inst_plugin /opt/novell/iprint/plugin/libiprint-plugin.so
|
|
insinto /usr/share/applications
|
|
doins "${WORKDIR}"/${PN}-${MY_PV}/usr/share/applications/*.desktop
|
|
dosed "s:/opt/novell/iprint/share/icons/iprint_32.gif:iprint.png:g" /usr/share/applications/novell-iprint.desktop
|
|
dosym ../applications/novell-iprint.desktop /usr/share/autostart/novell-iprint.desktop
|
|
exeinto ${CUPSDIR}/backend
|
|
doexe "${WORKDIR}"/${PN}-${MY_PV}/usr/${nlib}/cups/backend/*
|
|
dosym ${CUPSDIR} /usr/$(get_libdir)/cups
|
|
keepdir /var/opt/novell/log/iprint/client
|
|
into /opt/novell
|
|
dolib "${WORKDIR}"/${PN}-${MY_PV}/opt/novell/${nlib}/*
|
|
doman "${WORKDIR}"/${PN}-${MY_PV}/opt/novell/man/*/*
|
|
convert -size 32x32 "${WORKDIR}"/${PN}-${MY_PV}/opt/novell/iprint/share/icons/iprint_32.gif "${WORKDIR}"/iprint_32.png
|
|
newicon "${WORKDIR}"/iprint_32.png iprint.png
|
|
|
|
if use x86
|
|
then
|
|
doenvd "${FILESDIR}"/80novell-iprint
|
|
elif use amd64
|
|
then
|
|
doenvd "${FILESDIR}"/80novell-iprint64
|
|
fi
|
|
}
|
|
|
|
pkg_nofetch() {
|
|
einfo "This files require you to register at ${HOMEPAGE} (free account)"
|
|
einfo "Please download following file:"
|
|
einfo " - ${NOVELL_FILE32}"
|
|
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"
|
|
}
|