102 lines
3.0 KiB
Bash
102 lines
3.0 KiB
Bash
# Copyright 1999-2026 Gentoo Authors
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
EAPI=8
|
|
|
|
inherit desktop rpm
|
|
|
|
SDK_PV=1.18.6.1
|
|
|
|
DESCRIPTION="LightScribe System Software and public SDK (binary only)"
|
|
HOMEPAGE="https://web.archive.org/web/20200404105932/http://www.pawtec.com/lightscribe_files/"
|
|
SRC_URI="
|
|
https://web.archive.org/web/20200404105932/http://www.pawtec.com/lightscribe_files/Linux/LSS/lightscribe-${PV}-linux-2.6-intel.rpm
|
|
https://web.archive.org/web/20200404105919/http://www.pawtec.com/lightscribe_files/Linux/lightscribePublicSDK-${SDK_PV}-linux-2.6-intel.rpm
|
|
https://web.archive.org/web/20081121152231if_/http://www.lacie.com/download/images/LightScribe_logo_black.zip
|
|
"
|
|
|
|
LICENSE="lightscribe lightscribeSDK"
|
|
SLOT="0"
|
|
KEYWORDS="~amd64 ~x86"
|
|
|
|
BDEPEND="
|
|
app-arch/rpm
|
|
media-gfx/imagemagick
|
|
"
|
|
RDEPEND="
|
|
x11-terms/xterm
|
|
!app-cdr/lightscribe
|
|
!app-cdr/liblightscribe
|
|
"
|
|
|
|
RESTRICT="mirror strip"
|
|
S=${WORKDIR}
|
|
|
|
QA_PRESTRIPPED="
|
|
opt/lightscribe/lib*/liblightscribe.so.0.0.1
|
|
opt/lightscribe/lib*/libstdcv3.so.5.0.7
|
|
"
|
|
QA_DT_HASH=${QA_PRESTRIPPED}
|
|
|
|
src_prepare() {
|
|
default
|
|
|
|
# Keep the bundled GCC 3 runtime under a private, non-conflicting name.
|
|
sed -i 's/libstdc++.so.5/libstdcv3.so.5/g' \
|
|
usr/lib/liblightscribe.so.1 \
|
|
usr/lib/lightscribe/libstdc++.so.5.0.7 || die
|
|
|
|
eapply "${FILESDIR}"/liblightscribe-gcc43-1.patch
|
|
|
|
convert -colorspace RGB "${WORKDIR}"/LightScribe_logo_black.eps \
|
|
-transparent white -background transparent -resize '128x128>' \
|
|
-size 128x128 xc:transparent +swap -gravity center -composite \
|
|
"${T}"/${PN}.png || die
|
|
}
|
|
|
|
src_install() {
|
|
local ls_libdir=lib
|
|
[[ ${ARCH} == amd64 ]] && ls_libdir=lib32
|
|
local lsdir="opt/lightscribe/${ls_libdir}"
|
|
|
|
exeinto /${lsdir}/lightscribe/updates
|
|
doexe usr/lib/lightscribe/updates/fallback.sh
|
|
exeinto /${lsdir}/lightscribe
|
|
doexe usr/lib/lightscribe/elcu.sh
|
|
|
|
exeinto /${lsdir}
|
|
newexe usr/lib/liblightscribe.so.1 liblightscribe.so.0.0.1
|
|
newexe usr/lib/lightscribe/libstdc++.so.5.0.7 libstdcv3.so.5.0.7
|
|
dosym liblightscribe.so.0.0.1 /${lsdir}/liblightscribe.so.1
|
|
dosym liblightscribe.so.0.0.1 /${lsdir}/liblightscribe.so
|
|
dosym libstdcv3.so.5.0.7 /${lsdir}/libstdcv3.so.5
|
|
|
|
insinto /usr/include/lightscribe
|
|
doins -r usr/include/.
|
|
insinto /etc
|
|
doins -r etc/.
|
|
sed -e "s%/usr/lib%/${lsdir}%" -e 's%update%updates%' \
|
|
-i "${ED}"/etc/lightscribe.rc || die
|
|
|
|
dodoc usr/share/doc/*.* usr/share/doc/lightscribe-sdk/*.* \
|
|
usr/share/doc/lightscribe-sdk/docs/*
|
|
docinto sample/lsprint
|
|
dodoc usr/share/doc/lightscribe-sdk/sample/lsprint/*
|
|
|
|
echo "LDPATH=/${lsdir}" > "${T}"/80lightscribe || die
|
|
doenvd "${T}"/80lightscribe
|
|
|
|
doicon "${T}"/${PN}.png
|
|
make_desktop_entry \
|
|
"su-to-root -X -c \"xterm -C /${lsdir}/lightscribe/elcu.sh\"" \
|
|
"LightScribe System Software Contrast Changer" ${PN} \
|
|
"AudioVideo;DiscBurning;Recorder;"
|
|
}
|
|
|
|
pkg_postinst() {
|
|
local ls_libdir=lib
|
|
[[ ${ARCH} == amd64 ]] && ls_libdir=lib32
|
|
einfo "Enhanced Contrast can be configured with:"
|
|
einfo "/opt/lightscribe/${ls_libdir}/lightscribe/elcu.sh"
|
|
}
|