You are not logged in.

#1 2009-09-03 05:36:02

Dethredic
Member
Registered: 2009-01-24
Posts: 361
Website

Help Installing A .deb

So, I am trying to install something for my new Palm Pre, and a dependency for this program is novacom.
They provided this .deb:
https://cdn.downloads.palm.com/sdkdownl … 9_i386.deb

I ran deb2targz and then tried to make a PKGBUILD but I was unsuccessful. I just want to make sure I am on the right track before spending too much time on this.

Offline

#2 2009-09-03 05:37:23

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,672
Website

Re: Help Installing A .deb

Can you post your progress so far?

Offline

#3 2009-09-03 16:06:16

Dethredic
Member
Registered: 2009-01-24
Posts: 361
Website

Re: Help Installing A .deb

Sure basically I copied an example pkgbuild from the wiki and added changed it a bit:

# Contributor: Phil 
pkgname=novacom
pkgver=1
pkgrel=1
pkgdesc="novacom"
arch=(i686)
url=""
license=('GPL')
groups=()
depends=()
makedepends=()
provides=()
conflicts=()
replaces=()
backup=()
install=
source=($pkgname-$pkgver.tar.gz)
noextract=()
md5sums=('cba28a12c414ea28a944a145c47b3ee2')

build() {
  cd "$srcdir/$pkgname-$pkgver"

  ./configure --prefix=/usr
  make || return 1
  make DESTDIR="$pkgdir/" install
}

I renamed my .tar.gz file that I got from deb2targz "novacom-1.tar.gz"

Now the build function didn't work and I remember reading on another Wiki that you need to know how the package needs to be built, before doing the pkgbuild.

The error I get is that is tries to cd to /src/novacom-1/ but that directory is not created or have anything in it.

Last edited by Dethredic (2009-09-28 00:05:10)

Offline

#4 2009-09-03 19:44:05

mcmillan
Member
Registered: 2006-04-06
Posts: 737

Re: Help Installing A .deb

It looks like you're trying to get the pkgbuild to compile things, but my understanding of deb2targz is it just makes a *.tar.gz with the already compiled files. You need to tell it to extract your novacom-1.tar.gz and get the contents into $pkgdir to be made into an Arch package.

You could also list the .deb as the source and have the deb2targz be part of the build function.

Offline

#5 2009-09-03 20:15:10

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Help Installing A .deb

The community/gnome-python-docs package is built from a .deb (two actually) using deb2targz - have a look at its PKGBUILD for guidance. FYI there is one error in it - deb2targz should be a makedepend, not a depend.

Offline

#6 2009-09-03 21:54:16

Dethredic
Member
Registered: 2009-01-24
Posts: 361
Website

Re: Help Installing A .deb

I now have this:

pkgname=novacom
pkgver=0.3
pkgrel=1
pkgdesc="novacom"
arch=(i686)
url=""
license=('unknown')
depends=('deb2targz')
options=('')
source=(novacom-0.3.deb)
md5sums=('3a1cd798122383a8cc8ca6f80ff0f6f9')


build() {
    cd $startdir/src

    deb2targz $pkgname-$pkgver.deb

    mkdir -p $startdir/pkg/usr/share/

    # Uncompressing the tar.gz files
    tar -zxf $pkgname-$pkgver.tar.gz

}

That seemed to work.  Can someone make sure it looks right and if so I will add it to AUR
EDIT: I would need to fix the source.

Last edited by Dethredic (2009-09-03 21:54:35)

Offline

#7 2009-09-03 22:10:51

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Help Installing A .deb

You've created the usr/share dir, and you've extracted the tar.gz, and... that's it. You haven't installed any files in the package root i.e. in $startdir/pkg (btw, it's called $pkgdir these days). Read the gnome-python-docs PKGBUILD again, and maybe a few other PKGBUILDS, and some man and wiki pages.

Offline

#8 2009-09-04 04:04:23

Dethredic
Member
Registered: 2009-01-24
Posts: 361
Website

Re: Help Installing A .deb

Ok I added this to the bottom but it didn't work:
    cp $startdir/src/etc/event.d/* $startdir/pkg/etc/event.d
    cp $startdir/src/opt/Palm/novacom/* $startdir/pkg/opt/Palm/novacom
    cp $startdir/src/usr/local/bin/* $startdir/pkg/usr/local/bin
    cp $startdir/src/usr/share/doc/palm-novacom/* $startdir/pkg/usr/share/doc/palm-novacom

I can just run the files in opt/Palm/novacom and it seems to work, so I am assuming installing the package just copies these files to /usr/sbin or something like that.

Offline

#9 2009-09-04 04:36:38

atordo
Member
Registered: 2007-04-21
Posts: 147

Re: Help Installing A .deb

Just a note: deb files are normal "ar" files which can be extracted with "ar x filename.deb", then extracting data.tar.gz. Thus eliminating the deb2targz dependence (ar is part of binutils which should be ubiquitous).

Offline

#10 2009-09-04 05:36:53

ugkbunb
Member
Registered: 2009-02-26
Posts: 227

Re: Help Installing A .deb

Dethredic wrote:

Ok I added this to the bottom but it didn't work:
    cp $startdir/src/etc/event.d/* $startdir/pkg/etc/event.d
    cp $startdir/src/opt/Palm/novacom/* $startdir/pkg/opt/Palm/novacom
    cp $startdir/src/usr/local/bin/* $startdir/pkg/usr/local/bin
    cp $startdir/src/usr/share/doc/palm-novacom/* $startdir/pkg/usr/share/doc/palm-novacom

I can just run the files in opt/Palm/novacom and it seems to work, so I am assuming installing the package just copies these files to /usr/sbin or something like that.

You need to use the install command... I took the following from the bin32-wine aur PKGBUILD....

install -Dm755 "$srcdir/wine.sh" "$pkgdir/etc/profile.d/wine.sh" || return 1

I do no thave much experience with it... but the 755 is the permissions not sure what the other flags do... hopefully someone more knowledgable can expound further.

Offline

#11 2009-09-04 05:50:16

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Help Installing A .deb

If you're using cp, you need to create the dirs before copying files to them. Also, Arch doesn't use /usr/local.

More generally, it would be a good idea to familiarise yourself more thoroughly with the package-making process, as I already suggested.

Offline

Board footer

Powered by FluxBB