You are not logged in.

#1 2003-10-23 04:44:31

red_over_blue
Member
Registered: 2003-07-19
Posts: 152

makepkg/abs tutorial

Some people on irc have been wondering about the proper way to compile their own Arch packages using the Arch Build System (ABS).  This is a quick tutorial describing the steps I took to get myself setup to do this.  I don't claim to be an ABS/makepkg guru, but hopefully there will be enough info here to get people started.

Background info


>>  ABS is a system for compiling Arch packages from source code
>>  After installing ABS, the ABS tree resides in /var/abs
>>  Within /var/abs are directories for each package available to Arch users via pacman
>>  Within each of these directories is a file called PKGBUILD which contains the directions for compiling the package from source, including version info and urls to source files.
>>  The primary tool for invoking PKGBUILD scripts is the makepkg utility
>>  Most PKGBUILDs will successfully compile a package when used as a normal user using fakeroot.  This is conducive to maintaining a safe and secure environment when executing PKGBUILD scripts.

Obtaining the ABS tree

The first step is to obtain the ABS tree which contains all the PKGBULDs for the packages we wish to build from source.  This is as simple as running abs as root:

[root@limbo root]# abs


Installing fakeroot

Again, fakeroot is used to provide protection against accidently overwriting/deleting/creating files or directories. 

[root@limbo root]# pacman -S fakeroot

Setting up a directory in which to build our packages

*  This section can be omitted if you choose to build packages in a dedicated directory in a normal users home directory.  I chose this method to maintain some structure and organization for my packages.


>>  This section is open to opinion and personal preference. 
>>  For a normal user to be able to run makepkg on a PKGBUILD, they must have write access to the directory the PKGBUILD is contained in.  To accomplish this and maintain security, we do the following:
>>  Create an abs group and make a normal user a member of that group.  In this example, I want the user john to be able to write to the directory we are going to create for local packages.

[root@limbo root]# groupadd abs
[root@limbo root]# usermod -G users,slocate,abs john

>>  Just a note, the user must log out and log back in for group changes to take effect.
>>  Now, we edit the directory /var/abs/local so that members of the abs group will have write permissions to it:

[root@limbo root]# chown root.abs /var/abs/local
[root@limbo root]# chmod 775 /var/abs/local 

Building a package from source using ABS

As an example, let's suppose we want to build the terminal emulator aterm using ABS.  Here are the steps we would take (the whoami's are not necessary, but are just there to emphasize which user is doing which parts):

