You are not logged in.

#1 2005-11-07 22:59:20

jondkent
Member
From: London
Registered: 2005-09-13
Posts: 123

makepkg install file query

Hi,

Put together a PKGBUILD file for lmms, all works fine, pacman installed, works great.  Then I thought I'd like to get it to install an application file into /opt/gnome/share/applications and add an evironment file to /etc/profile.d

It looks like creating a lmms.install file with a post entry should do the trick, copying these file into the relevant directories but this does not seem to be working.

The lmms.install file I knocked up is:

post_install() {
if [ -d /opt/gnome ]
then
        [ -f /opt/gnome/share/applications/lmms.desktop] && rm /opt/gnome/share/applications/lmms.desktop

        cp /var/abs/local/lmms/lmms.desktop /opt/gnome/share/applications
fi

[ -f /etc/profile.d/lmms.sh ] && rm /etc/profile.d/lmms.sh

cp /var/abs/local/lmms/lmms.sh /etc/profile.d
}

op=$1
shift
$op $*

Am I missing something here?

Cheers,

Jon

Offline

#2 2005-11-07 23:07:33

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

Re: makepkg install file query

Don't use a .install for that, it's messy. It is much better to create the lmms.desktop and lmms.sh files. Add them to the source array of the PKGBUILD. Then in the PKGBUILD, add:

install -D -m644 $startdir/src/lmms.desktop $startdir/pkg/opt/gnome/share/applications/lmms.desktop
install -D -m755 $startdir/src/lmms.sh $startdir/pkg/etc/profile.d/lmms.sh

at the end of the build function.

Offline

#3 2005-11-07 23:39:04

jondkent
Member
From: London
Registered: 2005-09-13
Posts: 123

Re: makepkg install file query

Hi,

Yeh I tried that and got the following errors:

loading package data... done.
checking for file conflicts...
error: the following file conflicts were found:
  lmms: /etc/profile.d/lmms.sh: exists in filesystem


errors occurred, no packages were upgraded.

when installing the package.

Jon

Offline

#4 2005-11-07 23:40:54

jondkent
Member
From: London
Registered: 2005-09-13
Posts: 123

Re: makepkg install file query

Hi,

ignore me, being silly  :oops:

I placed that file that by hand when I was testing.  All works OK now.

Thanks

Jon

Offline

Board footer

Powered by FluxBB