You are not logged in.

#1 2007-01-20 19:05:40

Birdman
Member
From: Surrey, UK
Registered: 2006-01-11
Posts: 121

My first PKGBUILD

I want to create a package for iscan, it is a GPL front end written by Epson for their scanners. I used to use it several years ago but it was withdrawn because of licensing issues and the old binaries stopped working on modern linux distros. I have only just discovered that it is now available as source and I want to create a package. This is what I have done so far:

The PKGBUILD looks like this:

pkgname=iscan
pkgver=2.4.0
pkgrel=1
pkgdesc="A front end for Epson scanners"
url="http://www.avasys.jp/english/linix_e/dl_scan.html"
license="GPL"
depends=('sane')
makedepends=()
provides=()
conflicts=()
replaces=()
backup=()
install=
source=("http://lx1.avasys.jp/iscan/2.4.0/$pkgname-$pkgver.tar.gz")
md5sums=('5fb43d47dacbdae1f19252019a26b6c8')

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

I have run ./configure and make in a temporary directory and everything ran fine.

I then had a go at making the package and this is what happened:

[root@avocet iscan]# makepkg
==> Making package: iscan 2.4.0-1 (Sat Jan 20 18:33:34 GMT 2007)
==> Checking Runtime Dependencies...
==> Checking Buildtime Dependencies...
==> Retrieving Sources...
==>     Downloading iscan-2.4.0.tar.gz
--18:33:34--  http://lx1.avasys.jp/iscan/2.4.0/iscan-2.4.0.tar.gz
           => `iscan-2.4.0.tar.gz'
Resolving lx1.avasys.jp... 202.41.220.50
Connecting to lx1.avasys.jp|202.41.220.50|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
18:33:45 ERROR 404: Not Found.

As far as I can make out the actual .tar.gz file is called iscan-2.4.0-0.c2.tar.gz. I understand that hyphens are not allowed in the package name but that is the name of the source tar. Is this what the error is trying to tell me or have I made a different error?

Thanks.

Offline

#2 2007-01-20 19:18:50

tardo
Member
Registered: 2006-07-15
Posts: 526

Re: My first PKGBUILD

try

source=("http://lx1.avasys.jp/iscan/2.4.0/$pkgname-$pkgver-0.c2.tar.gz")

Offline

#3 2007-01-20 19:22:33

SiD
Member
From: Germany
Registered: 2006-09-21
Posts: 729

Re: My first PKGBUILD

look at the source and pkgver varibles.

pkgver=2.4.0 
source=("http://lx1.avasys.jp/iscan/2.4.0/$pkgname-$pkgver.tar.gz")

if the file is located in "http://lx1.avasys.jp/iscan/2.4.0" you have two choices. (I don't know which is the "right" one)

1.
change pkgver variable to

pkgver=2.4.0-0.c2"

2.
change the source varible to

source=("http://lx1.avasys.jp/iscan/2.4.0/$pkgname-$pkgver-0.c2.tar.gz")

Offline

#4 2007-01-20 19:28:38

Birdman
Member
From: Surrey, UK
Registered: 2006-01-11
Posts: 121

Re: My first PKGBUILD

tardo wrote:

try

source=("http://lx1.avasys.jp/iscan/2.4.0/$pkgname-$pkgver-0.c2.tar.gz")

Thanks tardo - makepkg is running as I type  smile

Offline

#5 2007-01-20 20:08:20

Birdman
Member
From: Surrey, UK
Registered: 2006-01-11
Posts: 121

Re: My first PKGBUILD

I am pleased to say that I managed to create a package and run the app  smile  However, I do have a problem and I think I know what it is but am not sure how to remedy it?

The README advised that if iscan was installed from the .tar.gz then sane should also have been installed by the same message. By creating a package with the prefix=/usr in the configuration I was hoping that all would end well. The error method that I get when I launch iscan is:

Could not send command to scanner. Check the scanner's status

What is the best way of having iscan and sane talk to each other? Should I have downloaded the RPM and obtained the source from that or is there something I can place in the PKGBUILD to make it work?

Thanks.

Offline

#6 2007-02-16 20:17:22

Susu
Member
From: Germany
Registered: 2005-11-11
Posts: 191
Website

Re: My first PKGBUILD

I built iscan several times but didn't mange to access my scanner on my Arch system. Don't know what's wrong with it. xsane with plustek works, but iscan delivers more vivid colors and scanning is faster. Maybe someone can help with a solution. I'm really interested in it...


Album reviews (in german): http://schallwelle.filzo.de

Offline

#7 2008-03-26 22:55:04

Rasi
Member
From: Germany
Registered: 2007-08-14
Posts: 1,862
Website

Re: My first PKGBUILD

well i compiled it too once.. but now its not working anymore.. ./configure runs fine.. but the make process stops after a few seconds...

imgstream.cc: In static member function 'static lt_dlhandle_struct* iscan::imgstream::find_dlopen(const char*)':
imgstream.cc:243: error: 'getenv' was not declared in this scope
imgstream.cc:247: error: 'getenv' was not declared in this scope
imgstream.cc:282: error: 'free' was not declared in this scope
imgstream.cc:287: error: 'free' was not declared in this scope
make[2]: *** [libimage_stream_la-imgstream.lo] Fehler 1
make[2]: Leaving directory `/home/carnager/is/src/iscan-2.4.0/lib'
make[1]: *** [all-recursive] Fehler 1
make[1]: Leaving directory `/home/carnager/is/src/iscan-2.4.0'
make: *** [all] Fehler 2
==> FEHLER: Build fehlgeschlagen.

Last edited by Rasi (2008-03-26 22:56:48)


He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.

Douglas Adams

Offline

#8 2008-03-27 07:35:17

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,017

Re: My first PKGBUILD

Rasi wrote:

well i compiled it too once.. but now its not working anymore.. ./configure runs fine.. but the make process stops after a few seconds...

imgstream.cc: In static member function 'static lt_dlhandle_struct* iscan::imgstream::find_dlopen(const char*)':
imgstream.cc:243: error: 'getenv' was not declared in this scope
imgstream.cc:247: error: 'getenv' was not declared in this scope
imgstream.cc:282: error: 'free' was not declared in this scope
imgstream.cc:287: error: 'free' was not declared in this scope
make[2]: *** [libimage_stream_la-imgstream.lo] Fehler 1
make[2]: Leaving directory `/home/carnager/is/src/iscan-2.4.0/lib'
make[1]: *** [all-recursive] Fehler 1
make[1]: Leaving directory `/home/carnager/is/src/iscan-2.4.0'
make: *** [all] Fehler 2
==> FEHLER: Build fehlgeschlagen.

It probably needs some patching. gcc-4.3's c++-Compiler does not include c-headers automatically anymore. Try to find out in what header file 'getenv' and 'free' are defined (man getenv) and include them with

#include <c headerfilename_without_dot_h>

For example, if the header file is head.h, include

#include <chead>

Maybe you have to to this several times for diverse files and/or headers.

Offline

#9 2008-11-19 16:36:47

bernecky
Member
Registered: 2008-11-19
Posts: 2

Re: My first PKGBUILD

I have just gone through the same exercise, trying to make an Epson 4490 work under AMD64 on Ubuntu Intrepid. I gave up on
trying to convert the rpm file to deb format, and am trying to build from source.

1. I had to add several development libraries and associated headers.
2. I got to the above point, then added this line to lib/imgstream.hh:

#include <stdlib.h>
// rbe 2008-11-19. Also did symlink for stdlib in ../include

I also did, as noted above:

  cd include
  ln -s /usr/include/stdlib.h stdlib.h

That sllowed me to build the lib. At that point, "make: in the main directory dies with a complaint about needing -fPIC,
which I looking into now.

Offline

#10 2008-11-19 16:39:28

bernecky
Member
Registered: 2008-11-19
Posts: 2

Re: My first PKGBUILD

Well, I got this far with the make in the main directory. It looks like it's ALMOST there:

gcc -shared  .libs/libsane_epkowa_la-epkowa.o .libs/libsane_epkowa_la-epkowa_ip.o .libs/libsane_epkowa_la-epkowa_scsi.o .libs/libsane_epkowa_la-epkowa_usb.o .libs/libsane_epkowa_la-sane_strstatus.o -Wl,--whole-archive ./.libs/libsane-epkowa-s.a ../sanei/.libs/libsanei.a ../libltdl/.libs/libltdlc.a -Wl,--no-whole-archive  -ldl /usr/lib/libsane.so /usr/lib/libusb.so  -Wl,-soname -Wl,libsane.so.1 -Wl,-version-script -Wl,.libs/libsane-epkowa.ver -o .libs/libsane-epkowa.so.1.0.15
/usr/bin/ld: ./.libs/libsane-epkowa-s.a(libsane_epkowa_s_la-epkowa-s.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC

Not sure where to go from here.

Offline

Board footer

Powered by FluxBB