[john@limbo john]$ whoami
john
[john@limbo john]$ cd /var/abs/local/
[john@limbo local]$ find /var/abs/ -iname "*aterm*"
/var/abs/x11/aterm
[john@limbo local]$ mkdir aterm
[john@limbo local]$ cp /var/abs/x11/aterm/* aterm/
[john@limbo local]$ cd aterm/
[john@limbo aterm]$ ls
PKGBUILD  linuxkeys.patch
[john@limbo aterm]$ makepkg -c

** makepkg invokes the PKGBUILD script and created an Arch package which is suffixed with pkg.tar.gz.  The -c cleans up a number of directories created by makepkg during the build process.  **

[john@limbo aterm]$ ls

PKGBUILD                  aterm-0.4.2.tar.gz  linuxkeys.patch aterm-0.4.2-3.pkg.tar.gz
[john@limbo aterm]$ su  
Password: 
[root@limbo aterm]# whoami
root
[root@limbo aterm]# pacman -A aterm-0.4.2-3.pkg.tar.gz 
loading package data... done.
checking for file conflicts... done.
upgrading aterm... done.

If you are upgrading a package you already have installed on your system, use "pacman -U pkgname-pkgver.pkg.tar.gz" as opposed to "pacman -A pkgname-pkgvery.pkg.tar.gz" as shown above.

Well, I hope that helps some people.  It's late, so I have likely missed something, so please post feedback if something is not working properly. 

Good luck!


Don't forget to post your PKGBUILD in your thread when you announce a new package in incoming.
see HERE for details

Offline

#2 2003-10-23 04:48:45

Xentac
Forum Fellow
From: Victoria, BC
Registered: 2003-01-17
Posts: 1,797
Website

Re: makepkg/abs tutorial

Not to discount the usefullness (is that spelled right?) of this of this... but doesn't arch's documentation tell you all about abs anyway?  That's how I learned about it... back when I started...


I have discovered that all of mans unhappiness derives from only one source, not being able to sit quietly in a room
- Blaise Pascal

Offline

#3 2003-10-23 04:55:58

red_over_blue
Member
Registered: 2003-07-19
Posts: 152

Re: makepkg/abs tutorial

Xentac,

I'm sure all of this info is available in different areas throughout the Arch documentation.  I only wrote this because some people on irc were unsure about using fakeroot, weren't sure how to make a directory write accesible to a group, etc.  I thought instead of replying with a long-winded explanation on irc that I would write a quick tut here, and people could take it for what its worth.


Don't forget to post your PKGBUILD in your thread when you announce a new package in incoming.
see HERE for details

Offline

#4 2003-11-06 22:53:47

jedthehumanoid
Member
From: Chicago, Il
Registered: 2003-07-28
Posts: 19

Re: makepkg/abs tutorial

red_over_blue:

ok, i want to learn how to use abs so i can eventually build gtkpod for my ipod.  (i'm not installing windows just to use the ipod!)

first thing first though.  i followed your guide to see if i can at least build something that is already setup for me.

this is the result:

Script started on Thu Nov  6 16:45:54 2003
tom@thompson:~$ su
Password:
[root@thompson tom]# abs
Connected to cvs.archlinux.org
Updating collection arch/cvs
Finished successfully
Connected to unofficial.archlinux.org
Updating collection unofficial/cvs
Finished successfully
[root@thompson tom]# pacman -S fakeroot
:: fakeroot-0.7.8-1: is up to date.  Upgrade anyway? [Y/n] y

Targets: fakeroot-0.7.8-1

Proceed with upgrade? [Y/n] y

:: Retrieving packages from current...
fakeroot-0.7.8-1.pkg.tar [##########                          ]  28% |     11K
fakeroot-0.7.8-1.pkg.tar [####################                ]  56% |     22K
fakeroot-0.7.8-1.pkg.tar [##############################      ]  84% |     33K
fakeroot-0.7.8-1.pkg.tar [####################################] 100% |     40K


loading package data... done.
checking for file conflicts... done.

upgrading fakeroot... done.
[root@thompson tom]# groupadd abs
[root@thompson tom]# usermod -G users,abs tom
[root@thompson tom]# chown root.abs /var/abs/local
[root@thompson tom]# chmod 775 /var/abs/local
[root@thompson tom]# exit
exit
tom@thompson:~$ cd /var/abs/local/
tom@thompson:/var/abs/local$ find /var/abs/ -iname "*aterm*"
/var/abs/x11/aterm
tom@thompson:/var/abs/local$ mkdir aterm
tom@thompson:/var/abs/local$ cp /var/abs/x11/aterm/* aterm/
tom@thompson:/var/abs/local$ cd aterm
tom@thompson:/var/abs/local/aterm$ ls
mPKGBUILD  linuxkeys.patch
tom@thompson:/var/abs/local/aterm$ makepkg -c
==> Entering fakeroot environment
==> Making package: aterm  (Thu Nov  6 16:49:04 CST 2003)
==> Checking Dependencies...
error: /var/lib/pacman/local/openbox-2.3.1-1/desc: Permission denied
error: /var/lib/pacman/local/openbox-2.3.1-1/desc: Permission denied
error: /var/lib/pacman/local/openbox-2.3.1-1/desc: Permission denied
error: /var/lib/pacman/local/openbox-2.3.1-1/desc: Permission denied
error: /var/lib/pacman/local/openbox-2.3.1-1/desc: Permission denied
error: /var/lib/pacman/local/openbox-2.3.1-1/desc: Permission denied
==> Missing Dependencies:

requires: xfree86

tom@thompson:/var/abs/local/aterm$ exit
Script done on Thu Nov  6 16:49:06 2003

the only line i didn't follow exactly was:

[root@limbo root]# usermod -G users,slocate,abs john

i wasn't sure what slocate was for but i know i don't have that group on my 'puter....

Offline

#5 2003-11-07 07:59:32

secsaba
Member
From: Espoo, Finland
Registered: 2003-11-06
Posts: 19

Re: makepkg/abs tutorial

A very useful command is:

makepkg -c 2>&1 | tee build.lst

After the build you can inspect the build.lst file for any warning/error that you have missed during the build process.

Offline

#6 2003-11-08 02:51:14

red_over_blue
Member
Registered: 2003-07-19
Posts: 152

Re: makepkg/abs tutorial

jedthehumanoid,

Are you still having these problems?  I don't know why comiling aterm would have anything to do with openbox.  I would suggest trying again with another package, say rxvt for example, and see if you still get errors.

Has anyone else followed this tutorial and received errors?  I don't know why you would.

Anyway, I hope to hear from you, either good or bad, so that I can pinpoint what is happening here.

Thanks,


red_over_blue


Don't forget to post your PKGBUILD in your thread when you announce a new package in incoming.
see HERE for details

Offline

#7 2003-11-08 02:58:48

Xentac
Forum Fellow
From: Victoria, BC
Registered: 2003-01-17
Posts: 1,797
Website

Re: makepkg/abs tutorial

jedthehumanoid's problem is with permissions in his /var/lib/pacman/local, which is the place where all the installed package's info goes.  It has nothing to do with abs or makepkg except that when makepkg runs pacman, to check dependencies, pacman can't read openbox-2.3.1-1/desc because of incorrect permissions (and running as a non-root user).

Possibly, with the openbox upgrade this might have fixed itself.  If not then jedthehumanoid is going to have to figure out what's wrong with the permissions and fix it.

For the record, even without your instructions I've had no problems compiling packages from abs that weren't fixable (usually without anyone else's help).  wink


I have discovered that all of mans unhappiness derives from only one source, not being able to sit quietly in a room
- Blaise Pascal

Offline

#8 2003-11-08 03:35:08

red_over_blue
Member
Registered: 2003-07-19
Posts: 152

Re: makepkg/abs tutorial

jedthehumanoid,


I discussed this some more with Xentac on irc, and he pointed out that makepkg will call pacman to get the desc file for all your local packages when building packages.

There might have been a problem with the permissions on the directories created by pacman when installing openbox.  After upgrading openblox, if you still have the same issues, feel free to join #archlinux on irc.freenode.net and I or someone else will be much more capable of helping you there.


Don't forget to post your PKGBUILD in your thread when you announce a new package in incoming.
see HERE for details

Offline

#9 2003-11-08 19:41:30

jedthehumanoid
Member
From: Chicago, Il
Registered: 2003-07-28
Posts: 19

Re: makepkg/abs tutorial

yes, reinstalling openbox did the trick.  i was really lost when i saw that error message because i couldn't figure out myself what the apparent connection was.  anyway, reinstalling had a side-effect....it installed openbox 3 as it just went into unofficial.  so i started x, and i was like....ohhhh, fsck. 

lol, looks like i got more to do than i thought...... tongue  thanks for helping me out.....  you archers are the best!!!

Offline

#10 2004-03-21 04:17:59

whol
Member
Registered: 2004-02-04
Posts: 155

Re: makepkg/abs tutorial

Somewhere, it should be pointed out for newbies (in the documentation)- that you must install the cvsup package before abs will run.

thx

Offline

#11 2004-03-21 04:54:56

sarah31
Member
From: Middle of Canada
Registered: 2002-08-20
Posts: 2,975
Website

Re: makepkg/abs tutorial

isn't there a warning somewhere along those lines if you try to run abs without cvsup?

but a good point anyway.


AKA uknowme

I am not your friend

Offline

#12 2004-12-24 06:26:12

Jet2k5
Member
Registered: 2004-10-03
Posts: 37

Re: makepkg/abs tutorial

I don't understand half of the documentation provided with all the Arch man packages... I found this too be extremely helpfull and it led me to my first succesfull abs thingy, which is xcdroast with gtk2 support. Nicely done, sure as heck made a n00b happy wink

-Luis

Offline

#13 2005-07-29 01:59:15

sullivanva
Member
From: Herndon, VA USA
Registered: 2005-07-21
Posts: 126

Re: makepkg/abs tutorial

Nice methodology for packaging.  I thought I would try it out myself and these are my updates.  Times have changed, life moves on, and this is what happens:

root@boogie:/var/abs/local/aterm> makepkg -c
==> Making package: aterm 0.4.2-4 (Thu Jul 28 19:49:38 EDT 2005)
==> Checking Runtime Dependencies...
==> Checking Buildtime Dependencies...
==> Retrieving Sources...
==>     Downloading aterm-0.4.2.tar.bz2
--19:49:38--  http://umn.dl.sourceforge.net/sourcefor … 4.2.tar.bz 2
           => `aterm-0.4.2.tar.bz2'
Resolving umn.dl.sourceforge.net... 128.101.240.209
Connecting to umn.dl.sourceforge.net|128.101.240.209|:80... failed: Connection r efused.
==> ERROR: Failed to download aterm-0.4.2.tar.bz2
==> Aborting...
root@boogie:/var/abs/local/aterm>

Let's go to aterm-1.0.0.tar.bz2.  No appropriate emoticons to indicate the fear!!

New PKGBUILD:

root@boogie:/var/abs/local/aterm> cat PKGBUILD
# $Id: PKGBUILD,v 1.8 2004/01/29 13:22:41 dale Exp $
# Maintainer: dale <dale@archlinux.org>
# Contributor: Tom Newsom <Jeepster@gmx.co.uk>
# Modified by:

pkgname=aterm
pkgver=1.0.0
pkgrel=5
pkgdesc="An xterm replacement with transparency support"
depends=('xfree86')
url=http://aterm.sourceforge.net/
source=( http://easynews.dl.sourceforge.net/sour … er.tar.bz2 )
md5sums=('ceb64c62ae243a7fc3ddb0d6f9a19faa')

build() {
  cd $startdir/src/$pkgname-$pkgver
  ./configure --prefix=/usr --enable-transparency=yes
    --enable-background-image --enable-fading --enable-menubar
    --enable-graphics
  make || return 1
  make prefix=$startdir/pkg/usr install
}
root@boogie:/var/abs/local/aterm>

Couldn't find the md5sums so I had to do them myself. 

root@boogie:/var/abs/local/aterm> makepkg -c
==> Making package: aterm 1.0.0-5 (Thu Jul 28 20:51:27 EDT 2005)
==> Checking Runtime Dependencies...
==> Checking Buildtime Dependencies...
==> Retrieving Sources...
==>     Found aterm-1.0.0.tar.bz2 in build dir
==> Validating source files with MD5sums
    aterm-1.0.0.tar.bz2 ... Passed
==> Extracting Sources...
==>     tar --use-compress-program=bzip2 -xf aterm-1.0.0.tar.bz2
==> Starting build()...
configuring for aterm 1.00.00
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking how to run the C preprocessor... gcc -E
checking for egrep... grep -E
checking for AIX... no
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ANSI C... (cached) none needed
checking how to run the C preprocessor... gcc -E
checking for a BSD-compatible install... /bin/install -c
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for a BSD-compatible install... /bin/install -c
checking for ranlib... ranlib
checking for rm... /bin/rm
checking for mv... /bin/mv
checking for cp... /bin/cp
checking for mkdir... /bin/mkdir
checking for perl... /usr/bin/perl
checking for find... /usr/bin/find
checking for xargs... /usr/bin/xargs
checking for ldconfig... /sbin/ldconfig
checking for sed... /bin/sed
checking for wait3 that fills in rusage... yes
checking for X... libraries /usr/X11R6/lib, headers /usr/X11R6/include
checking for gethostbyname... yes
checking for connect... yes
checking for remove... yes
checking for shmat... yes
checking for IceConnectionNumber in -lICE... yes
checking for XOpenDisplay in -lX11... yes
checking for XShapeCombineMask in -lXext... yes
checking if distributed as part of AfterStep... no
checking installed libAfterImage... afterimage-config not found - no AfterStep i ntegration available.
AfterStep integration
To enable background image support you will need to download and install
libAfterImage from ftp://ftp.afterstep.org/stable/libAfterImage/ and then re-run  this script.

...

whoops, I don't care
...

make[1]: Leaving directory `/var/abs/local/aterm/src/aterm-1.0.0/src/graphics'
==> Compressing man pages...
==> Stripping debugging symbols from libraries...
==> Stripping symbols from binaries...
==> Generating .PKGINFO file...
==> Generating .FILELIST file...
==> Compressing package...
==> Cleaning up...
==> Finished making: aterm  (Thu Jul 28 20:51:43 EDT 2005)
root@boogie:/var/abs/local/aterm>

For those watching closely, I had to remove the patch:

Previous attempt:

==> Starting build()...
patching file src/feature.h
Hunk #1 FAILED at 123.
1 out of 1 hunk FAILED -- saving rejects to file src/feature.h.rej


Questions:

1.  Why dowload each time?  URLs come and go and change.  Informational?  It is smart enough not to actually download after the first time.
2.  xfree86 is not on my system.  Why work?  xorg good, xfree bad.


--HAPS

Offline

#14 2005-07-29 04:41:58

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

Re: makepkg/abs tutorial

1. You are using the -c switch. I guess it deletes the downloaded sources when it cleans up. Try using makepkg without it.
2. If you have xorg installed, don't worry about that.  Arch doesn't use xfree anymore; it uses xorg instead. xorg provides xfree86 so it works.
from: /var/abs/x11/xorg/PKGBUILD
provides=('x-server' 'xfree86')

Offline

#15 2005-12-14 11:39:14

kozaki
Member
From: London >. < Paris
Registered: 2005-06-13
Posts: 671
Website

Re: makepkg/abs tutorial

Please let's ask a noob question lol
I wanna give some beta-software a try wile packaging it. As I use this software final version, i want to be able to use both of them.

How to edit beta-software's PKGBUILD in order to achieve that ?

Should I just have to add something to 'pkgname' so it won't replace the final version of that app ?


Seeded last month: Arch 50 gig, derivatives 1 gig
Desktop @3.3GHz 8 gig RAM, linux-ck
laptop #1 Atom 2 gig RAM, Arch linux stock i686 (6H w/ 6yrs old battery smile) #2: ARM Tegra K1, 4 gig RAM, ChrOS
Atom Z520 2 gig RAM, OMV (Debian 7) kernel 3.16 bpo on SDHC | PGP Key: 0xFF0157D9

Offline

#16 2005-12-14 17:09:40

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

Re: makepkg/abs tutorial

You'll nedd to change the pkgname. Also, you'll probably need to install it in another location to prevent file conflicts:
./configure --prefix=/opt/program
could work for example.

Offline

#17 2005-12-14 19:04:24

kozaki
Member
From: London >. < Paris
Registered: 2005-06-13
Posts: 671
Website

Re: makepkg/abs tutorial

Merci snowman wink
OK got the principle

Now for Opera there's no ./configure but a "install.sh" with

#!/bin/sh

str_progname="install.sh"
str_defaultprefix="/usr"
OPERADESTDIR=''

Is there a doc to make a PKGBUILD with such a case ?
I'll check out possible exemples in /var/abs/* , and hope I won't have to deal with such tools as 'sed'...

Thanks to qpkg I found that matsche has allready done a PKGBUILD, unfortunetly without changing neither the name nor the destination lol


Seeded last month: Arch 50 gig, derivatives 1 gig
Desktop @3.3GHz 8 gig RAM, linux-ck
laptop #1 Atom 2 gig RAM, Arch linux stock i686 (6H w/ 6yrs old battery smile) #2: ARM Tegra K1, 4 gig RAM, ChrOS
Atom Z520 2 gig RAM, OMV (Debian 7) kernel 3.16 bpo on SDHC | PGP Key: 0xFF0157D9

Offline

#18 2005-12-14 20:11:45

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

Re: makepkg/abs tutorial

Add :

sed -i 's|str_defaultprefix="/usr"|str_defaultprefix="/opt/opera"|' install.sh

before the ./install.sh line. Also add:

ln -s /opt/opera/bin/opera $startdir/pkg/usr/bin/operabeta

after the install.sh line.
Running
$ operabeta
will start the beta version.  I haven't tested this, though.

Offline

#19 2005-12-14 21:37:15

sh__
Member
Registered: 2005-07-19
Posts: 272

Re: makepkg/abs tutorial

Snowman wrote:

Also add:

ln -s /opt/opera/bin/opera $startdir/pkg/usr/bin/operabeta

after the install.sh line.

Shouldn't that be

ln -s $startdir/pkg/opt/opera/bin/opera $startdir/pkg/usr/bin/operabeta

Anyway, you can test Opera 9 just by unpacking the tarball somewhere in your homedir and running opera from there. There is no need to install it systemwide. A problem is though that it wants to convert existing mail accounts to a new format (you can choose not to, but then mail & feeds will be disabled).

Offline

#20 2005-12-14 21:53:26

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

Re: makepkg/abs tutorial

sh__ wrote:
Snowman wrote:

Also add:

ln -s /opt/opera/bin/opera $startdir/pkg/usr/bin/operabeta

after the install.sh line.

Shouldn't that be

ln -s $startdir/pkg/opt/opera/bin/opera $startdir/pkg/usr/bin/operabeta

No. You want the symlink to point to the actual file after installation (/opt/opera/bin/opera) not to the file in the build directory ($startdir/pkg/opt/opera/bin/opera).  wink

Offline

#21 2005-12-14 22:43:41

sh__
Member
Registered: 2005-07-19
Posts: 272

Re: makepkg/abs tutorial

Snowman wrote:

No. You want the symlink to point to the actual file after installation (/opt/opera/bin/opera) not to the file in the build directory ($startdir/pkg/opt/opera/bin/opera).  wink

Ah, that's very true.  smile

One should add

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

before creating the symlink, otherwise ln will complain about a missing file or directory.

Offline

#22 2005-12-15 00:43:30

kozaki
Member
From: London >. < Paris
Registered: 2005-06-13
Posts: 671
Website

Re: makepkg/abs tutorial

Snowman > Thanks a lot for the lines. They give me some lightning
I know I could just test it easily after having unpacked it, but you know, I'm on this to learn a bit about making packages in Arch (need some real motivation & Opera-9.0 is just good for that) wink

Well I still miss some stuff. It look for "/var/abs/local/opera-preview/src/opera-preview-9.0..." & can't find it, as I gave it this name, & $startdir = $pkgname :?

As for the new mail formating, I think I might be able to change opera-9.0 configuration & make it look at a different location (not ~.opera/mail).

The PKGBUILD so far :

pkgname=opera-preview
pkgver=9.0
pkgrel=1
pkgdesc="The Opera 9.0 Preview-1 web browser (beta)"
depends=('x-server' 'lesstif' 'qt')
source=(http://snapshot.opera.com/unix/9.0-Preview-1/intel-linux/opera-9.0-20051020.6-shared-qt.i386-en.tar.gz)
url="http://www.opera.com/"
md5sums=('fe67a740e0825e03b874e1b8add02c4c')

build() {
   cd $startdir/src/$pkgname-9.0-20051020.6-shared-qt.i386-en
   sed -i 's|str_defaultprefix="/usr"|str_defaultprefix="/opt/opera"|' install.sh
   ./install.sh DESTDIR=$startdir/pkg
   ln -s /opt/opera/bin/opera $startdir/pkg/usr/bin/opera-preview
   sed 's=libXm.so.3=libXm.so.2=' -i $startdir/pkg/usr/lib/opera-preview/plugins/operamotifwrapper-3
}

Seeded last month: Arch 50 gig, derivatives 1 gig
Desktop @3.3GHz 8 gig RAM, linux-ck
laptop #1 Atom 2 gig RAM, Arch linux stock i686 (6H w/ 6yrs old battery smile) #2: ARM Tegra K1, 4 gig RAM, ChrOS
Atom Z520 2 gig RAM, OMV (Debian 7) kernel 3.16 bpo on SDHC | PGP Key: 0xFF0157D9

Offline

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

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

Re: makepkg/abs tutorial

Kozaki: follow sh__ comment of adding
mkdir -p $startdir/pkg/usr/bin/
before creating the symlink.
About your error, does the directory $startdir/src/$pkgname-9.0-20051020.6-shared-qt.i386-en exist?
Try using:
cd $startdir/src/opera-9.0-20051020.6-shared-qt.i386-en
instead. If it still doesn't work, post the exact error message.

Offline

#24 2005-12-15 12:36:09

kozaki
Member
From: London >. < Paris
Registered: 2005-06-13
Posts: 671
Website

Re: makepkg/abs tutorial

Thank you Snowman & sh_ smile

Added sh_ 'mkdir -p $startdir/pkg/usr/bin/' then on 1st launch i got this error :

==> Starting build()...
sed: can't read /var/abs/local/opera-preview/pkg/usr/lib/opera/plugins/operamotifwrapper-3:

Thereafter I edited last PKGBUILD's line to
'sed 's=libXm.so.3=libXm.so.2=' -i $startdir/pkg/opt/opera/lib/opera/plugins/operamotifwrapper-3'
& it built opera-preview-9.0-1.pkg.tar.gz smile

If i was going to share the PKGBUILD, should I change Maintainer or Contributor string ?

# Maintainer: dorphell <dorphell@archlinux.org>
# Contributor: dorphell <dorphell@archlinux.org>
pkgname=opera-preview
pkgver=9.0
pkgrel=1
pkgdesc="The Opera web browser Preview-1 (beta) version"
depends=('x-server' 'lesstif' 'qt')
source=(http://snapshot.opera.com/unix/9.0-Preview-1/intel-linux/opera-9.0-20051020.6-shared-qt.i386-en.tar.gz)
url="http://www.opera.com/"
md5sums=('fe67a740e0825e03b874e1b8add02c4c')

build() {
   cd $startdir/src/opera-9.0-20051020.6-shared-qt.i386-en
   sed -i 's|str_defaultprefix="/usr"|str_defaultprefix="/opt/opera"|' install.sh
   ./install.sh DESTDIR=$startdir/pkg
   mkdir -p $startdir/pkg/usr/bin/
   ln -s /opt/opera/bin/opera $startdir/pkg/usr/bin/$startdir
   sed 's=libXm.so.3=libXm.so.2=' -i $startdir/pkg/opt/opera/lib/opera/plugins/operamotifwrapper-3
}

Seeded last month: Arch 50 gig, derivatives 1 gig
Desktop @3.3GHz 8 gig RAM, linux-ck
laptop #1 Atom 2 gig RAM, Arch linux stock i686 (6H w/ 6yrs old battery smile) #2: ARM Tegra K1, 4 gig RAM, ChrOS
Atom Z520 2 gig RAM, OMV (Debian 7) kernel 3.16 bpo on SDHC | PGP Key: 0xFF0157D9

Offline

#25 2005-12-16 01:14:10

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

Re: makepkg/abs tutorial

Remove Maintainer string.
Change Contributor string.

The line:
ln -s /opt/opera/bin/opera $startdir/pkg/usr/bin/$startdir
is incorrect.  It should be:
ln -s /opt/opera/bin/opera $startdir/pkg/usr/bin/opera-devel

I would name the package opera-devel instead of opera-preview because this is a more standard and intuitive name.

Offline

Board footer

Powered by FluxBB