blob: f5e00cefff95ce2c18445713d9cf673dac4e1063 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
|
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="2"
inherit eutils multilib
DESCRIPTION="Samsung binary unified driver"
HOMEPAGE="http://www.samsung.com"
SRC_URI="http://downloads.dell.com/FOLDER01446174M/1/B1265dfw_Linux_v1.00_Driver.tar.gz -> ${P}.tar.gz"
LICENSE="samsung"
SLOT="0"
KEYWORDS="-* ~amd64 ~x86"
# Parallel support looks ugly, not supported in this ebuild
IUSE="scanner qt4"
RESTRICT="mirror strip"
DEPEND=""
RDEPEND="net-print/cups
!net-print/splix
scanner? ( media-gfx/sane-backends )
qt4? ( dev-qt/qtcore:4 )"
S=${WORKDIR}/cdroot/Linux
src_unpack() {
# Trailing garbage error, do not die
tar xozf ${DISTDIR}/${A}
}
src_prepare() {
# Fix permissions
find . -type d -exec chmod 755 '{}' \;
find . -type f -exec chmod 644 '{}' \;
find . -type f -name \*.sh -exec chmod 755 '{}' \;
chmod 755 ./i386/raster*
chmod 755 ./i386/psto*
chmod 755 ./i386/mfp
#chmod 755 ./i386/qt4apps/at_opt/bin/*
#chmod 755 ./x86_64/at_root/usr/sbin/*
chmod 755 ./x86_64/raster*
chmod 755 ./x86_64/psto*
chmod 755 ./x86_64/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
insinto /usr/libexec/cups/filter
insopts -m755
doins ${SARCH}/ps* ${SARCH}/raster*
insinto /usr/libexec/cups/backend
doins ${SARCH}/mfp
dodir /usr/share/cups/model
cp -r noarch/at_opt/share/ppd "${D}"/usr/share/cups/model/dell
gzip "${D}"/usr/share/cups/model/dell/*.ppd
dolib ${SARCH}/at_root/usr/${SLIBDIR}/libmfp.so.1.0.1
dolib ${SARCH}/libscmssc.so
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/*
fi
if use qt4; then
insinto ${SOPT}/share
doins OEM.ini
cp -r noarch/at_opt/share/V* noarch/at_opt/share/help \
noarch/at_opt/share/images noarch/at_opt/share/ui \
noarch/at_opt/share/utils "${D}"/${SOPT}/share
exeinto ${SOPT}/lib
doexe ${SARCH}/qt4apps/at_opt/lib/*
exeinto ${SOPT}/libexec
doexe ${SARCH}/qt4apps/at_opt/bin/*
for i in ${SARCH}/qt4apps/at_opt/bin/*; do
make_wrapper $(basename ${i}) ${SOPT}/libexec/$(basename ${i}) ${SOPT}/libexec ${SOPT}/lib ${SOPT}/bin
done
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
}
|