You are not logged in.

#1 2006-09-09 11:03:56

espo
Member
From: Stuttgart - Germany
Registered: 2006-08-11
Posts: 74

PKGBUILD only copy

Hi there,
i'll try to write a pkgbuild where online 2 folders must be copied. It wont work right.
the folders where copied when i type makepkg but if i add the pkg with pacman -A nothing happens.

the build part looks like this:

build() {
        rm -f /emul/linux/x86/usr/lib/libsmpeg*
        cd $startdir/src/$folder
        mkdir /emul
        cp -R * /emul/
}

greetings
eSpo

Offline

#2 2006-09-09 11:24:25

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

Re: PKGBUILD only copy

Everything in your build should happen in $startdir/pkg or $startdir/src. As you have written it, it will look for a directory called /emul on your system, whereas it should be looking for something like $startdir/pkg/usr/share/emul (that's an example, btw - the exact directory required will depend on the app). Please have a look at the relevant wiki pages for more details.

Offline

#3 2006-09-09 11:25:13

chrismortimore
Member
From: Edinburgh, UK
Registered: 2006-07-15
Posts: 655

Re: PKGBUILD only copy

No no no no no no no!  That isn't what PKGBUILDs are for!  You shouldn't make them so they go willy nilly deleting stuff from the filesystem!  The files you just deleted belong to another package, and thus you have borked that package.  I think the package you're removing files from is "smpeg", so you should set up a "conflicts" line in the PKGBUILD, which will tell pacman not to install your package when smpeg is installed.  Then, you make the package in a working directory, not the live filesystem.  Something like this:

conflicts('smpeg')
build() {
        cd $startdir/src/$folder
        mkdir -p $startdir/pkg/emul/
        cp -vR * $startdir/pkg/emul/
}

Then when you make the package, you'll get a tar.gz with all the files in it from your package.  And when you run "pacman -A", they'll appear under /emul/ and you won't have to worry about the libsmpeg files.

NOTE:  If /emul/linux/x86/usr/lib/libsmpeg isn't owned by "smpeg", then change the package name in the conflicts line.


Desktop: AMD Athlon64 3800+ Venice Core, 2GB PC3200, 2x160GB Maxtor DiamondMax 10, 2x320GB WD Caviar RE, Nvidia 6600GT 256MB
Laptop: Intel Pentium M, 512MB PC2700, 60GB IBM TravelStar, Nvidia 5200Go 64MB

Offline

#4 2006-09-09 13:14:38

espo
Member
From: Stuttgart - Germany
Registered: 2006-08-11
Posts: 74

Re: PKGBUILD only copy

thx a lot now i got it and know how it works.

Thanks a lot

eSpo

Offline

Board footer

Powered by FluxBB