You are not logged in.

#1 2006-10-30 09:43:36

frigg
Member
From: Germany, Europe
Registered: 2006-10-30
Posts: 46

AUR package for konica minolta laser printer (CUPS)

Hi there,

currently I'm writing a AUR package for the Konica Minolta Magicolor 5430 Desklaser.

I have a question to put the ICC profiles files and special KM files to the cups tree.

The Konica Minolta makefile put the binary "rstertokm5430" to the directory "/usr/lib/cups/filter/" which is completely correct but the *.ppd file and *.icm files are going by default to /usr/share/KONICA_MINOLTA/mc5430DL/Profiles (icm files) and to
/usr/share/cups/model/KONICA_MINOLTA/km5430dl.ppd.gz (ppd file)

The directory in my running archlinux is
usrsharecupsmodel*.ppd and
usrsharecupsprofiles*.icm

Additionally there are "Halftones" files (*.bmp)
usrshareKONICA_MINOLTAmc5430DLHalftones*.bmp


I think about to put the Konica Minolta files in to this (new) directory tree:
usrsharecupskm5430dlmodel*.ppd
usrsharecupskm5430dlprofiles*.icm
usrsharecupskm5430dlhalftones*.bmp

How do I have to copy these files to be archlinux compliant ?

best regards,

Frank

Offline

#2 2006-10-30 09:53:56

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,922

Re: AUR package for konica minolta laser printer (CUPS)

Next time please post in     PKGBUILDs & ABS Support or AUR Package Requests (if you want someone else to make the package).

Moderators/Forum advisors please move this thread

Packages are meant to be build in $startdir/pkg/ and it's subdirs.

you will have to change the commands that are used to build the drivers.

please post your PKGBUILD so we can see what needs to be changed.


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)

Offline

#3 2006-10-30 09:59:50

frigg
Member
From: Germany, Europe
Registered: 2006-10-30
Posts: 46

Re: AUR package for konica minolta laser printer (CUPS)

Hi,

thanks for the information about the wrong message area.

Lone_Wolf wrote:

Next time please post in
please post your PKGBUILD so we can see what needs to be changed.

Well, there is just a fragment, because I need an answer to modify the build() function, especially the prefix parameter of configure

but never mind, here is the incomlete PKGBUILD:

# Contributor: Frank Ickstadt (frank dot ickstadt at gmail dot com)
# For Konica Minolta magicolor 5430 Desklaser

pkgname=cups-mc5430dl
pkgver=1.8.0
pkgrel=1
pkgdesc="CUPS driver for Konica Minolta magicolor 5430 Desklaser printer"
url="http://konicaminolta.com/"
license="GPL"
depends=('cups' 'gcc')
source=(http://www.linuxprinting.org/download/printing/konicaminolta/magicolor5430DL-$pkgver.tar.gz)
md5sums=('1460477f2dd195c301e961a6cbfe1f54')

### TODO: ###
build() {
          cd $startdir/src/$pkgname-$pkgver
          ./configure --prefix=/usr
          make || return 1
          make prefix=$startdir/pkg/usr install
}

Offline

#4 2006-10-30 11:41:05

T-Dawg
Forum Fellow
From: Charlotte, NC
Registered: 2005-01-29
Posts: 2,736

Re: AUR package for konica minolta laser printer (CUPS)

moved to PKGBUILD's support

Offline

#5 2006-10-31 20:27:14

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,922

Re: AUR package for konica minolta laser printer (CUPS)

try

./configure --prefix=$startdir/pkg/usr
make || return 1
make install

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)

Offline

#6 2006-11-01 03:16:10

djscholl
Member
From: Michigan, USA
Registered: 2006-05-24
Posts: 56

Re: AUR package for konica minolta laser printer (CUPS)

frigg, your question about configure options is not entirely clear to me. Do you mean options required to get the PKGBUILD to meet Arch standards, or to get a generic manual build to work? On my Arch system, the ./configure script fails with

error: Could not find libjbig.a

Quoting from magicolor5430DL-1.8.0/kmlf.spec,

This package contains KONICA MINOLTA CUPS LavaFlow stream(PCL-like) filter rastertokm5430dl and the PPD file. The filter converts CUPS raster data to KONICA MINOLTA LavaFlow stream, it uses jbig for compression and littleCMS for colormatching.

