You are not logged in.

#1 2007-09-10 23:56:36

sinister99
Member
Registered: 2007-04-10
Posts: 136

post install information

I'm sorry if this is somewhere else, but I'm unsure how to even search for it.

I'm making a package for AUR, and I would like to display some text after the package installs
ex:
upgraded pygtk (2.10.4-2 -> 2.10.6-1)
--> printing support in gimp depends on gutenprint. Install it if you need
--> printing.

Correct me if I am wrong:
create $pkgname.install file with your text (I copied one)
put it in sources md5, etc.
How do I "build" it into the package and make it display?

Offline

#2 2007-09-11 00:04:05

Cerebral
Forum Fellow
From: Waterloo, ON, CA
Registered: 2005-04-08
Posts: 3,108
Website

Re: post install information

sinister99 wrote:

I'm sorry if this is somewhere else, but I'm unsure how to even search for it.

I'm making a package for AUR, and I would like to display some text after the package installs
ex:
upgraded pygtk (2.10.4-2 -> 2.10.6-1)
--> printing support in gimp depends on gutenprint. Install it if you need
--> printing.

Correct me if I am wrong:
create $pkgname.install file with your text (I copied one)
put it in sources md5, etc.
How do I "build" it into the package and make it display?

You don't put it in sources or md5.  You specify it as an install= option.  For example, from the fglrx PKGBUILD:

pkgname=fglrx
pkgver=8.40.4

....

install=${pkgname}.install # this line is the important one
source=(http://www2.ati.com/drivers/linux/ati-driver-installer-$pkgver-x86.x86_64.run)
md5sums=('d02add61ee36a4183510317c3c42b147')
sha1sums=('6260c8596529eac34fabe3437678afe6e2761490')

And, for reference, fglrx.install:

# This is a default template for a post-install scriptlet.  You can
# remove any functions you don't need (and this header).

# arg 1:  the new package version
pre_install() {
  /bin/true
}

# arg 1:  the new package version
post_install() {
  echo "PLEASE NOTE:"
  echo "--------------------------------------------------------------"
  echo "You can use the tool 'aticonfig' to generate an xorg.conf file."
  echo "Remember to add fglrx to the MODULES list in /etc/rc.conf."
  echo "--------------------------------------------------------------"
  KERNEL_VERSION=2.6.22-ARCH
  depmod -v $KERNEL_VERSION > /dev/null 2>&1
}

# arg 1:  the new package version
# arg 2:  the old package version
post_upgrade() {
  KERNEL_VERSION=2.6.22-ARCH
  depmod -v $KERNEL_VERSION > /dev/null 2>&1
}

# arg 1:  the old package version
post_remove() {
  KERNEL_VERSION=2.6.22-ARCH
  depmod -v $KERNEL_VERSION > /dev/null 2>&1
}

op=$1
shift
$op $*

Offline

#3 2007-09-11 00:26:10

sinister99
Member
Registered: 2007-04-10
Posts: 136

Re: post install information

Ok, I got it now.

Thanks for the help big_smile

Last edited by sinister99 (2007-09-11 00:26:49)

Offline

Board footer

Powered by FluxBB