You are not logged in.
Pages: 1
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
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
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
Hi,
ignore me, being silly :oops:
I placed that file that by hand when I was testing. All works OK now.
Thanks
Jon
Offline
Pages: 1