Running ./configure --help returns only the generic help, with no customized options. I interpret this to mean that libjbig.a and littleCMS are required, not optional. I don't see libjbig in any Arch repository, or in the AUR. It looks to me like you will need to also write a PKGBUILD for libjbig, and add it to your depends array. I notice that the Gentoo folks get their libjbig under the GPL from http://www.cl.cam.ac.uk/~mgk25/jbigkit/
The lcms package, which appears to be a dependency for you as well, is available from Arch as a binary package.

If I'm overlooking something and you can already do a manual build under Arch, please post and clue me in. I'm making an educated guess here, but I don't think the ppd file, the icm's, and the halftones will be useful without the compiled filter.

Offline

#7 2006-11-01 07:52:46

frigg
Member
From: Germany, Europe
Registered: 2006-10-30
Posts: 46

Re: AUR package for konica minolta laser printer (CUPS)

Hi djscholl,

Do you mean options required to get the PKGBUILD to meet Arch standards, or to get a generic manual build to work?

well te really question is, if it's OK to use the KM directory tree which includes the non-standrad directories like:
/usr/share/cups/model/KONICA_MINOLTA/
/usr/share/KONICA_MINOLTA/mc5430DL/Halftones/
/usr/share/KONICA_MINOLTA/mc5430DL/Profiles/

or to create a tree which doesn't spread the files over the linux filesystem. In the second case I need to know which directories I should use instead.

Running ./configure --help returns only the generic help, with no customized options. I interpret this to mean that libjbig.a and littleCMS are required, not optional. I don't see libjbig in any Arch repository, or in the AUR. It looks to me like you will need to also write a PKGBUILD for libjbig, and add it to your depends array. I notice that the Gentoo folks get their libjbig under the GPL from http://www.cl.cam.ac.uk/~mgk25/jbigkit/
The lcms package, which appears to be a dependency for you as well, is available from Arch as a binary package.

Indeed that is the next problem, which I want to solve if the question regarding the directories is clearified.

If I'm overlooking something and you can already do a manual build under Arch, please post and clue me in. I'm making an educated guess here, but I don't think the ppd file, the icm's, and the halftones will be useful without the compiled filter.

Well building packages from source isn't new to me. I've done this for Solaris, HP-UX and Tru64 additionally I build some packages for Debian (*.deb). Therefore I think to build this KM package for arch linux is just a matter of time and not of know how.

Offline

#8 2006-11-01 15:03:40

djscholl
Member
From: Michigan, USA
Registered: 2006-05-24
Posts: 56

Re: AUR package for konica minolta laser printer (CUPS)

cups-pdf puts a single ppd file directly into /usr/share/cups/model, so it looks like you could do that with yours. However, I would ask you to consider building and installing all three drivers (2430, 5430, and 5440)  in your PKGBUILD and naming it something like cups-konica_minolta. There are other examples of related groups of open-source printer drivers combined into one PKGBUILD, i.e., splix and cups-xerox. The three drivers probably have similar build and install considerations, so it wouldn't be three times as difficult, and your PKGBUILD would be useful to a larger group of Arch users. If you choose this route, then you can follow the gutenprint example (/usr/share/cups/model/gutenprint/) and put your three ppd files into /usr/share/cups/model/konica_minolta/. How to deal with the halftones is less clear to me. My suggestion would be to make a /usr/share/cups/halftones directory, but others may disagree with me on that. I'm uncomfortable with your initial suggestion of /usr/share/cups/km5430dl, because there are no other directories named after printer models in /usr/share/cups.

Another consideration is how flexible the locations are. Depending on how the source and the makefiles are written, it might require lots of hacking to change the locations, which would make the PKGBUILD brittle and difficult to maintain. It might be better to put all of your filter resources in /usr/share/cups-konica_minolta. In Arch,  read-only package resources that don't fit elsewhere in /usr/share are usually placed in /usr/share/packagename.

Offline

#9 2006-11-02 10:08:58

frigg
Member
From: Germany, Europe
Registered: 2006-10-30
Posts: 46

Re: AUR package for konica minolta laser printer (CUPS)

Hi djscholl,

well your suggestions sounds good!

Next (the first) step is the succsessfull building of jbigkit. I don't expect any major problems.

After a short investigation of the packages magicolor2430DL-1.6.0.tar.gz, magicolor5430DL-1.8.0.tar.gz and magicolor5440DL-1.2.0.tar.gz they look pretty similar and maybe a I could build a driver package all out of them.

The suggested name "cups-konica_minolta" sounds OK, too.

There are now only minor changes in the configure script:
/usr/lib/cups/filter/rastertokm5430dl seems to work out of the box
/usr/share/cups/model/KONICA_MINOLTA/km5430dl.ppd.gz seems to work out of the box
I have just to change /usr/share/KONICA_MINOLTA/mc5430DL/ to /usr/share/cups-konica_minolta/mc5430DL/ which could be done with a short script.

