You are not logged in.
I just uploaded my first PKGBUILD
Because I had to make some descisions and am new to pkgbuilding, I'm interesetd in your opinion.
I thought long about setting environment vars - the buildscript needs three paths to build and I was unsure to set those in the pkgbuild, because users with custom packages may not have them located the same place where the official Arch packages rest.
That raised a secons question: Would you say that (intense) sanity checks belong into a pkgbuild, or rather not (for example verifying that $QTDIR does not point to Qt3)?
Another thing is a few files had weired access rights (like, only root has read rights), so I got out the sledgehammer and just ran chmod over the whole tree. Not entirely sure about that.
I already noticed one thing - in AUR's webinterface the URL to the source is not expanded correctly as I used ${pkgver:8} in the path. My first impulse was to change it, but then I descided that it's a bug in AUR which could get fixed
pkgname=eclipse-qt-eclipse-integration
pkgver=1.4.3
pkgrel=1
pkgdesc="Qt Eclipse integration for C++"
arch=('i686' 'x86_64')
url="http://trolltech.com/developer/eclipse-integration"
license=('GPL')
depends=('qt>=4.4.2' 'eclipse>=3.4' 'eclipse-cdt>=3.1.1')
makedepends=('apache-ant' 'jdk')
conflicts=('eclipse-qt4')
install=${pkgname}.install
[ $CARCH = "i686" ] && {
source=("http://dist.trolltech.com/developer/download/${pkgname:8}-linux.x86-${pkgver}-src.tar.gz")
md5sums=('e6be7c472ae94a7e3cf138395576da55')
_pltfrm="linux.x86"
} || {
source=("http://dist.trolltech.com/developer/download/${pkgname:8}-linux.x86_64-${pkgver}-src.tar.gz")
md5sums=('1bea662b52ad9d097e2da11b07cb640c')
_pltfrm="linux.x86_64"
}
build() {
_blt=${pkgname:8}-${_pltfrm}-${pkgver}
cd "$srcdir/${_blt}"
export QTDIR=/usr
export JAVADIR=${JAVA_HOME:=/opt/java}
export ECLIPSEDIR=/usr/share/eclipse
sed -i 's|\(^.*grep -F 4.4.3.*$\)|#makepkg_edit#\1|' build.sh
sed -i 's|\(^.*grep "org\[.\]eclipse\[.\]cdt.*jar".*$\)|#makepkg_edit#\1|' build.sh
# # Ensure $QTDIR does not point to Qt3:
# ${QTDIR}/bin/qmake --version || egrep '[^\.]4' >/dev/null || {
# echo '$QTDIR might not point to a Qt4 build'; return 1;
# }
patch com.trolltech.qtcppproject/build.xml ${startdir}/include_dropins.patch || return 1
./build.sh || return 1
mkdir -p ${pkgdir}/${ECLIPSEDIR}/dropins/eclipse
cp -R ${srcdir}/${_blt}/eclipse/plugins ${pkgdir}/${ECLIPSEDIR}/dropins/eclipse/.
cp -R ${srcdir}/${_blt}/eclipse/features ${pkgdir}/${ECLIPSEDIR}/dropins/eclipse/.
chmod -R +r,go-w ${pkgdir}/${ECLIPSEDIR}/dropins/eclipse/*
}
post_install()
{
echo
echo "==> It is highly recommended by us to start Eclipse once from the"
echo "==> command line with"
echo
echo "==> eclipse -clean"
echo
echo
echo "==> If you want to create your own designer plugins you will need"
echo "==> to create them with the same version that the integration was"
echo "==> built with. Qt must be configured with"
echo "==> '-qtnamespace QtCppIntegration -qtlibinfix CppIntegration'"
echo "==> as of Qt Eclipse Integration 1.4.3, to create custom"
echo "==> designer plugins."
}
post_upgrade()
{
post_install $1
}
--- com.trolltech.qtcppproject/build.xml 2008-09-26 13:47:44.000000000 +0200
+++ /tmp/build.xml 2008-10-15 01:42:14.000000000 +0200
@@ -58,6 +58,10 @@
<fileset dir="${env.ECLIPSEDIR}/plugins">
<include name="**/*.jar"/>
</fileset>
+ <!-- include dropins folder, because Arch installs CDT there -->
+ <fileset dir="${env.ECLIPSEDIR}/dropins/eclipse/plugins">
+ <include name="**/*.jar"/>
+ </fileset>
<dirset dir="..">
<include name="com.trolltech.*/**/bin"/>
</dirset>
Offline