diff options
author | Chris Severance | 2018-02-05 02:34:58 -0500 |
---|---|---|
committer | Chris Severance | 2018-02-05 02:34:58 -0500 |
commit | 7e6385916aa4d513dd188cb9bb98641ba1785792 (patch) | |
tree | d175f4f22b514e0f8cbc71c8d3fb4294277d6ab1 | |
download | aur-7e6385916aa4d513dd188cb9bb98641ba1785792.tar.gz |
Initial Import
-rw-r--r-- | .SRCINFO | 43 | ||||
-rw-r--r-- | PKGBUILD | 106 |
2 files changed, 149 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..757fda217ddd --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,43 @@ +# Generated by mksrcinfo v8 +# Mon Feb 5 07:34:05 UTC 2018 +pkgbase = canon-pixma-ip1500 + pkgdesc = Canon BJ Printer Driver for Pixma ip1500 + pkgver = 2.5 + pkgrel = 2 + url = http://support-au.canon.com.au/contents/AU/EN/0900718516.html + arch = i686 + arch = x86_64 + license = GPL2 + license = LGPL2 + license = custom + depends = cups + depends = ghostscript + depends = libglade + depends = avahi + depends = lz4 + source = http://software.canon-europe.com/files/soft22415/software/iP1500Linux.tar.gz + md5sums = a77599e93a334107eb003e656ff6893b + sha256sums = e885a285d9d5febd4b9feb83b850abfcec709a8a24b8af2b0d55156ff56d27d4 + depends_i686 = glibc + depends_i686 = popt + depends_i686 = libpng12 + depends_i686 = xz + depends_i686 = libjpeg-turbo + depends_i686 = zlib + depends_i686 = libtiff + depends_x86_64 = lib32-glibc + depends_x86_64 = lib32-popt + depends_x86_64 = lib32-libpng12 + depends_x86_64 = lib32-xz + depends_x86_64 = lib32-libjpeg-turbo + depends_x86_64 = lib32-zlib + depends_x86_64 = lib32-libtiff + +pkgname = canon-pixma-ip1500 + depends = cups + depends = ghostscript + depends = libglade + depends = avahi + depends = lz4 + depends = strace + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..4c281637c9ec --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,106 @@ +# Maintainer: Chris Severance aur.severach aATt spamgourmet dott com +# Contributor: Roman Abreu <romanlx at gmail.com> + +set -u +pkgname='canon-pixma-ip1500' # pixmaip1500 +_casepkgname=iP1500Linux +pkgver='2.5' +pkgrel='2' +pkgdesc="Canon BJ Printer Driver for Pixma ip1500" +arch=('i686' 'x86_64') +url='http://support-au.canon.com.au/contents/AU/EN/0900718516.html' +license=('GPL2' 'LGPL2' 'custom') +depends=('cups' 'ghostscript' 'libglade' 'avahi' 'lz4') # 'hplip' 'foomatic' +_libpng='libpng12' +depends_i686=('glibc' 'popt' "${_libpng}" 'xz' 'libjpeg-turbo' 'zlib' 'libtiff') +depends_x86_64=("${depends_i686[@]/#/lib32-}") +_srcdir='iP1500/bjfilter-common-2.50' +source=("http://software.canon-europe.com/files/soft22415/software/${_casepkgname}.tar.gz") +md5sums=('a77599e93a334107eb003e656ff6893b') +sha256sums=('e885a285d9d5febd4b9feb83b850abfcec709a8a24b8af2b0d55156ff56d27d4') + +prepare() { + set -u + cd "${_srcdir%%/*}" + bsdtar -xf 'bjfilter-common-2.50-2.src.rpm' + find -type 'f' -exec chmod 644 '{}' '+' + bsdtar -xf 'bjfilter-common-2.50-2.tar.gz' + + cd "${srcdir}/${_srcdir}" + sed -e '# Fix many clib prototype warnings' \ + -e 's:^#include <stdlib.h>$:&\n#include <unistd.h>\n#include <string.h>\n#include <ctype.h>:g' \ + -e '# Set version of libpng' \ + -e 's:^#include <png.h>$:'"#include <${_libpng}/png.h>:g" \ + -i 'bjfilter/src/bjfimage.c' + + # Fix /usr/local/bin + sed -e 's:/usr/local:/usr:g' -i $(grep --include '*.c' --include '*.h' --include 'Makefile' --include '_*' --include 'configure.in' -larF '/local' .) + set +u +} + +package() { + set -u + cd "${_srcdir}" + + set +u; msg2 'Installing ppd and common'; set -u + install -d "${pkgdir}/usr/share/cups/model" + cp 'ppd/canonpixmaip1500.ppd' "${pkgdir}/usr/share/cups/model" + install -Dp '214/libs_bin'/** -t "${pkgdir}/usr/lib" + install -Dp '214/database'/* -t "${pkgdir}/usr/lib/bjlib" + + set +u; msg2 'Building libs'; set -u + cd "${srcdir}/${_srcdir}/libs" + ./autogen.sh --prefix="${pkgdir}/usr" + make + make install + + set +u; msg2 'Building bjfilter'; set -u + cd "${srcdir}/${_srcdir}/bjfilter" + ./autogen.sh --prefix="${pkgdir}/usr" --program-suffix='pixmaip1500' + sed -e 's:CFLAGS =.*$:& -Wno-unused-result -m32:g' \ + -e "s:-lpng:-l${_libpng#lib}:g" \ + -i 'src/Makefile' + make + make install + + set +u; msg2 'Building pstocanonbj'; set -u + cd "${srcdir}/${_srcdir}/pstocanonbj" + install -d "${pkgdir}/usr/lib/cups/filter/" + ./autogen.sh --prefix="${pkgdir}/usr" + make + make install + + cd "${pkgdir}/usr/lib" + local _l + for _l in *.so.*; do + ln -sf "${_l}" "${_l%%.so*}.so" + done + + cd "${pkgdir}" + + # I can't find this /usr/local to fix it + install -d "${pkgdir}/usr/local/bin" + ln -s '/usr/bin/bjfilterpixmaip1500' -t "${pkgdir}/usr/local/bin" + + gzip 'usr/share/cups/model'/*.ppd + + if ! :; then + depends+=('strace') + mv 'usr/lib/cups/filter/pstocanonbj'{,.arch} + install -Dm755 <(cat << EOF +#!/bin/bash +umask 000 +set > "/tmp/pstocanonbj.\$\$.env" +echo -n 'strace -o foo -f ' > "/tmp/pstocanonbj.\$\$.cmd" +printf '%s' "\$0.arch" >> "/tmp/pstocanonbj.\$\$.cmd" +printf ' %q' "\$@" >> "/tmp/pstocanonbj.\$\$.cmd" +echo "" >> "/tmp/pstocanonbj.\$\$.cmd" +cat > "/tmp/pstocanonbj.\$\$.prn" +<"/tmp/pstocanonbj.\$\$.prn" \ +strace -f -o "/tmp/pstocanonbj.\$\$.strace" '/usr/lib/cups/filter/pstocanonbj.arch' "\$@" 2>"/tmp/pstocanonbj.\$\$.debug" | tee "/tmp/pstocanonbj.\$\$.ufr" +EOF + ) 'usr/lib/cups/filter/pstocanonbj' + fi + set +u +} +set +u |