wok-current view brscan/receipt @ rev 9834
Up: bluez to 4.93.
| author | Christopher Rogers <slaxemulator@gmail.com> | 
|---|---|
| date | Sun May 15 12:45:56 2011 +0000 (2011-05-15) | 
| parents | 2e29b2259f48 | 
| children | 162bb2a173bd | 
 line source
     1 # SliTaz package receipt.
     3 PACKAGE="brscan"
     4 VERSION="0.2.4"
     5 CATEGORY="office"
     6 SHORT_DESC="Brother Scanner driver for SANE."
     7 MAINTAINER="pascal.bellard@slitaz.org"
     8 SOURCE="$PACKAGE-src"
     9 TARBALL="$SOURCE-$VERSION.tar.gz"
    10 WEB_SITE="http://solutions.brother.com/linux/sol/printer/linux/sane_drivers.html"
    11 WGET_URL="http://solutions.brother.com/Library/sol/printer/linux/rpmfiles/sane_source/$TARBALL"
    12 DEPENDS="sane-backends"
    13 BUILD_DEPENDS="file"
    14 TAGS="scanner driver"
    16 # Rules to configure and make the package.
    17 compile_rules()
    18 {
    19 	cd $src/brscan
    20 	./configure --prefix=/usr --infodir=/usr/share/info \
    21 	--sysconfdir=/etc --localstatedir=/var \
    22 	--mandir=/usr/share/man \
    23 	$CONFIGURE_ARGS || return 1
    24 	sed -i '/mk_package/d' Makefile
    25 	make -j1 && {
    26 		cd ..
    27 		mkdir -p $DESTDIR
    28 		cp -a brscan $DESTDIR
    29 	}
    30 }
    32 # Rules to gen a SliTaz package suitable for Tazpkg.
    33 genpkg_rules()
    34 {
    35 	mkdir -p $fs/usr/bin $fs/usr/lib/sane
    36 	for i in BHL BHL2 BHL2FB BHLFB BHMFB BHminiFB YL4 YL4FB \
    37 		 ZL2 ZL2FB ZLe ZLeFB ; do
    38 		mkdir -p $fs/usr/local/Brother/sane/GrayCmData/$i
    39 		cp -a $_pkg/brscan/libbrcolm/GrayCmData/$i/* \
    40 			$fs/usr/local/Brother/sane/GrayCmData/$i
    41 		chmod 644 $fs/usr/local/Brother/sane/GrayCmData/$i/*
    42 	done
    43 	cp $_pkg/brscan/backend_brscan/.libs/libsane-brother.so.1.0.7 \
    44 		$fs/usr/lib/sane/libsane-brother.so.1.0.7
    45 	ln -s libsane-brother.so.1.0.7 $fs/usr/lib/sane/libsane-brother.so.1
    46 	ln -s libsane-brother.so.1 $fs/usr/lib/sane/libsane-brother.so
    47 	cp $_pkg/brscan/libbrscandec/libbrscandec.so.1.0.0 \
    48 		$fs/usr/lib/libbrscandec.so.1.0.0
    49 	chmod 755 $fs/usr/lib/libbrscandec.so.1.0.0
    50 	ln -s libbrscandec.so.1.0.0 $fs/usr/lib/libbrscandec.so.1
    51 	ln -s libbrscandec.so.1 $fs/usr/lib/libbrscandec.so
    52 	cp $_pkg/brscan/libbrcolm/libbrcolm.so.1.0.0 \
    53 		$fs/usr/lib/libbrcolm.so.1.0.0
    54 	ln -s libbrcolm.so.1.0.0 $fs/usr/lib/libbrcolm.so.1
    55 	ln -s libbrcolm.so.1 $fs/usr/lib/libbrcolm.so
    56 	cp $_pkg/brscan/mk_package/Brsane.ini \
    57 		$fs/usr/local/Brother/sane/Brsane.ini
    58 	cp $_pkg/brscan/mk_package/brsanenetdevice.cfg \
    59 		$fs/usr/local/Brother/sane/brsanenetdevice.cfg
    60 	chmod 666 $fs/usr/local/Brother/sane/brsanenetdevice.cfg
    61 	cp $_pkg/brscan/netconfig/brsaneconfig \
    62 		$fs/usr/local/Brother/sane/brsaneconfig
    63 	ln -s /usr/local/Brother/sane/brsaneconfig $fs/usr/bin/brsaneconfig
    64 	cp $_pkg/brscan/mk_package/setupSaneScan \
    65 		$fs/usr/local/Brother/sane/setupSaneScan
    66 	chmod 755 $fs/usr/local/Brother/sane/setupSaneScan
    67 }
    69 # Pre and post install and remove commands for Tazpkg.
    70 post_install()
    71 {
    72 	chroot $1/ /usr/local/Brother/sane/setupSaneScan -i
    73 }
    75 pre_remove()
    76 {
    77 	chroot $1/ /usr/local/Brother/sane/setupSaneScan -e
    78 }