You are not logged in.

#1 2005-11-13 13:58:54

fdrebin
Member
Registered: 2005-04-25
Posts: 152

how to make a simple package the easy way

i want to make a very simple package that can be installed with pacman.
i just want to copy a few files from the package to the /usr directory.
i read the wiki on this but it seems pretty "overkill" for the thing i want to do.
perhaps someone can give me a little hint how this can be done...

Offline

#2 2005-11-13 14:18:45

dtw
Forum Fellow
From: UK
Registered: 2004-08-03
Posts: 4,439
Website

Re: how to make a simple package the easy way

It's not overkill - that's about all I can say.

If it doesn't depend on anything and is hugely simple the it can be very short e.g.:

# Contributor: dibblethewrecker <dibblethewrecker.at.jiwe.org>

pkgname=ibmonitor
pkgver=1.3
pkgrel=1
pkgdesc="Interactive linux console application which shows bandwidth consumed and total data transferred on all interfaces."
url="http://ibmonitor.sourceforge.net/"
license=""
depends=('perl')
source=(http://dl.sourceforge.net/sourceforge/ibmonitor/$pkgname-$pkgver.tar.gz)
md5sums=('6f37ee0b00b62822823cdbabc9d7419e')

build() {
  cd $startdir/src/$pkgname
  install -D -m755 ibmonitor $startdir/pkg/usr/bin/ibmonitor
}

That is a "perfect" PKGBUILD, it doesn't get much simpler than that smile

Offline

#3 2005-11-13 14:30:40

arooaroo
Member
From: London, UK
Registered: 2005-01-13
Posts: 1,268
Website

Re: how to make a simple package the easy way

You need to install ABS. Then have a look at a few PKGBUILDs and see how they do it. Copy one and customise it for your package.

It may take a couple of tries, but I think it's easier to learn by example.

Offline

#4 2005-11-13 15:59:27

fdrebin
Member
Registered: 2005-04-25
Posts: 152

Re: how to make a simple package the easy way

what does this mean in detail

build() { 
  cd $startdir/src/$pkgname 
  install -D -m755 ibmonitor $startdir/pkg/usr/bin/ibmonitor 
}

Offline

#5 2005-11-13 16:26:00

dtw
Forum Fellow
From: UK
Registered: 2004-08-03
Posts: 4,439
Website

Re: how to make a simple package the easy way

It's simple bash.  If you want to fully understand it you need to learn about bash.

All PKGBUILDs include a build () function, which includes all the commands to create the pkg.  In this example we cd to the dir that the source is extracted to (surely that is obvious tho) - $startdir is a makepkg variable that basically means "the dir from which you run makepkg" i.e. the dir that contains the PKGBUILD.  Aside from the cd command there is an install command and man install will tell you all about how that works.  The usage of the install command should be fairly self explanitory - if not I suggest you copy the PKGBUILD to a PKGBUILD file, run makepkg and see what happens wink

Offline

#6 2005-11-18 22:23:38

ambalex
Member
Registered: 2004-11-17
Posts: 87

Re: how to make a simple package the easy way

is it possible to find packages of some programs found in unsupported (from AUR) already packaged?

I know i am lazy, but that would be nice.

Offline

#7 2005-11-18 22:25:10

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: how to make a simple package the easy way

use aurbuild, it builds the package transparently:

aurbuild -b somepackageinaur

Done!
smile

Dusty

Offline

#8 2005-11-18 23:05:19

ambalex
Member
Registered: 2004-11-17
Posts: 87

Re: how to make a simple package the easy way

thanks for the very fast reply!
looks great...
does it automatically builds and installs dependencies?
i have tried with scigraphica, it asked for dependencies so I aurbuilded them. But for libscigraphica, i had an error:

make: *** No targets specified and no makefile found. Stop

is there a way i could fix it?

Offline

#9 2005-11-18 23:35:43

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: how to make a simple package the easy way

It could be that libscigraphica depends on python-numarray which is in AUR.  Have you installed  python-numarray?

Offline

#10 2005-11-18 23:38:57

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

Re: how to make a simple package the easy way

Yes it does check for dependancies, but only builds or installs them if they are official packages. If the package requires other dependancies from aur then you have to explicity tell aurbuild to build them. For me the line to aurbuild would be

aurbuild -s python-numarray libscigraphica  scigraphica

This program calls on makepkg to build the package and makepkg will not attempt to build if the dependancies are not satisfied as specified in the PKGBUILD.
This built fine for me so there may be a dependacy I already have installed that you don't but is not specified in the PKGBUILD.

Offline

#11 2005-11-18 23:39:18

ambalex
Member
Registered: 2004-11-17
Posts: 87

Re: how to make a simple package the easy way

yes, it is installed.

Offline

#12 2005-11-18 23:57:27

ambalex
Member
Registered: 2004-11-17
Posts: 87

Re: how to make a simple package the easy way

either

Code:
aurbuild -s python-numarray libscigraphica  scigraphica

or

Code:
aurbuild -s libscigraphica  scigraphica

(this last one since python-numarray was explicitly installed)

give me the same make problem.

since it works for you, Penguin, then I think you're right and the problem lies within dependencies that are not on the pkgbuild.

Offline

#13 2005-11-19 02:46:39

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: how to make a simple package the easy way

ambalex wrote:

since it works for you, Penguin, then I think you're right and the problem lies within dependencies that are not on the pkgbuild.

Try to build libscigraphica manually by downloading the PKGBUILD and running makepkg. Post the errors that it will give you.

Offline

#14 2005-11-19 22:29:35

ambalex
Member
Registered: 2004-11-17
Posts: 87

Re: how to make a simple package the easy way

building libscigraphica manually also doesn't work. I've got the following:

make: *** No targets specified and no makefile found. Abort
==> ERROR: Build failed. Aborting.

Offline

#15 2005-11-19 23:12:02

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: how to make a simple package the easy way

does configure fail before that? If configure fails, no Makefile is generated

Offline

#16 2005-11-19 23:19:44

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

Re: how to make a simple package the easy way

ambalex wrote:

is it possible to find packages of some programs found in unsupported (from AUR) already packaged?

I know i am lazy, but that would be nice.

Here's a funny thing - I'm looking at the libscigraphica page in the AUR, and there's a comment. Let's see what it says:

dibblethewrecker wrote:

You can download a binary version from the AEGIS [gis] repo

[gis]
Server = http://aegis.jiwe.org/pkgs/gis

It's almost like he was expecting you.... smile

Offline

#17 2005-11-19 23:21:39

ambalex
Member
Registered: 2004-11-17
Posts: 87

Re: how to make a simple package the easy way

i've got the following, right after downloading the source files and before checking many many things:

configure: WARNING: 'missing' script is too old or missing

Offline

#18 2005-11-20 00:08:22

ambalex
Member
Registered: 2004-11-17
Posts: 87

Re: how to make a simple package the easy way

tomk wrote:

dibblethewrecker wrote:

You can download a binary version from the AEGIS [gis] repo

[gis]
Server = http://aegis.jiwe.org/pkgs/gis


ok.. got it.. not easy to find the site of the AEGIS
http://arch-egis.berlios.de/news.php

many thanx for the help to all of you, the arch community is amazing. It's been about one year now i have been with arch, and i've learned a lot smile

Offline

#19 2005-11-24 16:52:45

dtw
Forum Fellow
From: UK
Registered: 2004-08-03
Posts: 4,439
Website

Re: how to make a simple package the easy way

Yeah. sorry. they all moved - I can't update all the links! sad  My sig has the correct address in it tho smile

Offline

Board footer

Powered by FluxBB