You are not logged in.
Hello Folks,
There's an program (OpenSCAD) in the AUR which does not provide any .desktop file to add the program to the start menu or however you call that thing.
Now I tried to do that myself so I can submit a patch. Therefore, I took a look to another program (slic3r) from the AUR which does have a working .desktop file.
First, the "working" program, slic3r:
PKGBUILD:
pkgname=slic3r-git
pkgver=20120901
pkgrel=1
pkgdesc="Slic3r is an STL-to-GCODE translator for RepRap 3D printers, aiming to be a modern and fast alternative to Skeinforge."
arch=('any')
url="http://slic3r.org/"
license=('GPL')
depends=('perl' 'perl-moo' 'perl-moo' 'perl-boost-geometry-utils' 'perl-math-clipper' 'perl-math-convexhull' 'perl-math-geometry-voronoi' 'perl-math-planepath')
makedepends=('git')
optdepends=('perl-wx: GUI support'
'perl-growl-gntp: notifications support via growl'
'perl-net-dbus: notifications support via any dbus-based notifier'
'perl-xml-sax: Additive Manufacturing File Format (AMF) support')
provides=('slic3r')
conflicts=('slic3r')
source=('slic3r.desktop')
md5sums=('c997a07f658061d29b221cf7fd07ff97')
_gitroot="git://github.com/alexrj/Slic3r"
_gitname="Slic3r"
build() {
cd "$srcdir"
msg "Connecting to GIT server...."
if [ -d $_gitname ] ; then
cd $_gitname && git pull origin
msg "The local files are updated."
else
git clone $_gitroot $_gitname
fi
msg "GIT checkout done or server timeout"
msg "Starting make..."
rm -rf "$srcdir/$_gitname-build"
git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build"
cd "$srcdir/$_gitname-build"
# ENV for perl
export PERL_MM_USE_DEFAULT=0 PERL_AUTOINSTALL="--skipdeps" \
PERL_MM_OPT="INSTALLDIRS=vendor DESTDIR='$pkgdir'" \
PERL_MB_OPT="--installdirs vendor --destdir '$pkgdir'" \
MODULEBUILDRC=/dev/null SLIC3R_NO_AUTO=1
# Nasty fix for useless Growl dependency ... please post in comment real fix, if u know one ;)
# sed -i "s/ 'Growl/\#&/" Build.PL
msg " ⚠ DO NOT respond to any question with 'yes'. Report a bug in comment instead.\n"
# Cuz cpan will install fixes to $HOME ... which is not the point of this package
# Build stage
{ /usr/bin/perl Build.PL &&
./Build &&
./Build test &&
./Build install; } || return 1
# Icons " current Build.PL is not really geared for installation "
install -d $pkgdir/usr/bin/vendor_perl/var
install -m 644 $srcdir/$_gitname-build/var/* $pkgdir/usr/bin/vendor_perl/var/
install -d $pkgdir/usr/share/applications
install -m 644 $srcdir/slic3r.desktop $pkgdir/usr/share/applications/
}.desktop:
[Desktop Entry]
Name=Slic3r
Comment=STL-to-GCODE translator for RepRap printers
Exec=slic3r.pl --gui
Icon=/usr/bin/vendor_perl/var/Slic3r_128px.png
Terminal=0
Type=Application
Encoding=UTF-8
Categories=Development;Application;Now here's what I tried with OpenSCAD:
PKGBUILD
# Maintainer: Pierre DOUCET <pierre at equinoxefr.org>
pkgname=openscad
pkgver=2011.12
pkgrel=1
pkgdesc="OpenSCAD is a software for creating solid 3D CAD objects."
arch=('i686' 'x86_64')
license=('GPLv2')
url="http://openscad.org/"
source=("https://github.com/downloads/openscad/openscad/${pkgname}-${pkgver}.src.tar.gz" "openscad.desktop")
md5sums=('4acd522ccdf368c081e916bd280df260' 'b1e704b3d37f83c293598fcfd5dcd8cc')
depends=('qt' 'cgal' 'eigen' 'opencsg' 'bison' 'flex' 'gcc')
build() {
cd ${srcdir}/${pkgname}-${pkgver}
qmake || return 1
make || return 1
install -D openscad $pkgdir/usr/bin/openscad
install -m 644 $srcdir/openscad.desktop $pkgdir/usr/share/applications/
}.desktop
[Desktop Entry]
Name=OpenSCAD
Comment=software for creating solid 3D CAD objects
Exec=openscad
#Icon=/usr/bin/vendor_perl/var/Slic3r_128px.png
Terminal=0
Type=Application
Encoding=UTF-8
Categories=Graphics;Application;Here's the output from makepkg -si
==> Making package: openscad 2011.12-1 (Wed Sep 19 10:39:54 CEST 2012)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving Sources...
-> Found openscad-2011.12.src.tar.gz
-> Found openscad.desktop
==> Validating source files with md5sums...
openscad-2011.12.src.tar.gz ... Passed
openscad.desktop ... Passed
==> Extracting Sources...
-> Extracting openscad-2011.12.src.tar.gz with bsdtar
==> Removing existing pkg/ directory...
==> Entering fakeroot environment...
==> Starting build()...
make: Nothing to be done for `first'.
install: target ‘/home/tectu/build/openscad/pkg/usr/share/applications/’ is not a directory: No such file or directory
==> ERROR: A failure occurred in build().
Aborting...Can anybody tell me what I am doing wrong?
~ Tectu
Offline
Your install command is failing - the error message tells you exactly what's wrong, and the solution is in the slic3r PKGBUILD that you used for inspiration.
I would, however, suggest a thorough examination of the install man page, as there is a better way to do it.
Offline