INSTALL_ROOT is the variable I need
Oops, glad you caught that, my fingers must've rebelled; I'm glad I put you on the right track at least. Good catch on the libxml2 dependency too, I didn't notice that.
]]>Use this instead, along with whatever other changes you have made since your first post:
prepare() {
cd "$srcdir/$_realname"
patch -p1 -i "$srcdir"/X11_to_libs.patch
}
build() {
cd "$srcdir/$_realname"
qmake -tp stopmotion.pro
make PREFIX=/usr
}
package() {
cd "$srcdir/$_realname"
make DESTDIR="$pkgdir" install
}
Aside from preserving the sources for subsequent updates, it is necessary because the cloned directory is only present in the same directory as the PKGBUILD if SRCDEST is not set in makepkg. Notice that I have also replaced the relative path of the path ("../X11_to_libs.patch") with the path to the copied version in $srcdir for the same reason.
Always quote path variables as well.
]]>Thanks a lot. I've got is sorted now.
]]>1) You should add
makedepends=('git' 'libxml2')
as they're needed to clone the repository and generate the Makefile respectively.
2) You should call qmake with /usr/lib/qt4/bin/qmake, as /usr/bin/qmake is qt5's qmake by default (and I'm assuming it's not backwards compatible, you haven't listed qt5 as a depend or makedepend in any case)
3) The -tp switches to qmake don't work and cause the build to fail for me:
WARNING: Unable to generate output for: /build/src/linuxstopmotion/Makefile [TEMPLATE stopmotion.proapp]
I'm not sure what they're supposed to do or why you have them there, but the instructions on sourceforge don't say to use them. Incidentally, '/usr/lib/qt4/bin/qmake stopmotion.pro' works fine for me.
4) Instead of a patch, consider using sed to add the library to the LIBS variable:
sed -i '/^LIBS/s|$| -lX11|' Makefile
5) $DESTDIR is unused in the Makefile. You should be using $INSTALL_DIR
]]>==> Entering fakeroot environment...
==> Starting package()...
install -m 755 -p "stopmotion" "/usr/bin/stopmotion"
mkdir: cannot create directory ‘/usr/share/stopmotion’: Permission denied
make: *** [install_translations] Error 1
make: *** Waiting for unfinished jobs....
install: cannot create regular file ‘/usr/bin/stopmotion’: Permission denied
make: [install_target] Error 1 (ignored)
: "/usr/bin/stopmotion"
==> ERROR: A failure occurred in package().
Aborting...
# Maintainer: Mark Coolen <mark dot coolen at gmail dot com>
pkgname=linuxstopmotion-git
_realname=linuxstopmotion
pkgver=2013-04-11
pkgrel=1
pkgdesc="software for capturing and creating stop-motion animations - development version"
arch=('i686' 'x86_64')
url="http://www.linuxstopmotion.org"
license=('GPL2')
depends=('qt4' 'sdl_image' 'libtar' 'libvorbis' 'inotify-tools')
#conflicts=('stopmotion')
source=($_realname::git+http://git.code.sf.net/p/$_realname/code
'X11_to_libs.patch')
md5sums=('SKIP'
'77eebd5e3dfb72c9cb2fb6b27d142283')
pkgver() {
cd $_realname
#uses the time of the last commit
git describe --always | sed 's|-|.|g'
}
build() {
cd $_realname
patch -p1 -i ../X11_to_libs.patch
qmake -tp stopmotion.pro
make PREFIX=/usr
}
package() {
cd $_realname
make DESTDIR="$pkgdir" install
}
the patch just changes the stopmotion.pro file, adding -lX11 to line 216 (the LIBS += section)
]]>