You are not logged in.
Hello at all,
so i´m very new in the linux world and i love it especially when i found the arch linux it´s absolutely amazing and with the arch wiki i found till now every solution for all my problems, it´s genious , i think you can find every answer for all thinkable questions in the arch wiki if you use it correct ;-), i would change the name to "oracle" haha
but now i need litte help for my problem and i only ask, because i need urgently to print something and it seems that after the pacman update to 4.2 i´m not able to install the canon-mp560 driver from the AUR because the function package() is essential now
i read the pkgbuild wiki but i can´t found the solution where and why i put this function ?
that´s the pkgbuild
# Maintainer: Daniel Hillenbrand <codeworkx [at] bbqlinux [dot] org>
# Modified original script from: Alessio Fachechi
pkgname=cnijfilter-mp560
pkgver=3.20
pkgsubver=1
pkgrel=3
pkgdesc="Canon IJ Printer Driver (MP560 series)"
url="http://software.canon-europe.com/products/0010756.asp"
arch=('i686' 'x86_64')
license=('custom')
depends=('patch' 'libcups' 'cups' 'popt' 'ghostscript' 'gsfonts' 'atk>=1.9.0' 'gtk2>=2.8.0' 'pango>=1.12.3' 'libpng>=1.2.8' 'libtiff' 'cairo>=1.0.2' 'libxml2>=2.6.24' 'fontconfig>=2.3.0' 'libxinerama')
makedepends=('autoconf>=2.13' 'automake>=1.6' 'tar' 'make' 'gcc')
conflicts=('cnijfilter-common')
install=cnijfilter-mp560.install
source=(http://gdlp01.c-wss.com/gds/7/0100002367/01/cnijfilter-source-3.20-1.tar.gz
grayscale.patch
cups.patch
libpng15.patch)
md5sums=('0a40b46016511d59d1d0a3d3d9a653dd'
'f3d01db16494ae9ca16d9be8e9cd193b'
'abd0c2ee747e20558adcf327bb3a8633'
'e75b117cd7a399c0861c4e8e10c30294')
build() {
patch -p0 -d ${srcdir}/cnijfilter-source-${pkgver}-${pkgsubver}/ppd < grayscale.patch
cd ${srcdir}/cnijfilter-source-${pkgver}-${pkgsubver}
patch -p1 -i ${srcdir}/cups.patch
patch -p1 -i ${srcdir}/libpng15.patch
cd ${srcdir}/cnijfilter-source-${pkgver}-${pkgsubver}/libs
./autogen.sh --prefix=/usr --program-suffix=mp560
make || return 1
make install DESTDIR=${pkgdir} || return 1
cd ${srcdir}/cnijfilter-source-${pkgver}-${pkgsubver}/cngpij
./autogen.sh --prefix=/usr --program-suffix=mp560 --enable-progpath=/usr/bin
make || return 1
make install DESTDIR=${pkgdir} || return 1
cd ${srcdir}/cnijfilter-source-${pkgver}-${pkgsubver}/cnijfilter
./autogen.sh --prefix=/usr --program-suffix=mp560 --enable-progpath=/usr/bin
make || return 1
make install DESTDIR=${pkgdir} || return 1
cd ${srcdir}/cnijfilter-source-${pkgver}-${pkgsubver}/pstocanonij
./autogen.sh --prefix=/usr --program-suffix=mp560 --enable-progpath=/usr/bin
make || return 1
make install DESTDIR=${pkgdir} || return 1
cd ${srcdir}/cnijfilter-source-${pkgver}-${pkgsubver}/lgmon
./autogen.sh --prefix=/usr --program-suffix=mp560 --enable-progpath=/usr/bin
make || return 1
make install DESTDIR=${pkgdir} || return 1
cd ${srcdir}/cnijfilter-source-${pkgver}-${pkgsubver}/backend
./autogen.sh --prefix=/usr --program-suffix=mp560 --enable-progpath=/usr/bin
make || return 1
make install DESTDIR=${pkgdir} || return 1
cd ${srcdir}/cnijfilter-source-${pkgver}-${pkgsubver}/backendnet
./autogen.sh --prefix=/usr --program-suffix=mp560 --enable-progpath=/usr/bin
make || return 1
make install DESTDIR=${pkgdir} || return 1
cd ${srcdir}/cnijfilter-source-${pkgver}-${pkgsubver}/cngpijmon/cnijnpr
./autogen.sh --prefix=/usr --program-suffix=mp560 --enable-progpath=/usr/bin
make || return 1
make install DESTDIR=${pkgdir} || return 1
cd ${srcdir}/cnijfilter-source-${pkgver}-${pkgsubver}/ppd
./autogen.sh --prefix=/usr --program-suffix=mp560
make || return 1
make install DESTDIR=${pkgdir} || return 1
cd ${srcdir}/cnijfilter-source-${pkgver}-${pkgsubver}
install -d ${pkgdir}/usr/lib/bjlib
install -m 755 360/database/* ${pkgdir}/usr/lib/bjlib
install -s -m 755 360/libs_bin/*.so.* ${pkgdir}/usr/lib
install -s -m 755 com/libs_bin/*.so.* ${pkgdir}/usr/lib
install -D LICENSE-cnijfilter-${pkgver}EN.txt ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE-cnijfilter-${pkgver}EN.txt
}
it would be very nice if someone can look over that and maybe give me an evidence
best regards
sudomaso
Last edited by sudomaso (2015-01-11 17:22:27)
Offline
Have you tried adding a package() function at the end? It could be empty or do nothing relevant. Eventually, this PKGBUILD would need to be reworked, so a comment for the maintainer on its AUR page would be appropriate.
Offline
See https://wiki.archlinux.org/index.php/Cr … kage.28.29
sudomaso, please edit your post.
When posting configs, code or command output, please use [ code ] tags, not [ quote ] tags https://bbs.archlinux.org/help.php#bbcode
like this
It makes the code more readable and - in case of longer listings - more convenient to scroll through.
Offline
thx for your answers
adding an empty package function at the end gives me an error
i read the wiki but i found not really the solution, for 3 days i simply renamed the build function in package and i get an error.
i tried it again just now and the installation was successfull but the driver could not be found when adding the printer??
what could be wrong now??
best regards
sudomaso
Offline
Putting an empty package function was not a good idea. That "worked" because makepkg did everything you told it to. You said "make and empty package - and it did, that's why nothing was actually installed.
Just move all the install commands to the package function.
I was also going to suggest making an array of all those subdirs and looping through them for each the build and the install - I would follow this with a recommendation to request that upstream provide a top-level Makefile. But there alread is a top level makefile. Don't bother with those dozen subdirectories, just build and install from the top-level make.
EDIT: note this is also meant to be a split package that calling this mp560 seems wrong as it actually includes various others. The mp560 suffix should be one of many split packages to come from this.
Last edited by Trilby (2015-01-11 21:55:26)
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline
puuh honestly said that´s too much for me in the beginning
i think, i should first understand what is even a package haha
there are too many unknown variables in your post for me
pls it would be very very nice if anybody could present me the solution for a working pkgbuild, i´m totally exhausted
best chillymillyvanilly regards
sudomaso
Last edited by sudomaso (2015-01-16 19:32:59)
Offline
first, remove all the "|| return 1" stuf, makepkg handles any errors itself.
Functionally speaking the current build function has 3 parts :
A - apply patches
patch -p0 -d ${srcdir}/cnijfilter-source-${pkgver}-${pkgsubver}/ppd < grayscale.patch
cd ${srcdir}/cnijfilter-source-${pkgver}-${pkgsubver}
patch -p1 -i ${srcdir}/cups.patch
patch -p1 -i ${srcdir}/libpng15.patch
B make/make install
cd ${srcdir}/cnijfilter-source-${pkgver}-${pkgsubver}/libs
./autogen.sh --prefix=/usr --program-suffix=mp560
make || return 1
make install DESTDIR=${pkgdir} || return 1
cd ${srcdir}/cnijfilter-source-${pkgver}-${pkgsubver}/cngpij
./autogen.sh --prefix=/usr --program-suffix=mp560 --enable-progpath=/usr/bin
make || return 1
make install DESTDIR=${pkgdir} || return 1
cd ${srcdir}/cnijfilter-source-${pkgver}-${pkgsubver}/cnijfilter
./autogen.sh --prefix=/usr --program-suffix=mp560 --enable-progpath=/usr/bin
make || return 1
make install DESTDIR=${pkgdir} || return 1
cd ${srcdir}/cnijfilter-source-${pkgver}-${pkgsubver}/pstocanonij
./autogen.sh --prefix=/usr --program-suffix=mp560 --enable-progpath=/usr/bin
make || return 1
make install DESTDIR=${pkgdir} || return 1
cd ${srcdir}/cnijfilter-source-${pkgver}-${pkgsubver}/lgmon
./autogen.sh --prefix=/usr --program-suffix=mp560 --enable-progpath=/usr/bin
make || return 1
make install DESTDIR=${pkgdir} || return 1
cd ${srcdir}/cnijfilter-source-${pkgver}-${pkgsubver}/backend
./autogen.sh --prefix=/usr --program-suffix=mp560 --enable-progpath=/usr/bin
make || return 1
make install DESTDIR=${pkgdir} || return 1
cd ${srcdir}/cnijfilter-source-${pkgver}-${pkgsubver}/backendnet
./autogen.sh --prefix=/usr --program-suffix=mp560 --enable-progpath=/usr/bin
make || return 1
make install DESTDIR=${pkgdir} || return 1
cd ${srcdir}/cnijfilter-source-${pkgver}-${pkgsubver}/cngpijmon/cnijnpr
./autogen.sh --prefix=/usr --program-suffix=mp560 --enable-progpath=/usr/bin
make || return 1
make install DESTDIR=${pkgdir} || return 1
cd ${srcdir}/cnijfilter-source-${pkgver}-${pkgsubver}/ppd
./autogen.sh --prefix=/usr --program-suffix=mp560
make || return 1
make install DESTDIR=${pkgdir} || return 1
C copy some files
cd ${srcdir}/cnijfilter-source-${pkgver}-${pkgsubver}
install -d ${pkgdir}/usr/lib/bjlib
install -m 755 360/database/* ${pkgdir}/usr/lib/bjlib
install -s -m 755 360/libs_bin/*.so.* ${pkgdir}/usr/lib
install -s -m 755 com/libs_bin/*.so.* ${pkgdir}/usr/lib
install -D LICENSE-cnijfilter-${pkgver}EN.txt ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE-cnijfilter-${pkgver}EN.txt
The lines in A should be in a separate prepare() function
The lines in C should be in the package() function
Part B is trickier, leave it as is for now.
Once you've removed the "||return 1" stuff and separated A & C from the build() function, post the updated PKGBUILD .
Then we can start with part B.
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
(A works at time B) && (time C > time B ) ≠ (A works at time C)
Online
@ Lone_Wolf
thank you very much for your help i made now all, how described, hope it´s right here is my updatet pkgbuild
# Maintainer: Daniel Hillenbrand <codeworkx [at] bbqlinux [dot] org>
# Modified original script from: Alessio Fachechi
pkgname=cnijfilter-mp560
pkgver=3.20
pkgsubver=1
pkgrel=3
pkgdesc="Canon IJ Printer Driver (MP560 series)"
url="http://software.canon-europe.com/products/0010756.asp"
arch=('i686' 'x86_64')
license=('custom')
depends=('patch' 'libcups' 'cups' 'popt' 'ghostscript' 'gsfonts' 'atk>=1.9.0' 'gtk2>=2.8.0' 'pango>=1.12.3' 'libpng>=1.2.8' 'libtiff' 'cairo>=1.0.2' 'libxml2>=2.6.24' 'fontconfig>=2.3.0' 'libxinerama')
makedepends=('autoconf>=2.13' 'automake>=1.6' 'tar' 'make' 'gcc')
conflicts=('cnijfilter-common')
install=cnijfilter-mp560.install
source=(http://gdlp01.c-wss.com/gds/7/0100002367/01/cnijfilter-source-3.20-1.tar.gz
grayscale.patch
cups.patch
libpng15.patch)
md5sums=('0a40b46016511d59d1d0a3d3d9a653dd'
'f3d01db16494ae9ca16d9be8e9cd193b'
'abd0c2ee747e20558adcf327bb3a8633'
'e75b117cd7a399c0861c4e8e10c30294')
prepare() {
patch -p0 -d ${srcdir}/cnijfilter-source-${pkgver}-${pkgsubver}/ppd < grayscale.patch
cd ${srcdir}/cnijfilter-source-${pkgver}-${pkgsubver}
patch -p1 -i ${srcdir}/cups.patch
patch -p1 -i ${srcdir}/libpng15.patch
}
build() {
cd ${srcdir}/cnijfilter-source-${pkgver}-${pkgsubver}/libs
./autogen.sh --prefix=/usr --program-suffix=mp560
cd ${srcdir}/cnijfilter-source-${pkgver}-${pkgsubver}/cngpij
./autogen.sh --prefix=/usr --program-suffix=mp560 --enable-progpath=/usr/bin
cd ${srcdir}/cnijfilter-source-${pkgver}-${pkgsubver}/cnijfilter
./autogen.sh --prefix=/usr --program-suffix=mp560 --enable-progpath=/usr/bin
cd ${srcdir}/cnijfilter-source-${pkgver}-${pkgsubver}/pstocanonij
./autogen.sh --prefix=/usr --program-suffix=mp560 --enable-progpath=/usr/bin
cd ${srcdir}/cnijfilter-source-${pkgver}-${pkgsubver}/lgmon
./autogen.sh --prefix=/usr --program-suffix=mp560 --enable-progpath=/usr/bin
cd ${srcdir}/cnijfilter-source-${pkgver}-${pkgsubver}/backend
./autogen.sh --prefix=/usr --program-suffix=mp560 --enable-progpath=/usr/bin
cd ${srcdir}/cnijfilter-source-${pkgver}-${pkgsubver}/backendnet
./autogen.sh --prefix=/usr --program-suffix=mp560 --enable-progpath=/usr/bin
cd ${srcdir}/cnijfilter-source-${pkgver}-${pkgsubver}/cngpijmon/cnijnpr
./autogen.sh --prefix=/usr --program-suffix=mp560 --enable-progpath=/usr/bin
cd ${srcdir}/cnijfilter-source-${pkgver}-${pkgsubver}/ppd
./autogen.sh --prefix=/usr --program-suffix=mp560
}
package() {
cd ${srcdir}/cnijfilter-source-${pkgver}-${pkgsubver}
install -d ${pkgdir}/usr/lib/bjlib
install -m 755 360/database/* ${pkgdir}/usr/lib/bjlib
install -s -m 755 360/libs_bin/*.so.* ${pkgdir}/usr/lib
install -s -m 755 com/libs_bin/*.so.* ${pkgdir}/usr/lib
install -D LICENSE-cnijfilter-${pkgver}EN.txt ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE-cnijfilter-${pkgver}EN.txt
}
Offline
You removed a bit to much from the build() function , but that can be corrected easily .
Now let's take a closer look at what's left in the build function.
the build function has blocks of 4 lines that go like this :
cd somewhere
autogen something
make
make install DESTDIR=${pkgdir}
The make lines need to be in build() while the make install lines need to be in package() but for now we'll keep them together in build().
This allows us to focus on the structure of the code.
Look at the "autogen something" lines .
I see 2 variants :
A1 ./autogen.sh --prefix=/usr --program-suffix=mp560
B1 ./autogen.sh --prefix=/usr --program-suffix=mp560 --enable-progpath=/usr/bin
In canon printer driver packages the build order is often important so we should keep the same order.
what we see is this order : A1 - many B1 - A1
this indicates we can use a loop for the B1 variations.
the loop will look like this :
for _dir in dir1 dir2 dir3 etc
do
${srcdir}/cnijfilter-source-${pkgver}-${pkgsubver}//${_dir}
autogen B1 variant
make
make install DESTDIR="${pkgdir}"
done
change the build function to use that loop, then post the PKGBUILD again.
Last edited by Lone_Wolf (2015-01-17 14:11:41)
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
(A works at time B) && (time C > time B ) ≠ (A works at time C)
Online
ahh ok thx, you explain that excellent.
but is it necessary to use that loop or is it only an other possible option?? i hope i understand that right to insert the dirs in this loop and don´t blame me completly here haha
# Maintainer: Daniel Hillenbrand <codeworkx [at] bbqlinux [dot] org>
# Modified original script from: Alessio Fachechi
pkgname=cnijfilter-mp560
pkgver=3.20
pkgsubver=1
pkgrel=3
pkgdesc="Canon IJ Printer Driver (MP560 series)"
url="http://software.canon-europe.com/products/0010756.asp"
arch=('i686' 'x86_64')
license=('custom')
depends=('patch' 'libcups' 'cups' 'popt' 'ghostscript' 'gsfonts' 'atk>=1.9.0' 'gtk2>=2.8.0' 'pango>=1.12.3' 'libpng>=1.2.8' 'libtiff' 'cairo>=1.0.2' 'libxml2>=2.6.24' 'fontconfig>=2.3.0' 'libxinerama')
makedepends=('autoconf>=2.13' 'automake>=1.6' 'tar' 'make' 'gcc')
conflicts=('cnijfilter-common')
install=cnijfilter-mp560.install
source=(http://gdlp01.c-wss.com/gds/7/0100002367/01/cnijfilter-source-3.20-1.tar.gz
grayscale.patch
cups.patch
libpng15.patch)
md5sums=('0a40b46016511d59d1d0a3d3d9a653dd'
'f3d01db16494ae9ca16d9be8e9cd193b'
'abd0c2ee747e20558adcf327bb3a8633'
'e75b117cd7a399c0861c4e8e10c30294')
prepare() {
patch -p0 -d ${srcdir}/cnijfilter-source-${pkgver}-${pkgsubver}/ppd < grayscale.patch
cd ${srcdir}/cnijfilter-source-${pkgver}-${pkgsubver}
patch -p1 -i ${srcdir}/cups.patch
patch -p1 -i ${srcdir}/libpng15.patch
}
build() {
cd ${srcdir}/cnijfilter-source-${pkgver}-${pkgsubver}/libs
./autogen.sh --prefix=/usr --program-suffix=mp560
make
make install DESTDIR=${pkgdir}
for _dir in cngpij cnijfilter pstocanonij lgmon backend backendnet cngpijmon/cnijnpr
do
cd ${srcdir}/cnijfilter-source-${pkgver}-${pkgsubver}/${_dir}
./autogen.sh --prefix=/usr --program-suffix=mp560 --enable-progpath=/usr/bin
make
make install DESTDIR=${pkgdir}
done
cd ${srcdir}/cnijfilter-source-${pkgver}-${pkgsubver}/ppd
./autogen.sh --prefix=/usr --program-suffix=mp560
make
make install DESTDIR=${pkgdir}
}
package() {
cd ${srcdir}/cnijfilter-source-${pkgver}-${pkgsubver}
install -d ${pkgdir}/usr/lib/bjlib
install -m 755 360/database/* ${pkgdir}/usr/lib/bjlib
install -s -m 755 360/libs_bin/*.so.* ${pkgdir}/usr/lib
install -s -m 755 com/libs_bin/*.so.* ${pkgdir}/usr/lib
install -D LICENSE-cnijfilter-${pkgver}EN.txt ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE-cnijfilter-${pkgver}EN.txt
}
Last edited by sudomaso (2015-01-17 21:09:12)
Offline
Functionally there's no difference between having multiple blocks of lines or putting them in a loop, so technically it's just an option.
However, compare the code with and without the loop. I think you'll see a huge difference in readability.
Next step is to split the "make install" parts to the package() function.
Copy the entire build part to the top of the package part, then delete the autogen & make lines in that part.
Once that's done, back to the build part and delete all make install lines.
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
(A works at time B) && (time C > time B ) ≠ (A works at time C)
Online
ok thx you man, yeah the readibility is of course much better , but have i made the loop correct??
here is my updatet pkgbuild, i get always an error in ()build, but i think we are not finished here??
# Maintainer: Daniel Hillenbrand <codeworkx [at] bbqlinux [dot] org>
# Modified original script from: Alessio Fachechi
pkgname=cnijfilter-mp560
pkgver=3.20
pkgsubver=1
pkgrel=3
pkgdesc="Canon IJ Printer Driver (MP560 series)"
url="http://software.canon-europe.com/products/0010756.asp"
arch=('i686' 'x86_64')
license=('custom')
depends=('patch' 'libcups' 'cups' 'popt' 'ghostscript' 'gsfonts' 'atk>=1.9.0' 'gtk2>=2.8.0' 'pango>=1.12.3' 'libpng>=1.2.8' 'libtiff' 'cairo>=1.0.2' 'libxml2>=2.6.24' 'fontconfig>=2.3.0' 'libxinerama')
makedepends=('autoconf>=2.13' 'automake>=1.6' 'tar' 'make' 'gcc')
conflicts=('cnijfilter-common')
install=cnijfilter-mp560.install
source=(http://gdlp01.c-wss.com/gds/7/0100002367/01/cnijfilter-source-3.20-1.tar.gz
grayscale.patch
cups.patch
libpng15.patch)
md5sums=('0a40b46016511d59d1d0a3d3d9a653dd'
'f3d01db16494ae9ca16d9be8e9cd193b'
'abd0c2ee747e20558adcf327bb3a8633'
'e75b117cd7a399c0861c4e8e10c30294')
prepare() {
patch -p0 -d ${srcdir}/cnijfilter-source-${pkgver}-${pkgsubver}/ppd < grayscale.patch
cd ${srcdir}/cnijfilter-source-${pkgver}-${pkgsubver}
patch -p1 -i ${srcdir}/cups.patch
patch -p1 -i ${srcdir}/libpng15.patch
}
build() {
cd ${srcdir}/cnijfilter-source-${pkgver}-${pkgsubver}/libs
./autogen.sh --prefix=/usr --program-suffix=mp560
make
for _dir in cngpij cnijfilter pstocanonij lgmon backend backendnet cngpijmon/cnijnpr
do
cd ${srcdir}/cnijfilter-source-${pkgver}-${pkgsubver}/${_dir}
./autogen.sh --prefix=/usr --program-suffix=mp560 --enable-progpath=/usr/bin
make
done
cd ${srcdir}/cnijfilter-source-${pkgver}-${pkgsubver}/ppd
./autogen.sh --prefix=/usr --program-suffix=mp560
make
}
package() {
cd ${srcdir}/cnijfilter-source-${pkgver}-${pkgsubver}/libs
make install DESTDIR=${pkgdir}
for _dir in cngpij cnijfilter pstocanonij lgmon backend backendnet cngpijmon/cnijnpr
do
cd ${srcdir}/cnijfilter-source-${pkgver}-${pkgsubver}/${_dir}
make install DESTDIR=${pkgdir}
done
cd ${srcdir}/cnijfilter-source-${pkgver}-${pkgsubver}/ppd
make install DESTDIR=${pkgdir}
cd ${srcdir}/cnijfilter-source-${pkgver}-${pkgsubver}
install -d ${pkgdir}/usr/lib/bjlib
install -m 755 360/database/* ${pkgdir}/usr/lib/bjlib
install -s -m 755 360/libs_bin/*.so.* ${pkgdir}/usr/lib
install -s -m 755 com/libs_bin/*.so.* ${pkgdir}/usr/lib
install -D LICENSE-cnijfilter-${pkgver}EN.txt ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE-cnijfilter-${pkgver}EN.txt
}
Last edited by sudomaso (2015-01-19 11:09:57)
Offline
the loop does look correct to me, and we're indeed not finished.
Sofar we've converted the old build() function to pacman/makepkg 4.2 way of doing things and also improved the readability.
There are still several things to do, like quoting variables to make sure paths_with_spaces don't break building, but that's a minor issue.
Also we should look at dependencies and such.
However the pkgbuild is already in a much better shape and we can focus on getting it to build it now.
please run makepkg on it, and post the complete output (you might want to use a pastebin site for the output, as it will likely be large).
---------------------------------
I've added a comment on the AUR page for this package to alert the package maintainer of this thread (i'm assuming codeworkx is not sudomaso's aur nick).
It's also time to look back at trilby's post, who will have noticed we didn't do everything he suggested.,
Putting an empty package function was not a good idea. That "worked" because makepkg did everything you told it to. You said "make and empty package - and it did, that's why nothing was actually installed.
100% correct
Just move all the install commands to the package function.
I was also going to suggest making an array of all those subdirs and looping through them for each the build and the install - I would follow this with a recommendation to request that upstream provide a top-level Makefile. But there alread is a top level makefile. Don't bother with those dozen subdirectories, just build and install from the top-level make.
EDIT: note this is also meant to be a split package that calling this mp560 seems wrong as it actually includes various others. The mp560 suffix should be one of many split packages to come from this.
We've used a loop now and seperated the make & make install parts.
Trilby, i've dealth with many canon printer driver packages over time, and haven't found a single case yet where using canon's toplevel makefile results in a working package.
Inside most canon sources, there is a *.spec file intended for debian/ubuntu builds and that's the best point to start.
Canon does indeed combine many components in 1 package, but there's very little to gain from a split pacakage here.
several of the components in this package can be found in other packages, my experience is that canon often has tweaks in the sourcecode specific to 1 package, so you can't share code between them.
Last edited by Lone_Wolf (2015-01-19 12:31:40)
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
(A works at time B) && (time C > time B ) ≠ (A works at time C)
Online
Trilby, i've dealth with many canon printer driver packages over time, and haven't found a single case yet where using canon's toplevel makefile results in a working package.
I happily defer to your experience on that. I realized after posting that that the top-level makefile didn't seem to run the autogen commands - and when I tried to build with just the top level makefile I faced many errors. They did seem more likely to be due to missing dependencies, but I couldn't be sure. In any case - I'm glad you've been able to walk through getting this up and running.
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline
sry when i need so long for answering, but my english is not the best and i have to read a lot f.e. what is makepkg or a top-level makefile and so on, for 3 months i was a dumb window- sheep haha so that´s all new for me, hope that´s ok
thx for your comment on the AUR page, i forgot to make that and yeah i think it´s clear i´m not codeworkx
so i quoting all pathes with variables now and run makepkg and that´s the output
Offline
first, prepend LC_ALL=C to get output in english. example LC_ALL=C makepkg
The error messages are of this type :
bjcups.c: In function ‘getDeviceURI’:
bjcups.c:685:11: error: dereferencing pointer to incomplete type
pRequest->request.op.operation_id = CUPS_GET_PRINTERS;
TL;DR : the sourcecode needs to be adjusted to work with cups 1.6 and later.
I've searched about this error, and found it happens when the compiler can't determine the type of pointers.
this can be caused by typos, missing include files etc.
I searched the /usr/include/cups header files and found this in ipp.h :
typedef int (*ipp_copycb_t)(void *context, ipp_t *dst, ipp_attribute_t *attr);
/*
* The following structures are PRIVATE starting with CUPS 1.6/OS X 10.8.
* Please use the new accessor functions available in CUPS 1.6 and later, as
* these definitions will be moved to a private header file in a future release.
*
* Define _IPP_PRIVATE_STRUCTURES to 1 to cause the private IPP structures to be
* exposed in CUPS 1.6. This happens automatically on OS X when compiling for
* a deployment target of 10.7 or earlier.
*
* Define _IPP_PRIVATE_STRUCTURES to 0 to prevent the private IPP structures
* from being exposed. This is useful when migrating existing code to the new
* accessors.
*/
a bit further down in that file are the type definitions needed.
The text above also points to a solution Define _IPP_PRIVATE_STRUCTURES to 1 to cause the private IPP structures to be
exposed , but i have no idea how that can be achieved.
we need help from coders/programmers that are familiar with C (i THINK this code is written in C).
Last edited by Lone_Wolf (2015-01-20 22:37:46)
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
(A works at time B) && (time C > time B ) ≠ (A works at time C)
Online
oh sry here is the output in english
puuh i don´t thought that will be so difficult, and i thx you for your help, it´s really awesome but that sounds for me that i have less hope now for a fast solution for this package, right?
Offline
Canon printer drivers are hard to get to work correctly on arch, and it doesn't help that this driver hasn't been updated since 2010.
(canon did release newer drivers for the mp560 for windows & OS X, but not for linux).
It's hard to predict when the package will be working, an alternative might be to figure out if the printer supports PCL and is usable as a generic pcl printer.
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
(A works at time B) && (time C > time B ) ≠ (A works at time C)
Online
hmm that´s very strange and i can´t understand that really, why the driver don´t work now? this problem is homemade and occured through changes in pacman, it works fine for 2 weeks , very sad
pcl support is not possible and i think writing the canon support , is also useless :-(
Offline
As soon as Canon support hears Arch Linux they'll respond : "that is not a supported distro, ticket closed."
But don't give up hope yet, sudomaso . I've solved the cngpij error and am now adjusting the buld function to make troubleshooting it easier.
I'll update this post soon.
added
A search for _IPP_PRIVATE_STRUCTURES was successful and i created a simple patch (see end of post) for it.
applying the patch solves the dereferencing error.
The next error comes with compiling the cnijfilter part :
/usr/bin/ld: skipping incompatible ../../360/libs_bin/libcnbpcmcm360.so when searching for -lcnbpcmcm360
/usr/bin/ld: cannot find -lcnbpcmcm360
/usr/bin/ld: skipping incompatible ../../360/libs_bin/libcnbpess360.so when searching for -lcnbpess360
/usr/bin/ld: cannot find -lcnbpess360
/usr/bin/ld: skipping incompatible ../../360/libs_bin/libcnbpcnclapi360.so when searching for -lcnbpcnclapi360
/usr/bin/ld: cannot find -lcnbpcnclapi360
/usr/bin/ld: skipping incompatible ../../360/libs_bin/libcnbpcnclbjcmd360.so when searching for -lcnbpcnclbjcmd360
/usr/bin/ld: cannot find -lcnbpcnclbjcmd360
/usr/bin/ld: skipping incompatible ../../360/libs_bin/libcnbpcnclui360.so when searching for -lcnbpcnclui360
/usr/bin/ld: cannot find -lcnbpcnclui360
Those libraries are present, but they are i686 / 32-bit libs and the package expects 64-bit libs.
Also the aur cnijfilter-mp560 3.20-3 PKGBUILD only has i686 as architecture.
Canon was rather late with providing 64-bit drivers, so it seems possible this driver is 32-bit only.
Sudomaso, are you running 64-bit or 32-bit ?
cnij.patch
diff -aur cnijfilter-source-3.20-1/cngpij/cngpij/bjcups.c cnijfilter-source-3.20-1.new/cngpij/cngpij/bjcups.c
--- cnijfilter-source-3.20-1/cngpij/cngpij/bjcups.c 2009-06-11 06:10:32.000000000 +0200
+++ cnijfilter-source-3.20-1.new/cngpij/cngpij/bjcups.c 2015-01-21 23:07:04.416457760 +0100
@@ -20,7 +20,7 @@
#if HAVE_CONFIG_H
#include <config.h>
#endif // HAVE_CONFIG_H
-
+#define _IPP_PRIVATE_STRUCTURES 1
#include <cups/cups.h>
#include <cups/language.h>
#include <cups/ppd.h>
Last edited by Lone_Wolf (2015-01-22 00:05:41)
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
(A works at time B) && (time C > time B ) ≠ (A works at time C)
Online
hello and thank you man , i see again light at the end of the tunnel haha
i running 64 bit- system and before the changes in pacman, i only changed these line
arch=('i686') in arch=('i686' 'x86_64') and it works great
Last edited by sudomaso (2015-01-22 11:46:22)
Offline
Well i solved the build problems (set gcc to build 32-bit, added 1 more patch and a new dependency lib32-popt ) , then realised there is a decent mp560 package for x86_64 in aur after all.
It has a bit weird name and the description could be improved, but it builds fine.
sudomaso, check https://aur.archlinux.org/packages/lib3 … ter-mp560/
I suggest you download and install lib32-popt from aur, then build lib32-cnijfilter-mp560 .
Let us know if works for you.
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
(A works at time B) && (time C > time B ) ≠ (A works at time C)
Online
hello,
hmm
download and install lib32-popt from aur, then build lib32-cnijfilter-mp560
don´t work for me, searching the driver ends without results :-( but the building works fine
Last edited by sudomaso (2015-01-23 11:48:26)
Offline
I don't intend to impede on your progress with the package and trying to cope with canon's stuff, but you could probably use https://aur.archlinux.org/packages/cups-bjnp/ in combination with open drivers (I've made good experiences with the gutenprint drivers). I've been using this setup since a few years with my mp560 and it's working pretty flawlessly so far.
Offline
V1del, a few questions :
cups-bjnp doesn't work with usb-connected printers, only those connected through network ?
gutenprint supported printers page list3 canon mp560 drivers ( mp560, pixma mp560, pixus mp560) , all with EXPERIMENTAL as note.
Are you using one of those drivers ?
sudomaso : the lib32-cnijfilter-mp560 is close to what i could achieve, so it looked like the best bet.
However, canon drivers are prone to stop working after an update to cups and they are slow to adjust to newer cups versions (their 'new' cque & sque drivers appear to be better, but they seem to target business models with those, not consumer models like yours).
V1del 's results indicate gutenprint / cups-bjnp may be worth a try.
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
(A works at time B) && (time C > time B ) ≠ (A works at time C)
Online