You are not logged in.
OK as a maintainer of a package I have a soft dependency of gpac.
Now its been requested that I use
post_install() {}
My question is how? Would I just add it after my build section
build() {
cd $startdir/src/$pkgname-$pkgver
sed -i -e "s|/usr|$startdir/pkg/usr|g" \
-e 's|usr/local/|usr/|g' install
./install
post_install() {
Please install gpac for mp4 or mkv conversion
}
Is this is not correct could some please tell me how to achieve the above so after install it mentions that gpac maybe needed for conversion.
Last edited by FeatherMonkey (2007-11-15 14:21:29)
Offline
You need a separate install file. Take a look at a package which has one to guide you. e.g. Totem
http://cvs.archlinux.org/cgi-bin/viewcv … ag=CURRENT
Offline
acccccccccccctually, I think they recently merged functionality to allow this stuff in the same file. I don't know if it's in a pacman release yet though.
for now, a separate file is probably your best bet
Offline
Thanks Guys
So my understanding is all I need in my PKGBUILD
install=('my.install')
Then in the my.install
post_install() {
cat << EOF
==> Install mkvmerge for Matroska support
==> Install gpac for mp4 support
EOF
}
post_upgrade() {
post_install $1
}
op=$1
shift
$op $*
Is this correct?
Offline
Thanks Guys
So my understanding is all I need in my PKGBUILD
install=('my.install')
It's not an array, so simply:
install=my.install
would work. Most often we name it $pkgname.install for clarity, but you can name it whatever you want.
Then in the my.install
post_install() { cat << EOF ==> Install mkvmerge for Matroska support ==> Install gpac for mp4 support EOF } post_upgrade() { post_install $1 } op=$1 shift $op $*
Is this correct?
on initial scan, that looks pretty good.
On a related note - pacman will natively support optional dependencies sometime in the next couple of releases, AFAIK, so this kind of post-install work-around won't be needed anymore at that time. Yay!
Offline
acccccccccccctually, I think they recently merged functionality to allow this stuff in the same file. I don't know if it's in a pacman release yet though.
Shhh! I don't know how tested it is 8)
Offline
Thanks again Cerebral worked perfectly
Offline
I got a couple of other things firstly in regards to pkgrel I've always presumed that as the version goes up. I've always assumed that I should only increase if I repackage a said version.
Yet I had a comment to the affect asking if I could increase it by one now I felt this is wrong, so what would be the correct way?
The other thing is there something blatantly wrong with the this PKGBUILD or is just a question of TU hasn't got around to it yet?
pkgname=h264enc
pkgver=7.9.5
pkgrel=5
pkgdesc="Advanced shell script for encoding DVDs or video files to the H.264 format using the encoding utility MEncoder from MPlayer."
arch=(i686)
url="http://sourceforge.net/projects/h264enc/"
license=('GPL')
replaces=('')
depends=('mplayer>=1.0rc2' 'x264' 'lsdvd' 'lame' 'bc')
install=$pkgname.install
source=(http://downloads.sourceforge.net/sourceforge/h264enc/$pkgname-$pkgver.tar.gz)
md5sums=('e5b68fc9f296cf8714859a204f041feb')
build() {
cd $startdir/src/$pkgname-$pkgver
sed -i -e "s|/usr|$startdir/pkg/usr|g" \
-e 's|usr/local/|usr/|g' install
./install
}
Offline
You are right with the pkgrel - I don't understand the comment in AUR asking for it to be raised with a version increase. It should go back to 1.
Your PKGBUILD looks fine. Remove the "replaces" line as it is empty and thus not needed. TUs are busy so don't get time to mark all packages as safe. I have never had any of mine marked as safe and one went straight to community so must have been OK...
Offline
Thankyou Allan
Nearly did renumber today it but tend to try to keep the downloaders happy
I actually disagreed with the post_install bit as when the scripts is run it actually prompts if its missing the libs but I'm very much as requested person. So now they get told before they run it as well as when they run it.
Now to put solved into the title.
Offline