[pacman-dev] How to run the install scripts

Xavier shiningxc at gmail.com
Mon Jul 9 16:10:12 EDT 2007


On Mon, Jul 09, 2007 at 09:49:56PM +0200, Siem Korteweg wrote:
> Hi,
> 
> hope this is the proper mailing-list to post this. 
> 
> I am new to ArchLinux and developing a package. I am having trouble to get
> the install scripts running, I tested the following (minimal) package:
> 
> file x.install:
> echo "$0 with arguments: $*" >>/tmp/log
> # to be extended for pre- and post-install actions
> exit 0
> 
> file src/x
> #!/bin/sh
> echo "$0"
> exit 0
> 
> file x.build:
> pkgname=x
> pkgver=1.1.1
> pkgrel=1
> pkgdesc=('get the install scripts running')
> arch=('i686')
> install=x.install
> license=('GPL')
> build(){
>    mkdir -p ../pkg/opt/x/bin
>    cp -x ../pkg/opt/x/bin
>    chmod 700 ../pkg/opt/x/bin/x
> }
> 
> building the package with the command: makepkg -p x.build
> The build succeeds and the resulting x-1.1.1-1.i686.pkg.tar.gz file contains
> all the right files and the .INSTALL file contains the code of the x.install
> file.
> 
> Installing the package with: pacman -U x-1.1.1-1.i686.pkg.tar.gz succeeds
> also. The file /opt/x/bin/x is created. However, the file /tmp/log does not
> exist, while I expected it to contain several lines for at least pre-install
> and post-install. I did not change any of the pacman configuration files (on
> my base-install).
> 
> Why does the install script not run?
> 
> Thanks in advance for any clue.
> 
> Siem Korteweg

Read The Fine Manual :
man PKGBUILD
section INSTALL/UPGRADE/REMOVE SCRIPTING
it also tells you how to get a template, which could probably be helpful :)




More information about the pacman-dev mailing list