diff options
author | xiota | 2023-12-08 02:29:53 -0800 |
---|---|---|
committer | xiota | 2023-12-08 02:29:53 -0800 |
commit | 6e8ab7f56a71b4d6629c26cc1c6c5afaca49f6a5 (patch) | |
tree | 72612895c456a13212689545a11780fa7f62a89f | |
parent | a5921e51a0ea1afdef9148d0388ec25522223e7a (diff) | |
download | aur-scangearmp2-mg7700.tar.gz |
minor update
-rw-r--r-- | .SRCINFO | 8 | ||||
-rw-r--r-- | .gitignore | 5 | ||||
-rw-r--r-- | PKGBUILD | 28 | ||||
-rw-r--r-- | scangearmp2-mg7700.install | 53 |
4 files changed, 62 insertions, 32 deletions
@@ -1,18 +1,16 @@ -# Generated by mksrcinfo v8 -# Mon Jan 30 11:14:34 UTC 2017 pkgbase = scangearmp2-mg7700 pkgdesc = Canon ScanGear MP (PIXMA MG3640, PIXMA MG3650, PIXMA MG5740, PIXMA MG5750, PIXMA MG6840, PIXMA MG6850, PIXMA MG7740, PIXMA MG7750) pkgver = 3.20 - pkgrel = 2 + pkgrel = 3 url = http://support-th.canon-asia.com/contents/TH/EN/0100690502.html install = scangearmp2-mg7700.install arch = i686 arch = x86_64 license = custom - depends = gtk2 provides = scangearmp2=3.20 source = http://gdlp01.c-wss.com/gds/5/0100006905/01/scangearmp2-3.20-1-deb.tar.gz sha256sums = 37cad11b1ed7b646b798e0de36585c192ff44849a818f88c0a3daebb4d879dad pkgname = scangearmp2-mg7700 - + depends = gtk2 + depends = libusb diff --git a/.gitignore b/.gitignore index 335ec9573de5..018a3de08144 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,4 @@ -*.tar.gz +* +!PKGBUILD +!.SRCINFO +!.gitignore @@ -1,13 +1,15 @@ -# Maintainer: m4dz <code(at)m4dz(dot)net> +# Maintainer: +# Contributor: m4dz <code(at)m4dz(dot)net> -pkgname=scangearmp2-mg7700 +_pkgname="scangearmp2-mg7700" +pkgname="$_pkgname" pkgver=3.20 -pkgrel=2 +pkgrel=3 pkgdesc='Canon ScanGear MP (PIXMA MG3640, PIXMA MG3650, PIXMA MG5740, PIXMA MG5750, PIXMA MG6840, PIXMA MG6850, PIXMA MG7740, PIXMA MG7750)' -arch=('i686' 'x86_64') url='http://support-th.canon-asia.com/contents/TH/EN/0100690502.html' +arch=('i686' 'x86_64') license=('custom') -depends=('gtk2') + provides=("scangearmp2=$pkgver") install=scangearmp2-mg7700.install source=("http://gdlp01.c-wss.com/gds/5/0100006905/01/scangearmp2-${pkgver}-1-deb.tar.gz") @@ -22,13 +24,17 @@ prepare() { } package() { - cp -r {usr,etc} ${pkgdir} + depends+=( + 'gtk2' + 'libusb' + ) + + cp --reflink=auto -r {usr,etc} "${pkgdir}" - chgrp scanner ${pkgdir}/usr/lib/bjlib/canon_mfp2_net.ini - chmod 664 ${pkgdir}/usr/lib/bjlib/canon_mfp2_net.ini + chmod 664 "${pkgdir}/usr/lib/bjlib/canon_mfp2_net.ini" - rm ${pkgdir}/usr/share/doc/scangearmp2/changelog.Debian.gz + install -dm755 "${pkgdir}/usr/share/licenses/${pkgname}" + mv "${pkgdir}/usr/share/doc/scangearmp2"/LICENSE* "${pkgdir}/usr/share/licenses/${pkgname}" - install -dm755 ${pkgdir}/usr/share/licences/${pkgname} - mv ${pkgdir}/usr/share/doc/scangearmp2/LICENSE* ${pkgdir}/usr/share/licences/${pkgname} + rm -r "${pkgdir}/usr/share/doc" } diff --git a/scangearmp2-mg7700.install b/scangearmp2-mg7700.install index ee20a226b277..79217139c16b 100644 --- a/scangearmp2-mg7700.install +++ b/scangearmp2-mg7700.install @@ -1,26 +1,49 @@ -post_install() { -if [ -x /usr/bin/udevadm ]; then - /usr/bin/udevadm control --reload-rules 2> /dev/null - /usr/bin/udevadm trigger --action=add --subsystem-match=usb 2> /dev/null -fi -cat << EOF -Make sure to add yourself to the scanner group: +# Colored makepkg-like functions +msg_blue() { + printf "${BLUE}==>${BOLD} $1${ALL_OFF}\n" +} + +note1() { + printf "${BLUE}==>${YELLOW} NOTE:${BOLD} $1${ALL_OFF}\n" +} + +note2() { + printf "${BLUE}==> ${BOLD} $1${ALL_OFF}\n" +} + +ALL_OFF="$(tput sgr0)" +BOLD="${ALL_OFF}$(tput bold)" +BLACK="${BOLD}$(tput setaf 0)" +RED="${BOLD}$(tput setaf 1)" +GREEN="${BOLD}$(tput setaf 2)" +YELLOW="${BOLD}$(tput setaf 3)" +BLUE="${BOLD}$(tput setaf 4)" +MAGENTA="${BOLD}$(tput setaf 5)" +CYAN="${BOLD}$(tput setaf 6)" +WHITE="${BOLD}$(tput setaf 7)" -sudo gpasswd -a <Yourusername> scanner -so scangearmp2 can write to the /usr/lib/bjlib/canon_mfp2_net.ini file. -Otherwise it will just complain that it can't find your printer. -EOF +post_install() { + post_upgrade + + note1 "Make sure to add yourself to the scanner group:" + note2 + note2 " sudo gpasswd -a <Yourusername> scanner" + note2 + note2 "so scangearmp2 can write to the /usr/lib/bjlib/canon_mfp2_net.ini file." + note2 "Otherwise it will just complain that it can't find your printer." } post_upgrade() { -if [ -x /usr/bin/udevadm ]; then + chgrp scanner "usr/lib/bjlib/canon_mfp2_net.ini" + + if [ -x /usr/bin/udevadm ]; then /usr/bin/udevadm control --reload-rules 2> /dev/null /usr/bin/udevadm trigger --action=add --subsystem-match=usb 2> /dev/null -fi + fi } post_remove() { -# remove sgmp_setting files -rm -f /var/tmp/canon_sgmp2_setting*.* + # remove sgmp_setting files + rm -f /var/tmp/canon_sgmp2_setting*.* } |