From c8507d61807c93479eeaf36ed3eb373c175550ef Mon Sep 17 00:00:00 2001 From: Diego Elio Pettenò Date: Thu, 21 Apr 2011 14:28:16 +0000 Subject: Improve ebuild, simplify command handling, only run first time installing/removing, avoid nested ifs. Package-Manager: portage-2.2.0_alpha30/cvs/Linux x86_64 --- media-gfx/iscan-plugin-gt-f500/ChangeLog | 7 ++++- media-gfx/iscan-plugin-gt-f500/Manifest | 10 +++---- .../iscan-plugin-gt-f500-1.0.0.1.ebuild | 31 +++++++++++++--------- media-gfx/iscan-plugin-gt-f720/Manifest | 12 ++++----- 4 files changed, 35 insertions(+), 25 deletions(-) (limited to 'media-gfx') diff --git a/media-gfx/iscan-plugin-gt-f500/ChangeLog b/media-gfx/iscan-plugin-gt-f500/ChangeLog index a14f62fe48af..61e77fc610b5 100644 --- a/media-gfx/iscan-plugin-gt-f500/ChangeLog +++ b/media-gfx/iscan-plugin-gt-f500/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for media-gfx/iscan-plugin-gt-f500 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-gfx/iscan-plugin-gt-f500/ChangeLog,v 1.1 2011/04/20 23:06:58 flameeyes Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-gfx/iscan-plugin-gt-f500/ChangeLog,v 1.2 2011/04/21 14:28:16 flameeyes Exp $ + + 21 Apr 2011; Diego E. Pettenò + iscan-plugin-gt-f500-1.0.0.1.ebuild: + Improve ebuild, simplify command handling, only run first time + installing/removing, avoid nested ifs. *iscan-plugin-gt-f500-1.0.0.1 (20 Apr 2011) diff --git a/media-gfx/iscan-plugin-gt-f500/Manifest b/media-gfx/iscan-plugin-gt-f500/Manifest index 68f544bb7100..269f1c410c66 100644 --- a/media-gfx/iscan-plugin-gt-f500/Manifest +++ b/media-gfx/iscan-plugin-gt-f500/Manifest @@ -2,13 +2,13 @@ Hash: SHA1 DIST iscan-plugin-gt-f500-1.0.0-1.i386.rpm 124153 RMD160 cf624c88aa6678627b69da06c3f257d7cd5ffd8b SHA1 c0abb811f97f5d1c69b2777946c208b404ad0437 SHA256 91ef3ea74051e55e8f5f3aebe98b456b5b2eea997bdb8ad1dd73389ffccf6398 -EBUILD iscan-plugin-gt-f500-1.0.0.1.ebuild 2181 RMD160 3316a4eb97d11fe25e282b6371596638e950816c SHA1 6e809dbc8670ee13924ed9df5e9f1a65afe24976 SHA256 ada0874eb68e5cfba5fdac44f65ac7af0ea56a6f64fc3f3d71101d067986a81f -MISC ChangeLog 471 RMD160 f2038b5911844893a88e66521469b480fe574b43 SHA1 22ef6f86bf2b14955046972c112e63610bf7c14e SHA256 27a2baaef5228f93fc3f60b6a641fc0931ad233202dd8b8a79a419c77af052be +EBUILD iscan-plugin-gt-f500-1.0.0.1.ebuild 2030 RMD160 6e6135eb920213350a4e962f88f9c930fa6f4de0 SHA1 4b74a7c2f5ec045a942e0f33e508fe3d52dff8b0 SHA256 09acae8dbe7be95b5ed4c9553c074ad0ea1b48813ebbfa889bb9491ab4782702 +MISC ChangeLog 673 RMD160 78b949c35da4a6d8d2d75c388fc03eab3c08ef55 SHA1 9a92128c32b73ef27782e2ee0476900d5028ed09 SHA256 180e2c498bdfc9bf974fbc606fb17253c75381faa18c6f832659d1949248a46b MISC metadata.xml 792 RMD160 bc1c9b06dd3ea55b3a345a25233f92d433117d7c SHA1 4c72c20441004cd1e8ae5ca3d4baf4ac7d7af204 SHA256 56fc60400299f13855309f3d6c0a7e4ca6164ca24df40cb2b4fc48e139d0573c -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (GNU/Linux) -iEYEARECAAYFAk2vZvEACgkQAiZjviIA2XinpgCglUrVmYySYqW7HR8lEXlQ7b+L -GSwAnAgVb+q/XazXnssWcf8UA0UJaxZx -=+Iq1 +iEYEARECAAYFAk2wPwwACgkQAiZjviIA2XgusgCeLODY9yYrB372TB3oreZkNvKl +KOMAoJ7Hbxe5CL689nbjGGI16EisW0As +=rBih -----END PGP SIGNATURE----- diff --git a/media-gfx/iscan-plugin-gt-f500/iscan-plugin-gt-f500-1.0.0.1.ebuild b/media-gfx/iscan-plugin-gt-f500/iscan-plugin-gt-f500-1.0.0.1.ebuild index 8a3248431ac1..178bbb2ea0f1 100644 --- a/media-gfx/iscan-plugin-gt-f500/iscan-plugin-gt-f500-1.0.0.1.ebuild +++ b/media-gfx/iscan-plugin-gt-f500/iscan-plugin-gt-f500-1.0.0.1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-gfx/iscan-plugin-gt-f500/iscan-plugin-gt-f500-1.0.0.1.ebuild,v 1.1 2011/04/20 23:06:58 flameeyes Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-gfx/iscan-plugin-gt-f500/iscan-plugin-gt-f500-1.0.0.1.ebuild,v 1.2 2011/04/21 14:28:16 flameeyes Exp $ EAPI="4" @@ -33,38 +33,43 @@ src_install() { dodoc "usr/share/doc/${MY_P}/"* - if ! use minimal; then - # install scanner plugins - exeinto "/usr/$(get_libdir)/iscan" - doexe "${WORKDIR}/usr/$(get_libdir)/iscan/"* - fi + use minimal && return + # install scanner plugins + exeinto "/usr/$(get_libdir)/iscan" + doexe "${WORKDIR}/usr/$(get_libdir)/iscan/"* +} + +pkg_setup() { + basecmd="iscan-registry --COMMAND interpreter usb 0x04b8 0x0121 '/usr/$(get_libdir)/iscan/libesint41.so.2 /usr/share/iscan/esfw41.bin'" } pkg_postinst() { elog - elog "Firmware file esfw8b.bin for Epson Perfection 2480/2580 PHOTO" + elog "Firmware file esfw41.bin for Epson Perfection 2480/2580 PHOTO" elog "has been installed in /usr/share/iscan." elog use minimal && return + [[ -n ${REPLACING_VERSIONS} ]] && return - # Needed for scaner to work properly. + # Needed for scanner to work properly. if [[ ${ROOT} == "/" ]]; then - iscan-registry --add interpreter usb 0x04b8 0x0121 "/usr/$(get_libdir)/iscan/libesint41.so.2 /usr/share/iscan/esfw41.bin" + eval ${basecmd/COMMAND/add} else ewarn "Unable to register the plugin and firmware when installing outside of /." ewarn "execute the following command yourself:" - ewarn "iscan-registry --add interpreter usb 0x04b8 0x0121 '/usr/$(get_libdir)/iscan/libesint41.so.2 /usr/share/iscan/esfw41.bin'" + ewarn "${basecmd/COMMAND/add}" fi } pkg_prerm() { use minimal && return + [[ -n ${REPLACED_BY_VERSION} ]] && return if [[ ${ROOT} == "/" ]]; then - iscan-registry --remove interpreter usb 0x04b8 0x0121 "/usr/$(get_libdir)/iscan/libesint41.so.2 /usr/share/iscan/esfw41.bin" + eval ${basecmd/COMMAND/remove} else - ewarn "Unable to register the plugin and firmware when installing outside of /." + ewarn "Unable to de-register the plugin and firmware when installing outside of /." ewarn "execute the following command yourself:" - ewarn "iscan-registry --remove interpreter usb 0x04b8 0x0121 '/usr/$(get_libdir)/iscan/libesint41.so.2 /usr/share/iscan/esfw41.bin'" + ewarn "${basecmd/COMMAND/remove}" fi } diff --git a/media-gfx/iscan-plugin-gt-f720/Manifest b/media-gfx/iscan-plugin-gt-f720/Manifest index 36c3f4850fc3..712c8d421703 100644 --- a/media-gfx/iscan-plugin-gt-f720/Manifest +++ b/media-gfx/iscan-plugin-gt-f720/Manifest @@ -3,13 +3,13 @@ Hash: SHA1 DIST esci-interpreter-gt-f720-0.0.1-2.i386.rpm 381387 RMD160 e637a95a6139b80e194f1be1a747024460c784b6 SHA1 5370133ec5e5b8bc5e5a3a152a4e0ba04eb03199 SHA256 c47d2acfb6de4d9c300e2f26df5b8a7c250e07195245d638457b8a4ea61f0903 DIST esci-interpreter-gt-f720-0.0.1-2.x86_64.rpm 170040 RMD160 2e366c9428f0210a349fa29a6d249ca7a3b336ec SHA1 7e8e5170e552a29a8b49d901ebcdcb69059e1d4f SHA256 9e82fc5110b4f2b08402ac4e0a4391665b7edccaba43df4299f5c48b60faaabb -EBUILD iscan-plugin-gt-f720-0.0.1.ebuild 1723 RMD160 baf04330f0083e5ed9385994f633e9bff69da177 SHA1 55ddae0fb7856b438f4e39c5e56e0fe77c0de99a SHA256 fd392911bd0315dca166d91c32e598ae9c384957991200bccf1814f5a42b8290 -MISC ChangeLog 596 RMD160 599c53ea79cbb480b76a4321db171a067a31033c SHA1 4ba5667aee487b93d553bac45b29c6b62caa0ef6 SHA256 753044d3c491b9671d4ace644948be6802da36cc5e045e71b49e69d73a6920b0 +EBUILD iscan-plugin-gt-f720-0.0.1.ebuild 1853 RMD160 c15edb4e684e3b99a289b080d803f9609f2f9cae SHA1 9b8bc8d4292ce81a6495b123dc4b8c9c8a3e1998 SHA256 86dbd5bc54fe268e83b300218c23df2abe0f29b67d10c07ffdca0e2e0d42d541 +MISC ChangeLog 716 RMD160 8751d5f86b61a09d2303b2c794c90c0785cbb964 SHA1 e874238ab3720d01d072c404351e420b85c6764e SHA256 7835f9973e4bd2dff490cdc9970879b003f1e841623eb048bde901101337aef6 MISC metadata.xml 568 RMD160 81d735e021a1f6185f5945dd1a828cdfc8d6d771 SHA1 cfd1e3104a44ef3232a25fdeddd628223cd3ee5c SHA256 1f39df68079f434adebe554c15783ff5b382b9c5d7a2f6289656599fbee4f814 -----BEGIN PGP SIGNATURE----- -Version: GnuPG v2.0.11 (GNU/Linux) +Version: GnuPG v2.0.17 (GNU/Linux) -iEYEARECAAYFAkrxiCwACgkQkKaRLQcq0GJdygCgp7hZ4uMOmidHtR8s5x8OW2/A -X58AnAuMSarAZMkzPJR3zfJYwYwzQsVg -=iT0Y +iEYEARECAAYFAk2wPzoACgkQAiZjviIA2XjZWACgrVjXrfUm56jtDGxEm8+Edx5m +JIkAnjSgAOgxJ+ovD/aG7Ld8imgMALMF +=jDLY -----END PGP SIGNATURE----- -- cgit v1.2.3-65-gdbad