LINUX.ORG.RU
решено ФорумTalks

[История успеха] Scx-4x21

 


0

0

cat samsung-unifieddriver-3.00.62-r1.ebuild

# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: LOR HERE $

EAPI="2"
inherit eutils multilib

DESCRIPTION="Samsung binary unified driver"
HOMEPAGE="http://www.samsung.com"
SRC_URI="http://org.downloadcenter.samsung.com/downloadfile/ContentsFile.aspx?VPath=DR/200911/20091118145843093/UnifiedLinuxDriver.tar.gz -> ${P}.tar.gz"

LICENSE="samsung"
SLOT="0"
KEYWORDS="-* ~amd64 ~x86"
IUSE="scanner"
RESTRICT="mirror strip"

DEPEND=""
RDEPEND="net-print/cups
	sys-libs/libstdc++-v3
	!net-print/splix
	scanner? ( media-gfx/sane-backends )
	qt4? ( x11-libs/qt-core:4 )"

S=${WORKDIR}/cdroot/Linux

src_unpack() {
	tar xozf ${DISTDIR}/${A}
}

src_prepare() {
	find . -type d -exec chmod 755 '{}' \;
	find . -type f -exec chmod 644 '{}' \;
	find . -type f -name \*.sh -exec chmod 755 '{}' \;
	chmod 755 ./i386/at_root/usr/sbin/*
	chmod 755 ./i386/at_root/usr/lib/cups/filter/raster*
	chmod 755 ./i386/at_root/usr/lib/cups/filter/pscms
	chmod 755 ./i386/at_root/usr/lib/cups/backend/mfp
	chmod 755 ./i386/qt4apps/at_opt/bin/*
	chmod 755 ./x86_64/at_root/usr/sbin/*
	chmod 755 ./x86_64/at_root/usr/lib64/cups/filter/raster*
	chmod 755 ./x86_64/at_root/usr/lib64/cups/filter/pscms
	chmod 755 ./x86_64/at_root/usr/lib64/cups/backend/mfp
	chmod 755 ./x86_64/qt4apps/at_opt/bin/*
}

src_install() {
	SOPT="/opt/Samsung/mfp"
	if [ "${ABI}" == "amd64" ]; then
		SARCH="x86_64"
		SLIBDIR="lib64"
	else
		SARCH="i386"
		SLIBDIR="lib"
	fi

	# Printer files
	dodir /usr/libexec
	cp -r ${SARCH}/at_root/usr/${SLIBDIR}/cups "${D}"/usr/libexec
	dodir /usr/share/cups/model
	cp -r noarch/at_opt/share/ppd "${D}"/usr/share/cups/model/samsung
	gzip "${D}"/usr/share/cups/model/samsung/*.ppd
	dolib ${SARCH}/at_root/usr/${SLIBDIR}/libmfp.so.1.0.1

	if use scanner; then
		insinto /etc/sane.d
		doins noarch/at_root/etc/sane.d/smfp.conf

		exeinto /usr/$(get_libdir)/sane/
		doexe ${SARCH}/at_root/usr/${SLIBDIR}/sane/*
		
		dosym /usr/$(get_libdir)/sane/libsane-smfp.so.1.0.1 /usr/$(get_libdir)/sane/libsane-smfp.so.1
	fi
}

pkg_postinst() {
	if use scanner; then
		elog "You need to add smfp to /etc/sane.d/dll.conf:"
		elog " # echo smfp >> /etc/sane.d/dll.conf"
	fi
}


Последнее исправление: ezoteric (всего исправлений: 1)

/me радостно делает ebuild samsung-mfp-3.00.62-r1.ebuild digest...

DoctorSinus ★★★★★
()
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.