BTW: I've wrote an awk script "substdir.awk":
/KM_DATADIR/ {
           gsub("/KONICA_MINOLTA/","/cups-konica_minolta/",$0)
           print $0
           next;}

{print $0}
and a pretty simple bash script "clean":
#!/bin/bash
cp -p ./configure ./configure.`date +%Y%m%d.%H%M`
cp -p ./configure ./configure_work
awk -f ./substdir.awk </configure_work> ./configure
rm ./configure_work

which do the task. Ho do I integrate both scripts in PKGBUILD?

Offline

#10 2006-11-02 10:14:35

frigg
Member
From: Germany, Europe
Registered: 2006-10-30
Posts: 46

Re: AUR package for konica minolta laser printer (CUPS)

Ok, I've forgot to post the results (just the changed lines)

before:
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE KM_PPDDIR CUPS_SERVERBIN KM_DATADIR LIBJBIG LIBLCMS CPP EGREP LIBOBJS LTLIBOBJS'
                KM_DATADIR=/Library/Printers/KONICA_MINOLTA/mc5430DL
#define KM_DATADIR "/Library/Printers/KONICA_MINOLTA/mc5430DL"
                KM_DATADIR="$datadir/KONICA_MINOLTA/mc5430DL"
#define KM_DATADIR "$datadir/KONICA_MINOLTA/mc5430DL"
                KM_DATADIR="$datadir/KONICA_MINOLTA/mc5430DL"
#define KM_DATADIR "$datadir/KONICA_MINOLTA/mc5430DL"
s,@KM_DATADIR@,$KM_DATADIR,;t t

after:
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE KM_PPDDIR CUPS_SERVERBIN KM_DATADIR LIBJBIG LIBLCMS CPP EGREP LIBOBJS LTLIBOBJS'
                KM_DATADIR=/Library/Printers/cups-konica_minolta/mc5430DL
#define KM_DATADIR "/Library/Printers/cups-konica_minolta/mc5430DL"
                KM_DATADIR="$datadir/cups-konica_minolta/mc5430DL"
#define KM_DATADIR "$datadir/cups-konica_minolta/mc5430DL"
                KM_DATADIR="$datadir/cups-konica_minolta/mc5430DL"
#define KM_DATADIR "$datadir/cups-konica_minolta/mc5430DL"
s,@KM_DATADIR@,$KM_DATADIR,;t t

Offline

#11 2006-11-02 18:29:48

djscholl
Member
From: Michigan, USA
Registered: 2006-05-24
Posts: 56

Re: AUR package for konica minolta laser printer (CUPS)

frigg, my apologies for overlooking an important point in my last post. The three magicolor drivers have different version numbers, unlike the other examples of multiple printer drivers in one PKGBUILD. This means you will need one PKGBUILD for each driver, in order to have the correct Arch version number. There is still value in doing them together, since they have many common elements.

As a consequence of this change, I think it might be best to put the single PPD file in /usr/share/cups/model/, rather than have a directory with one ppd file in it.  It appears that the KM_PPDDIR variable in the configure script controls this location, so I have added a sed command to the build script accordingly.

As another consequence, the package names need to be changed. I would suggest cups-mc2430dl, etc. This uses the short internal names used by the drivers, and Arch package names are supposed to be lower-case. This means that your awk script no longer works for all three drivers. Rather than write three different awk scripts, I have ported your directory change to a sed command.  When you package a stand-alone script with the PKGBUILD, you have to also maintain its md5sum, so it is simpler to do everything inside the build script if you can.

Following are the three incomplete PKGBUILD scripts incorporating these changes. They are complete enough that when you run makepkg, they will  download the tarball (if it isn't already present), check its md5sum, copy it into the src directory, uncompress it, and modify the configure script. One way for you to proceed from here is to add lines to the build script, run makepkg, check that the right things happen in the src directory, and then that the correct things are put into the correct place in the pkg directory. The next line in the build script runs configure, which won't finish on my system due to the lack of libjbig.

# Contributor: Frank Ickstadt (frank dot ickstadt at gmail dot com)
# For Konica Minolta magicolor 2430 Desklaser

pkgname=cups-mc2430dl   
pkgver=1.6.0
pkgrel=1
pkgdesc="CUPS driver for Konica Minolta magicolor 2430 Desklaser printer"
url="http://konicaminolta.com/"
license="GPL"
depends=('cups' 'gcc')
source=(http://www.linuxprinting.org/download/printing/konicaminolta/magicolor2430DL-$pkgver.tar.gz)
md5sums=('a97b4ee5c949ca791764457ead3a5b9c')

build() {
  cd $startdir/src/magicolor2430DL-$pkgver
  sed -i '/KM_PPDDIR/s//KONICA_MINOLTA//' ./configure
  sed -i "/KM_DATADIR/s/KONICA_MINOLTA/$pkgname/" ./configure
  #./configure --prefix=/usr
  #make || return 1
  #make prefix=$startdir/pkg/usr install
}
# Contributor: Frank Ickstadt (frank dot ickstadt at gmail dot com)
# For Konica Minolta magicolor 5430 Desklaser

pkgname=cups-mc5430dl
pkgver=1.8.0
pkgrel=1
pkgdesc="CUPS driver for Konica Minolta magicolor 5430 Desklaser printer"
url="http://konicaminolta.com/"
license="GPL"
depends=('cups' 'gcc')
source=(http://www.linuxprinting.org/download/printing/konicaminolta/magicolor5430DL-$pkgver.tar.gz)
md5sums=('1460477f2dd195c301e961a6cbfe1f54')

build() {
  cd $startdir/src/magicolor5430DL-$pkgver
  sed -i '/KM_PPDDIR/s//KONICA_MINOLTA//' ./configure
  sed -i "/KM_DATADIR/s/KONICA_MINOLTA/$pkgname/" ./configure
  #./configure --prefix=/usr
  #make || return 1
  #make prefix=$startdir/pkg/usr install
}
# Contributor: Frank Ickstadt (frank dot ickstadt at gmail dot com)
# For Konica Minolta magicolor 5440 Desklaser

pkgname=cups-mc5440dl
pkgver=1.2.0
pkgrel=1
pkgdesc="CUPS driver for Konica Minolta magicolor 5440 Desklaser printer"
url="http://konicaminolta.com/"
license="GPL"
depends=('cups' 'gcc')
source=(http://www.linuxprinting.org/download/printing/konicaminolta/magicolor5440DL-$pkgver.tar.gz)
md5sums=('abd54f32517ebeb7a56f902b159c7dea')

build() {
  cd $startdir/src/cups-mc5440DL-$pkgver
  sed -i '/KM_PPDDIR/s//KONICA_MINOLTA//' ./configure
  sed -i "/KM_DATADIR/s/KONICA_MINOLTA/$pkgname/" ./configure
  #./configure --prefix=/usr
  #make || return 1
  #make prefix=$startdir/pkg/usr install
}

Offline

#12 2006-11-02 21:43:43

frigg
Member
From: Germany, Europe
Registered: 2006-10-30
Posts: 46

Re: AUR package for konica minolta laser printer (CUPS)

Hi djscholl,

thanks for your hints I will check them tomorrow. In the meantime I have created the package "jbigkit-1.6-1.pkg.tar.gz" which just install the needed libjbig.a library in /usr/lib/
I hope I can put this package to AUR. I've never done this before so I can't promise if this will happen tomorrow.

Offline

#13 2006-11-03 07:08:12

frigg
Member
From: Germany, Europe
Registered: 2006-10-30
Posts: 46

Re: AUR package for konica minolta laser printer (CUPS)

Hi djscholl,

because I'm not able to upload nether the PKGBUILD nor jbigkit-1.6-1.pkg.tar.gz I will post the PKGBUILD as clear text.

Well I'm able to login to AUR but the submit page doesn't accept my uploads.

# Contributor: Frank Ickstadt (frank dot ickstadt at gmail dot com)
# library is needed for Konica Minolta cups driver and others

pkgname=jbigkit
pkgver=1.6
pkgrel=1
pkgdesc="JBIG-KIT provides a portable library of compression and decompression functions"
url="http://www.cl.cam.ac.uk/~mgk25/jbigkit/"
license="GPL"
depends=('gcc')
source=(http://www.cl.cam.ac.uk/~mgk25/download/jbigkit-$pkgver.tar.gz)
md5sums=('ce196e45f293d40ba76af3dc981ccfd7')

build() {
    cd $startdir/src/$pkgname
        ./configure --prefix=$startdir/pkg/usr
    make || return 1
    make test || return 1
        install -D -m644 $startdir/src/$pkgname/libjbig/libjbig.a $startdir/pkg/usr/lib/libjbig.a
}

Offline

#14 2006-11-03 07:20:02

frigg
Member
From: Germany, Europe
Registered: 2006-10-30
Posts: 46

Re: AUR package for konica minolta laser printer (CUPS)

OK I've made an upload to AUR. Now you can search for a package named "jbigkit"

Offline

#15 2006-11-03 13:18:36

frigg
Member
From: Germany, Europe
Registered: 2006-10-30
Posts: 46

Re: AUR package for konica minolta laser printer (CUPS)

Hi djscholl,

after a review of your good suggestions I've come to this point of your code:

sed -i "/KM_DATADIR/s/KONICA_MINOLTA/$pkgname/" ./configure

shouldn't it be:

sed -i "/KM_DATADIR/s/KONICA_MINOLTA/mc5430DL/$pkgname/" ./configure

for the magicolor 5430 DeskLaser?

The directories will be:
/usr/share/cups-mc5430dl/Halftones
/usr/share/cups-mc5430dl/Profiles

Offline

#16 2006-11-04 13:16:48

djscholl
Member
From: Michigan, USA
Registered: 2006-05-24
Posts: 56

Re: AUR package for konica minolta laser printer (CUPS)

I see your point about the directories. I overlooked that.

I have a few suggestions regarding the jbigkit PKGBUILD.

According to the Arch Packaging Standards, pkgdesc should not include pkgname. In the AUR web page, pkgdesc is never displayed without pkgname.

The PKGBUILD usually does not list what packages require it. If there was a one-to-one relationship between two packages, it might be helpful, but this is a library with multiple potential applications. A list of "packages requiring" would be difficult to maintain, and anyway duplicates the dependency information listed in those other packages. Any usr who has installed a package can find what requires it on her system via pacman -Qi.

I think we can assume that compression implies decompression and library implies functions. As we are constrained by an 80-char limit, it would be more informative to mention the availability of the utilities, and the fact that the compression is optimized for a specific type of data.

namcap reports that gcc is not needed as a dependency, but glibc is needed.

It would be good to install the man pages and utilities as well as the library. The printer drivers don't need them, but another Arch user might. The man pages can be gzipped to be consistent with other man pages, even though they are not large.

To help explain my comments, below is your PKGBUILD modified accordingly.

# Contributor: Frank Ickstadt (frank dot ickstadt at gmail dot com)

pkgname=jbigkit
pkgver=1.6
pkgrel=1
pkgdesc="Data compression library/utilities for bi-level high-resolution images"
url="http://www.cl.cam.ac.uk/~mgk25/jbigkit/"
license="GPL"
depends=('glibc')
source=(http://www.cl.cam.ac.uk/~mgk25/download/jbigkit-$pkgver.tar.gz)
md5sums=('ce196e45f293d40ba76af3dc981ccfd7')

build() {
        cd $startdir/src/$pkgname
        ./configure --prefix=$startdir/pkg/usr
        make || return 1
        make test || return 1
        install -D -m644 $startdir/src/$pkgname/libjbig/libjbig.a $startdir/pkg/usr/lib/libjbig.a
        gzip $startdir/src/$pkgname/pbmtools/*.[15]
        install -d $startdir/pkg/usr/man/man1
        install -d $startdir/pkg/usr/man/man5
        install -D -m644 $startdir/src/$pkgname/pbmtools/*.1.gz $startdir/pkg/usr/man/man1
        install -D -m644 $startdir/src/$pkgname/pbmtools/*.5.gz $startdir/pkg/usr/man/man5
        install -D -m644 $startdir/src/$pkgname/pbmtools/jbgtopbm $startdir/pkg/usr/bin/jbgtopbm
        install -D -m644 $startdir/src/$pkgname/pbmtools/pbmtojbg $startdir/pkg/usr/bin/pbmtojbg
}

Offline

#17 2006-11-04 13:32:41

frigg
Member
From: Germany, Europe
Registered: 2006-10-30
Posts: 46

Re: AUR package for konica minolta laser printer (CUPS)

Hi djscholl,

and again you gave me some essential hints. I guess you are very familar with arch linux, isn't it?

Well I will post a new jbigkit next week your hints included. pkgrel should be 2 because there are a lot of changes. And hopefully the three Konica Monilta cups drivers will find a way to AUR, just a matter of time :-)

Offline

#18 2006-11-10 07:48:49

frigg
Member
From: Germany, Europe
Registered: 2006-10-30
Posts: 46

Re: AUR package for konica minolta laser printer (CUPS)

Hi,

the packages
jbikgit
mc2340dl
mc5340dl
mc5440dl
are created und PKGBUILD uploaded to AUR.

Happy printing

Offline

Board footer

Powered by FluxBB