New PKGBUILD for ricoh webcam

Hello all,
I was searching for a driver for my ricoh webcam (05ca:1870) in my hp pavilion dv1000.
I know that here http://bitbucket.org/ahixon/r5u87x/ there's a user space tool manager cameras based on Ricoh R5U87x chipsets though uvcvideo, but my webcam did not work (no /dev/video0).
But searching a bit more i found this http://www.palmix.org/r5u870-en.html, here there's an update for the old r4u870 driver to build with the 2.6.30 kernel (32 and 64 bits). I modified the PKGBUILD in http://aur.archlinux.org/packages.php?ID=15226.
The package is builded and installed ok, but after I activate the module (with modprobe r5u870) and tested with gstreamer (gst-launch-0.10 v4l2 ! ffmpegcolorspace ! autovideosink) it only capture one image and then gst-launch-0.10 shows a bunch of:
(gst-launch-0.10:31682): GStreamer-CRITICAL **: gst_util_uint64_scale_int: assertion `denom > 0' failed
I want to know if someone has this type webcam and can try this packages, and of course modify the PKGBUILD to add support both i686 and x86_64.
If someone made it work please send me how.
# Contributor: Alessandro Sagratini <[email protected]>
# Contributor: Matias De la Puente <[email protected]>
_kernver=2.6.30-ARCH
pkgname=r5u870
pkgver=0.11.3
pkgrel=1
pkgdesc="Linux device driver for Ricoh R5U870 OEM cameras."
arch=('i686')
url="http://www.palmix.org/r5u870-en.html"
license=('GPL2')
install=r5u870.install
depends=('kernel26>=${_kernver}')
source=(http://www.palmix.org/download/r5u870_k2.6.30_i386.tar.bz2)
md5sums=('8f285c1bc28a6dc32835d1973f2d7b6c')
build() {
cd $startdir/src/$pkgname
sed -i -e 's/\/sbin\/depmod -a//g' Makefile
make || return 1
#Install kernel module
install -D -m644 usbcam/usbcam.ko $startdir/pkg/lib/modules/${_kernver}/kernel/drivers/media/video/usbcam.ko
install -D -m644 r5u870.ko $startdir/pkg/lib/modules/${_kernver}/kernel/drivers/media/video/r5u870.ko
#Install firmwares
for i in *.fw; do
install -D -m 644 $i $startdir/pkg/lib/firmware/$i
done
sed -i -e "s/KERNEL_VERSION=.*/KERNEL_VERSION=${_kernver}/g" $startdir/r5u870.install

I copied r5u870.install from the aur package, then tried your PKGBUILD, only modifying arch to x86_64. Got a make error....
make[1]: Entering directory `/usr/src/linux-2.6.30-ARCH'
CC [M] /home/firecat53/src/webcam/src/r5u870/r5u870.o
CC [M] /home/firecat53/src/webcam/src/r5u870/usbcam/usbcam_dev.o
CC [M] /home/firecat53/src/webcam/src/r5u870/usbcam/usbcam_fops.o
/home/firecat53/src/webcam/src/r5u870/usbcam/usbcam_fops.c: In function 'usbcam_v4l_ioctl':
/home/firecat53/src/webcam/src/r5u870/usbcam/usbcam_fops.c:1163: warning: unused variable 'udp'
/home/firecat53/src/webcam/src/r5u870/usbcam/usbcam_fops.c: At top level:
/home/firecat53/src/webcam/src/r5u870/usbcam/usbcam_fops.c:1199: error: unknown field 'compat_ioctl' specified in initializer
/home/firecat53/src/webcam/src/r5u870/usbcam/usbcam_fops.c:1199: error: 'v4l_compat_ioctl32' undeclared here (not in a function)
make[3]: *** [/home/firecat53/src/webcam/src/r5u870/usbcam/usbcam_fops.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [/home/firecat53/src/webcam/src/r5u870/usbcam] Error 2
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [_module_/home/firecat53/src/webcam/src/r5u870] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.30-ARCH'
make: *** [all] Error 2
==> ERROR: Build Failed.
Aborting...
Any ideas?
Scott

Similar Messages

  • New PKGBUILDs for calpp and cpyrit-calpp

    Hello
    I wanted to try the calpp backend for pyrit (a WPA cracking utility), but couldn't find them in either the official repositiories or in AUR. There for I have created new PKGBUILDs for these, they work on my system (x86_64 3.1.0-4-ARCH), but as these are my first ones I wanted to post them here for review before I upload them to AUR.
    The main thing I have doubts about are the dependencies. I think I have listed them all but I'm not sure.
    Here is the PKGBUILD for calpp:
    # Maintainer: Martin R. <mr-ger [at] hotmail [dot] com>
    pkgname=calpp
    pkgver=0.90
    pkgrel=2
    pkgdesc="Library to allow writing ATI CAL kernels in C++"
    arch=('i686' 'x86_64')
    url="http://sourceforge.net/projects/calpp/"
    license=('GPL3')
    depends=('amdstream' 'boost')
    makedepends=('cmake')
    source=("http://sourceforge.net/projects/calpp/files/$pkgname-$pkgver/$pkgname-$pkgver.tar.gz")
    md5sums=('efc3f519492ac8d3178fe42115ce3637')
    _streamdir='/opt/amdstream'
    build() {
    cd "$srcdir/$pkgname-$pkgver"
    sed -i "s|\$ENV{ATISTREAMSDKROOT}/lib|${_streamdir}/lib|g" CMakeLists.txt
    sed -i "s|\$ENV{ATISTREAMSDKROOT}/include|/${_streamdir}/include/CAL|" CMakeLists.txt
    cmake -DCMAKE_INSTALL_PREFIX=/usr .
    make
    package() {
    cd "$srcdir/$pkgname-$pkgver"
    make DESTDIR="$pkgdir/" install
    And here is the PKGBUILD for cpyrit-calpp:
    # Maintainer: Martin R. <mr-ger [at] hotmail [dot] com>
    pkgname=cpyrit-calpp-svn
    pkgver=308
    pkgrel=3
    pkgdesc="CAL++ backend for accelerated attack against WPA-PSK authentication, development version"
    url="http://code.google.com/p/pyrit/"
    license=('GPL3')
    arch=('i686' 'x86_64')
    depends=('python2' 'catalyst-utils' 'pyrit-svn')
    makedepends=('calpp')
    conflicts=('cpyrit-opencl-svn')
    _svntrunk='http://pyrit.googlecode.com/svn/trunk'
    _svnmod='cpyrit_calpp'
    _caldir='/usr/include/CAL/'
    build() {
    svn co "${_svntrunk}/${_svnmod}"
    cd "${_svnmod}"
    sed -i "s|VERSION = '0.4.0-dev'|VERSION = '0.4.1-dev'|" setup.py
    sed -i "s|CALPP_INC_DIRS = \[\]|CALPP_INC_DIRS = \[\'${_caldir}\'\]|" setup.py
    LDFLAGS="" python2 setup.py build
    package() {
    cd "${srcdir}/${_svnmod}"
    python2 setup.py install --root="${pkgdir}" --optimize=1
    Thanks in advance
    EDIT = Updated the PKGBUILDs
    Last edited by ozon-eatar (2011-11-30 22:15:56)

    Thanks for the respones Stebalien! I have changed the things you pointed out and updated my first post.
    I have also run namcap on both packages and their PKGBUILDs. The only thing namcap complains about on the PKGBUILDs are the lack of contributer tag, which I think is unnecessary as I'm listed as the maintainer.
    On the cpyrit-calpp package namcap complains about unnecessary dependencies:
    cpyrit-calpp-svn I: Depends as namcap sees them: depends=(catalyst-utils python2)
    I tried this dep array with all packages listed before uninstalled (well, catalyst and libpcap I couldn't uninstall) and it didn't work. When I added 'calpp' to makedepends it worked, and it ran after I uninstalled calpp again.
    As cpyrit-calpp-svn is a backend to the pyrit-svn package and pointless to install without pyrit-svn I added it back to the array. Might add that this is how the dep array looked before:
    depends=('python2' 'openssl' 'zlib' 'libpcap' 'amdstream' 'catalyst' 'calpp' 'pyrit-svn')
    This is what namcap is telling me about calpp:
    calpp I: Depends as namcap sees them: depends=()
    BUT it will neither build nor will it compile one of the examples without both amdstream and boost (not just boost-libs). Therefore I have not changed the dep array for calpp.

  • RFC: new PKGBUILD for odfpy

    odfpy is a nice library for producing ODF documents with python. I've created a PKGBUILD for it, any comments before I submit it to the AUR?
    # Contributor: Joel Schaerer <[email protected]>
    pkgname=odfpy
    pkgver=0.7
    pkgrel=1
    pkgdesc="A complete API for OpenDocument in Python"
    arch=('i686' 'x86_64')
    url="http://opendocumentfellowship.com/projects/odfpy"
    license=('GPL')
    depends=('python')
    source=(http://opendocumentfellowship.com/files/odfpy-${pkgver}.tgz)
    md5sums=('cea1c5bf445d3eeacca23f3de5ac0f94')
    build() {
    cd "$srcdir/${pkgname}-${pkgver}"
    python setup.py build
    python setup.py install --prefix=${pkgdir}/usr

    svn version ones from the site:
    odfpy
    pkgname=odfpy
    pkgver=442
    pkgrel=2
    pkgdesc="A complete API for OpenDocument in Python"
    arch=('i686' 'x86_64')
    url="http://opendocumentfellowship.com/projects/odfpy"
    license=('GPL')
    depends=('python')
    source=()
    md5sums=()
    _svntrunk="http://opendocumentfellowship.com/repos/odfpy/trunk"
    _svnmod="odfpy"
    build() {
    cd ${startdir}/src
    msg "Connecting to svn server...."
    if [ -d ${_svnmod}/.svn ]; then
    (cd ${_svnmod} && svn up -r ${pkgver})
    else
    svn co $_svntrunk ${_svnmod}
    fi
    msg "SVN checkout done or server timeout"
    msg "Starting make..."
    cp -r ${startdir}/src/${_svnmod} ${startdir}/src/${_svnmod}-build
    cd ${startdir}/src/${_svnmod}-build
    python setup.py build
    python setup.py install --root=${startdir}/pkg
    rm -rf ${startdir}/src/${_svnmod}-build
    odftools
    pkgname=odftools
    pkgver=324
    pkgrel=2
    pkgdesc="a set of conversion tools for OpenDocument files"
    arch=('i686' 'x86_64')
    url="http://opendocumentfellowship.com/projects/odftools"
    license=('GPL')
    depends=('python')
    source=()
    md5sums=()
    _svntrunk="http://opendocumentfellowship.com/repos/odftools/trunk"
    _svnmod="odftools"
    build() {
    cd ${startdir}/src
    msg "Connecting to svn server...."
    if [ -d ${_svnmod}/.svn ]; then
    (cd ${_svnmod} && svn up -r ${pkgver})
    else
    svn co ${_svntrunk} ${_svnmod}
    fi
    msg "SVN checkout done or server timeout"
    msg "Starting make..."
    cp -r ${startdir}/src/${_svnmod} ${startdir}/src/${_svnmod}-build
    find . -type d -name '\.svn' -exec rm -rf {} \;
    cd ${startdir}/src/${_svnmod}-build
    install -d ${pkgdir}/usr/{bin,share/man/man1}
    make
    make PREFIX=${pkgdir}/usr install
    rm -rf ${startdir}/src/${_svnmod}-build
    odf2html
    pkgname=odf2html
    pkgver=349
    pkgrel=2
    pkgdesc="a set of conversion tools for OpenDocument files"
    arch=('i686' 'x86_64')
    url="http://opendocumentfellowship.com/projects/odftools"
    license=('GPL')
    depends=('libxslt')
    source=()
    md5sums=()
    _svntrunk="http://opendocumentfellowship.com/repos/html2odf/trunk"
    _svnmod="odf2html"
    build() {
    cd ${startdir}/src
    msg "Connecting to svn server...."
    if [ -d ${_svnmod}/.svn ]; then
    (cd ${_svnmod} && svn up -r ${pkgver})
    else
    svn co $_svntrunk ${_svnmod}
    fi
    msg "SVN checkout done or server timeout"
    msg "Starting make..."
    cp -r ${startdir}/src/${_svnmod} ${startdir}/src/${_svnmod}-build
    cd ${startdir}/src/${_svnmod}-build
    install -d ${pkgdir}/usr/share/odftools/xsl
    make
    install -m 644 html2odf-complete.xsl \
    ${pkgdir}/usr/share/odftools/html2odf-complete.xsl
    install -m 644 html2odf.xsl \
    ${pkgdir}/usr/share/odftools/html2odf.xsl
    cp -r xsl/*.xsl ${pkgdir}/usr/share/odftools/xsl
    chmod 0644 ${pkgdir}/usr/share/odftools/xsl/*.xsl
    rm -rf ${startdir}/src/${_svnmod}-build
    odfviewer
    pkgname=odfviewer
    pkgver=350
    pkgrel=2
    pkgdesc="Cross-platform viewer for OpenDocument files"
    arch=('i686' 'x86_64')
    url="http://opendocumentfellowship.com/projects/odfviewer"
    license=('GPL')
    depends=('xulrunner')
    source=()
    md5sums=()
    _svntrunk="http://opendocumentfellowship.com/repos/odfviewer/trunk"
    _svnmod="odfviewer"
    build() {
    cd ${startdir}/src
    [ -d ${_svnmod}-build ] && rm -rf ${_svnmod}-build
    msg "Connecting to svn server...."
    if [ -d ${_svnmod}/.svn ]; then
    (cd ${_svnmod} && svn up -r ${pkgver})
    else
    svn co $_svntrunk ${_svnmod}
    fi
    msg "SVN checkout done or server timeout"
    msg "Starting make..."
    cp -r ${startdir}/src/${_svnmod} ${startdir}/src/${_svnmod}-build
    cd ${startdir}/src/${_svnmod}-build
    find . -type d -name '\.svn' -exec rm -rf {} \;
    install -d ${pkgdir}/opt/odfviewer
    cp -r * ${pkgdir}/opt/odfviewer
    install -D -m 755 ${startdir}/odfviewer ${pkgdir}/usr/bin/odfviewer
    rm -rf ${startdir}/src/${_svnmod}-build
    script of odfviewer
    #!/bin/sh
    cd /opt/odfviewer
    xulrunner application.ini $@
    Last edited by superkevjr (2008-06-04 12:45:23)

  • [SOLVED] New PKGBUILD for dvbcut. Please review.

    Bad English, sorry!
    I am a heavy user of dvbcut. It is really nice program to cut commercials out of dvb recordings.
    http://dvbcut.sourceforge.net/
    The problem was, i could not build dvbcut 0.5.4 on arch. Probably because of new compiler versions and scons problems. So i used an old binary in my home directory.
    The good news is, they changed the build system a few days ago:
    http://www.mail-archive.com/dvbcut-user … 01006.html
    Now i can build dvbcut and i adopted the packages on AUR.
    http://aur.archlinux.org/packages.php?ID=2793
    Before i update AUR, i want to make sure, that everything is ok. Is the svn solution appropriate?
    PKGBUILD
    # Contributor: AndyRTR <[email protected]>
    pkgname=dvbcut
    pkgver=0.5.4
    pkgrel=2
    pkgdesc="Qt application for cutting parts out of DVB streams"
    arch=('i686' 'x86_64')
    url="http://dvbcut.sourceforge.net/index.html"
    license="GPL"
    depends=('qt3' 'libao')
    makedepends=('autoconf' 'make' 'subversion')
    install=dvbcut.install
    source=(dvbcut.desktop)
    md5sums=('e41118aef010f3a19140f9fc2463d4ce')
    build() {
    cd ${srcdir}
    # 0.5.4 does not build anymore. Using svn until next release.
    msg "Connecting to SVN server...."
    if [ -d dvbcut/.svn ]; then
    (cd dvbcut && svn up -r 129)
    else
    svn co -r 129 --config-dir ./ https://dvbcut.svn.sourceforge.net/svnroot/dvbcut/trunk dvbcut
    fi
    msg "SVN checkout done or server timeout"
    msg "Starting make..."
    cp -r dvbcut dvbcut-build
    cd dvbcut-build
    autoconf || return 1
    ./configure --prefix=/usr --with-qt3=/opt/qt
    make || return 1
    install -Dm755 ${srcdir}/${pkgname}-build/bin/dvbcut ${pkgdir}/usr/bin/dvbcut
    install -Dm644 ${srcdir}/${pkgname}-build/dvbcut.1 ${pkgdir}/usr/share/man/man1/dvbcut.1
    install -Dm644 ${startdir}/dvbcut.desktop ${pkgdir}/usr/share/applications/dvbcut.desktop
    rm -rf ${srcdir}/dvbcut-build
    dvbcut.install
    post_install() {
    cat << 'EOF'
    ==> If you have "mplayer" installed on your machine,
    ==> you can play videos inside of DVBCUT.
    EOF
    op=$1
    shift
    $op $*
    dvbcut.desktop
    [Desktop Entry]
    Categories=Qt;Video;AudioVideo;AudioVideoEditing;
    Encoding=UTF-8
    Name=dvbcut
    GenericName=DVBCut
    Type=Application
    Exec=/usr/bin/dvbcut
    Icon=
    Last edited by sp42b (2008-06-18 20:45:13)

    Instead of using custom svn commands in the build() function, it would be wise to use something along these lines:
    _svntrunk=https://dvbcut.svn.sourceforge.net/svnroot/dvbcut/trunk
    _svnmod=dvbcut
    _revnumber=$pkgver
    before the build() function in the PKGBUILD.
    This functionality is built into makepkg/ABS already, so there is no need to reinvent it ;-).
    Last edited by xaw (2008-06-17 21:36:24)

  • New PKGBUILD for MathMap

    My first message on these forums and my first PKGBUILD. It is a plugin for the GIMP and the installation is not a big deal really. Its functionality however is impressive, IMHO. Nevertheless, I would like to post the PKGBUILD here for a peer review. A mistake is easily made despite all checking and double checking. All C&C are welcome.
    # Contributor: Serge Gielkens <[email protected]>
    # Command line interface and Quicktime support are disabled
    pkgname=gimp-mathmap
    pkgver=1.2.1
    pkgrel=1
    pkgdesc="A GIMP plug-in which allows distortion of images specified by mathematical formulae"
    url="http://www.complang.tuwien.ac.at/schani/mathmap/"
    makedepends=('gimp>=2.2' 'gsl')
    depends=('gimp>=2.2' 'gsl')
    source=(http://www.complang.tuwien.ac.at/schani/mathmap/files/mathmap-${pkgver}.tar.gz)
    arch=('i686')
    license=('GPL')
    md5sums=('e06610008184d553ec3ab247c277d20f')
    build() {
    cd $startdir/src/mathmap-$pkgver
    make || return 1
    /bin/install -D -m 755 mathmap $startdir/pkg/usr/lib/gimp/2.0/plug-ins/mathmap
    /bin/install -D -m 644 new_template.c $startdir/pkg/usr/share/gimp/2.0/mathmap/new_template.c
    /bin/install -D -m 644 opmacros.h $startdir/pkg/usr/share/gimp/2.0/mathmap/opmacros.h
    cp -r examples $startdir/pkg/usr/share/gimp/2.0/mathmap/expressions
    Last edited by Teld (2007-08-02 11:11:13)

    Looks good!  One single suggestion:
    . You don't need to repeat the depends in the makedepends area - every depend is automatically a makedepend, so you can remove the makedepends line.

  • New PKGBUILD for File-RsyncP

    As my first foray into PKGBUILDing, I figured I'd try one for a simple perl module.  This will be needed by backuppc, which I'll be attempting next.
    see below
    I'm unsure if the makedepends are necessary, and `namcap -i` said that the perl dependency was unneeded.  I'd appreciate any feedback.
    Last edited by sinecure (2007-10-10 12:09:53)

    Here's my final version of the PKGBUILD, now I'll read up on how to submit it.
    # Contributor: "David J. Weller-Fahy" <[email protected]>
    # Maintainer: "David J. Weller-Fahy" <[email protected]>
    pkgname=perl-file-rsyncp
    pkgver=0.68
    pkgrel=2
    pkgdesc="Perl/CPAN Module File::RsyncP : a simple rsync client"
    arch=('i686' 'x86_64')
    url="http://search.cpan.org/~cbarratt/File-RsyncP"
    source=("http://search.cpan.org/CPAN/authors/id/C/CB/CBARRATT/File-RsyncP-$pkgver.tar.gz")
    license=('GPL2')
    provides=('file-rsyncp')
    depends=('perl>=5.8.8-6' 'glibc')
    makedepends=('make' 'gcc' 'findutils')
    options=('docs' '!emptydirs')
    build() {
    cd $startdir/src/File-RsyncP-$pkgver || return 1
    eval `perl -V:archname` || return 1
    perl Makefile.PL \
    INSTALLARCHLIB=/usr/lib/perl5/current/${archname} \
    INSTALLSITELIB=/usr/lib/perl5/site_perl/current \
    INSTALLSITEARCH=/usr/lib/perl5/site_perl/current/${archname} \
    || return 1
    make || return 1
    make DESTDIR=$startdir/pkg install || return 1
    find $startdir/pkg -name '.packlist' -exec rm '{}' \; || return 1
    find $startdir/pkg -name '*.pod' -exec rm '{}' \; || return 1
    md5sums=('ed47c5ef7ff835415692f18137cb0cf9')
    Last edited by sinecure (2007-10-11 08:49:25)

  • PKGBUILD for transmission-remote-gtk new since move to git - help?

    Transmission-remote-gtk just moved to git from svn and I made a new PKGBUILD for it;
    # Maintainer: Aleksey Frolov <[email protected]> [ru]
    # Contributor: PitBall
    _pname=transmission-remote-gtk
    pkgname=${_pname}-git
    pkgver=20120203
    pkgrel=1
    pkgdesc="GTK client for remote management of the Transmission BitTorrent client, using its HTTP RPC protocol"
    arch=(i686 x86_64)
    license=('GPL2')
    depends=('git' 'hicolor-icon-theme' 'geoip' 'libproxy' 'libunique' 'json-glib' 'libnotify' 'gconf' 'desktop-file-utils' 'curl')
    makedepends=('intltool')
    conflicts=('transmission-remote-gtk')
    install=${pkgname}.install
    options=('!libtool')
    url="http://code.google.com/p/transmission-remote-gtk"
    _gittrunk="https://code.google.com/p/transmission-remote-gtk/"
    _gitmod=${pkgname}
    build() {
    cd ${srcdir}
    # GIT checkout
    if [[ -d ${_gitmod} ]]; then
    (cd ${_gitmod} && git pull )
    else
    git clone ${_gittrunk} ${_gitmod}
    fi
    rm -rf ${srcdir}/${_gitmod}-build
    cp -r ${srcdir}/${_gitmod} ${srcdir}/${_gitmod}-build
    cd ${srcdir}/${_gitmod}-build
    # Configure
    ./autogen.sh
    ./configure \
    --prefix=/usr
    # --prefix=/usr \
    # --disable-schemas-install \
    # --with-gconf-schema-file-dir=/usr/share/gconf/schemas
    # Compile
    make
    # Install
    make DESTDIR=${pkgdir} install
    # License & Authors
    install -dm755 ${pkgdir}/usr/share/licenses/${_pname}
    ln -sf /usr/share/licenses/common/GPL2/license.txt ${pkgdir}/usr/share/licenses/${_pname}/LICENSE
    install -Dm644 AUTHORS ${pkgdir}/usr/share/doc/${_pname}/AUTHORS
    When doing a pacman -U 'pkgname' I get about 20 file "exists in filesystem". With my limited knolwedge I don't know how to fix this. pacman -Uf does it but is an ugly solution. What can I do with the PKGBUILD or maybe recommend users to uninstall the svn version first?
    Furthermore; there was a bit of code looking for the .svn directory
    # SVN checkout
    if [[ -d ${_svnmod}/.svn ]]; then
    (cd ${_svnmod} && svn up -r $pkgver)
    else
    svn co ${_svntrunk} --config-dir ./ -r ${pkgver} ${_svnmod}
    fi
    which I changed to this;
    # GIT checkout
    if [[ -d ${_gitmod} ]]; then
    (cd ${_gitmod} && git pull )
    else
    git clone ${_gittrunk} ${_gitmod}
    fi
    The prupose is to look for previous source and not download it all again, just get the changes. svn up -r is quite straight forward but git pull, I find is not. I'd really appreciate some pointers on this.
    By the way, it compiles just fine and with pacman -Uf it works, I'd just like to make a proper PKGBUILD.
    Last edited by swanson (2012-02-03 22:35:17)

    Yes, that's the seems to be the easiest and cleanest way to go. Here's the new transmission-remote-gtk git version in AUR;
    https://aur.archlinux.org/packages.php?ID=56377

  • [solved] new abs PKGBUILD for package kernel26...old kernel?

    I was looking into the new PKGBUILD in the /var/abs/core/kernel26 folder, as I wanted to update my custom kernel. I was editing the new PKGBUILD when I saw something weird...references to kernel.org files and archlinux.org patch seems to be same as the 2.6.37 version. Is _basekernel value not updated? Am I wrong?
    Take a look:
    new PKGBUILD (I copied only relevant lines):
    _basekernel=2.6.37
    pkgver=${_basekernel}
    pkgrel=6
    _patchname="patch-${pkgver}-4-ARCH"
    source=(ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-$_basekernel.tar.bz2
    ftp://ftp.archlinux.org/other/kernel26/${_patchname}.bz2
    now...these is exactly the same as PKGBUILD for 2.6.37. But the new files are:
    ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.37.1.tar.bz2
    ftp://ftp.archlinux.org/other/kernel26/patch-2.6.37.1-1-ARCH.bz2
    If I am right, someone has to update variable values...
    TIA
    Gemon
    Last edited by gemon (2011-02-21 22:17:23)

    well...I had time to check so...this is the content for the PKGBUILD after I run abs yesterday (pasted only relevant lines):
    # $Id: PKGBUILD 109724 2011-02-12 08:01:06Z tpowa $
    pkgbase="kernel26"
    pkgname=('kernel26' 'kernel26-headers' 'kernel26-docs') # Build stock -ARCH kernel
    _kernelname=${pkgname#kernel26}
    _basekernel=2.6.37
    pkgver=${_basekernel}
    pkgrel=6
    _patchname="patch-${pkgver}-4-ARCH"
    this is the one I run tonight...looks updated now
    # $Id: PKGBUILD 110322 2011-02-18 20:13:49Z tpowa $
    pkgbase="kernel26"
    pkgname=('kernel26' 'kernel26-headers' 'kernel26-docs') # Build stock -ARCH kernel
    _kernelname=${pkgname#kernel26}
    _basekernel=2.6.37
    pkgver=${_basekernel}.1
    pkgrel=1
    _patchname="patch-${pkgver}-${pkgrel}-ARCH"
    now patch filename and kernel sources correctly resolve to the latest ones.
    but believe me, right after I had the 2.6.37.1-arch kernel, the abs PKGBUILD was outdated...probably it is updated after kernel package is released. doesn't matter
    all in all...now it's ok
    Gemon

  • Anyone use funambol? Want to write a PKGBUILD for it

    Hi all,
    Anyone here uses funambol? Its open-source but distributed in binary. I was thinking it'd be good to have an Arch (AUR) package for it. Of course, having the PKGBUILD simply unpack the binary distribution isn't optimal, was thinking of an /etc/rc.d script + /usr/bin links at least, as well as a 'fix' for the 32-bit included JVM issue.
    Anyway, I just found this software yesterday, and don't even have it working (as in syncing properly) yet. Would someone who uses it respond here, so I know what would be needed to make a good package for this?

    bharani wrote:
    ngoonee wrote:
    I've got a basic funambol setup working (syncing contacts, calendar, and todo between my palm and Evolution).
    The PKGBUILD basically dumps stuff in /opt/Funambol currently. Next is to write up the /etc/rc.d/funambol (shouldn't be too hard) and figure out what sort of .desktop files are needed (probably just the admin utility).
    Does anyone know if funambol has support for multiple calendars per user? Or do I have to create a new user for each calendar (and sync separately...)?
    Its great that you have it working. i gave up after reading the manual. I think there is a need to change a configuration file for java home in arch 64 bit (the binary file is being bundled with 32 bit jre).
    Not a change in configuration file, just rm the folder and ln -s your current java there.
    Here's an initial PKGBUILD. No makedepends that I'm aware of (its just cp, rm, ln, chmod). This gives you a working funambol, configuring and stuff is up to the user.
    The todo list from the previous post is still undone though .
    # Maintainer: Ng Oon-Ee < n g o o n e e AT g m a i l . c o m >
    pkgname=funambol
    pkgver=8.0.2
    pkgrel=1
    arch=(i686 x86_64)
    url="http://www.funambol.com"
    license=('AGPL3')
    #makedepends=('db>=4.7' 'popt' 'libcups' 'acl' 'libldap' 'libcap>=2.16' 'heimdal>=1.3.1' 'pam' 'fam' 'gnutls>=2.4.1')
    #options=(!makeflags)
    depends=('java-runtime' 'python')
    source=(http://download.forge.objectweb.org/sync4j/${pkgname}-${pkgver}.tgz)
    md5sums=('54a5f1e50dd51b4282046f824b986a72')
    build() {
    cd ${srcdir}/Funambol/
    install -dv -m755 ${pkgdir}/opt/
    # Copy Funambol files to /opt/Funambol
    cp -a ${srcdir}/Funambol/ ${pkgdir}/opt/
    # Removing built-in JRE, use system JRE
    rm -Rf ${pkgdir}/opt/Funambol/tools/jre-1.5.0/
    # Use system java libs
    ln -s /usr/lib/jvm/* ${pkgdir}/opt/Funambol/tools/jre-1.5.0
    # hack to prevent a whole lot of prompts for removing write-protected file
    chmod -R 644 ${srcdir}/Funambol/tools/jre-1.5.0/jre/

  • PKGBUILD for custom kernel issue

    Hi all,
    Last night I was putting together a PKGBUILD for a kernel I'd like to compile that has the ck patchset, grsecurity (latest testing), and had broadcom-wl on it already so I don't have to keep reinstalling it from AUR and doing depmod each time as it keeps making me have to find an ethernet cable. I used the kerne26 Arch PKGBUILD as a base and included parts of kernel-netbook for broadcom-wl, kernel26-grsecurity, and kernel26-ck and altered name variables and links etc so it all works and all sources are downloaded. I also got the two .patch files (semaphore and something else) from the kernel-netbook tarball to build the thing with, I don't know if it would work without them.
    However when I get into the build() a few patches are applied before I get messages about patches already applied or reversed, and then it says build failed because of an error, I can't tell which package is causing thins or why (it all goes by too fast, and the error says failed without reason, and the reversed patch messages are what is immediately previous to it). I have not yet gone all the way through the pkgbuild - especially towards the end, and I felt that the standard setup of init file system creation and such were ok, and if anything does need altering about it, I can deal with it once I get these first troubles solved.
    Below is my pkgbuild so far. Hopefully there are people out there who can aid me with this.
    Thanks,
    Ben.
    # Maintainer: Ben Ward <[email protected]>
    pkgbase="kernel26"
    # pkgname=('kernel26' 'kernel26-headers' 'kernel26-docs') # Build stock -ARCH kernel
    pkgname=kernel26-custom # Build kernel with a different name
    #Base kernel info
    _kernelname=${pkgname#kernel26}
    _basekernel=2.6.38
    pkgver=${_basekernel}.3
    pkgrel=1
    #ARCH patch info
    _archpatchver=1
    _archpatchname="patch-${pkgver}-${_archpatchver}-ARCH"
    #_archpatchname="patch-${pkgver}-1-ARCH"
    #grsecurity info
    _grsec=2.2.2
    _timestamp=201104182227
    #Broadcom-wl info
    _broadcom_ver=5.100.82.38
    _broadcom="hybrid-portsrc_x86_32-v${_broadcom_ver//./_}"
    #ck-patch info
    _ckpatchversion=3
    _ckpatchname="patch-${_basekernel}-ck${_ckpatchversion}"
    arch=(i686 x86_64)
    license=('GPL2')
    url="http://www.kernel.org"
    options=(!strip)
    source=(ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-$_basekernel.tar.bz2
    ftp://ftp.kernel.org/pub/linux/kernel/v2.6/patch-${pkgver}.bz2
    ftp://ftp.archlinux.org/other/kernel26/${_archpatchname}.bz2
    http://grsecurity.net/test/grsecurity-${_grsec}-${pkgver}-${_timestamp}.patch
    http://www.broadcom.com/docs/linux_sta/${_broadcom}.tar.gz
    http://www.kernel.org/pub/linux/kernel/people/ck/patches/2.6/${_basekernel}/${_basekernel}-ck${_ckpatchversion}/${_ckpatchname}.bz2
    "semaphore.patch"
    "mutex-sema.patch"
    # the main kernel config files
    config config.x86_64
    # standard config files for mkinitcpio ramdisk
    kernel26.preset)
    md5sums=('7d471477bfa67546f902da62227fa976'
    'b3677121c4b5efcb8128c2000788d0aa'
    '5b14b6eb2cdcb074905d4974437c4df6'
    'a19024797f192fe21a468de80c101d8a'
    'c0074a1622c75916442e26763ddf47d0'
    '88d5b3e0622f8c48dad19ab9ac3c16f0'
    'aee89fe7f034aea2f2ca95322774c1b5'
    '21ce3f7967d7305064bf7eb60030ffea'
    'f66543886835ab8599b29cd0c48aa66d'
    'd866bcc06672fee17736bd5022f700fe'
    '25584700a0a679542929c4bed31433b6')
    build() {
    cd ${srcdir}/linux-$_basekernel
    # Apply kernel.org patch to basekernel
    msg "Checking basekernel is ip to date..."
    if [[ "${_basekernel}" != "${pkgver}" ]]; then
    msg "Patching source with upstream patch..."
    patch -Np1 -i "${srcdir}/patch-${pkgver}" || return 1
    fi
    # Add -ARCH patches
    # See http://projects.archlinux.org/linux-2.6-ARCH.git/
    msg "Patching Kernel with ARCH patches..."
    patch -Np1 -i ${srcdir}/${_archpatchname}
    # Add ck patch
    msg "Patching Kernel with ck patches..."
    patch -Np1 -i ${srcdir}/${_ckpatchname}
    # Add grsecurity patch
    msg "Patching kernel with grsecurity testing branch..."
    if [ "$CARCH" = "x86_64" ]; then
    cat ../config.x86_64 >./.config
    else
    cat ../config >./.config
    fi
    if [ "${_kernelname}" != "" ]; then
    sed -i "s|CONFIG_LOCALVERSION=.*|CONFIG_LOCALVERSION=\"${_kernelname}\"|g" ./.config
    fi
    # get kernel version
    make prepare
    # load configuration
    # Configure the kernel. Replace the line below with one of your choice.
    #make menuconfig # CLI menu for configuration
    make nconfig # new CLI menu for configuration
    #make xconfig # X-based configuration
    #make oldconfig # using old config from previous kernel version
    # ... or manually edit .config
    # stop here
    # this is useful to configure the kernel
    #msg "Stopping build"
    #return 1
    yes "" | make config
    # build!
    make ${MAKEFLAGS} bzImage modules
    package_kernel26() {
    pkgdesc="The Linux Kernel and modules"
    groups=('base')
    backup=(etc/mkinitcpio.d/${pkgname}.preset)
    depends=('coreutils' 'linux-firmware' 'module-init-tools>=3.12-2' 'mkinitcpio>=0.6.8-2')
    # pwc, ieee80211 and hostap-driver26 modules are included in kernel26 now
    # nforce package support was abandoned by nvidia, kernel modules should cover everything now.
    # kernel24 support is dropped since glibc24
    replaces=('kernel24' 'kernel24-scsi' 'kernel26-scsi'
    'alsa-driver' 'ieee80211' 'hostap-driver26'
    'pwc' 'nforce' 'squashfs' 'unionfs' 'ivtv'
    'zd1211' 'kvm-modules' 'iwlwifi' 'rt2x00-cvs'
    'gspcav1' 'atl2' 'wlan-ng26' 'rt2500' 'nouveau-drm')
    install=kernel26.install
    optdepends=('crda: to set the correct wireless channels of your country')
    KARCH=x86
    cd ${srcdir}/linux-$_basekernel
    # get kernel version
    _kernver="$(make kernelrelease)"
    mkdir -p ${pkgdir}/{lib/modules,lib/firmware,boot}
    make INSTALL_MOD_PATH=${pkgdir} modules_install
    cp System.map ${pkgdir}/boot/System.map26${_kernelname}
    cp arch/$KARCH/boot/bzImage ${pkgdir}/boot/vmlinuz26${_kernelname}
    # # add vmlinux
    install -m644 -D vmlinux ${pkgdir}/usr/src/linux-${_kernver}/vmlinux
    # install fallback mkinitcpio.conf file and preset file for kernel
    install -m644 -D ${srcdir}/kernel26.preset ${pkgdir}/etc/mkinitcpio.d/${pkgname}.preset
    # set correct depmod command for install
    sed \
    -e "s/KERNEL_NAME=.*/KERNEL_NAME=${_kernelname}/g" \
    -e "s/KERNEL_VERSION=.*/KERNEL_VERSION=${_kernver}/g" \
    -i $startdir/kernel26.install
    sed \
    -e "s|source .*|source /etc/mkinitcpio.d/kernel26${_kernelname}.kver|g" \
    -e "s|default_image=.*|default_image=\"/boot/${pkgname}.img\"|g" \
    -e "s|fallback_image=.*|fallback_image=\"/boot/${pkgname}-fallback.img\"|g" \
    -i ${pkgdir}/etc/mkinitcpio.d/${pkgname}.preset
    echo -e "# DO NOT EDIT THIS FILE\nALL_kver='${_kernver}'" > ${pkgdir}/etc/mkinitcpio.d/${pkgname}.kver
    # remove build and source links
    rm -f ${pkgdir}/lib/modules/${_kernver}/{source,build}
    # remove the firmware
    rm -rf ${pkgdir}/lib/firmware
    # gzip -9 all modules to safe 100MB of space
    find "$pkgdir" -name '*.ko' -exec gzip -9 {} \;
    ##Section: Broadcom-wl
    msg "Compiling broadcom-wl module:"
    cd ${srcdir}/
    #patching broadcom as broadcom-wl package on AUR
    patch -p1 < license.patch
    patch -p1 < semaphore.patch
    patch -p1 < mutex-sema.patch
    make -C ${srcdir}/linux-$_basekernel M=`pwd`
    install -D -m 755 wl.ko ${pkgdir}/lib/modules/$_kernver/kernel/drivers/net/wireless/wl.ko
    package_kernel26-headers() {
    pkgdesc="Header files and scripts for building modules for kernel26"
    mkdir -p ${pkgdir}/lib/modules/${_kernver}
    cd ${pkgdir}/lib/modules/${_kernver}
    ln -sf ../../../usr/src/linux-${_kernver} build
    cd ${srcdir}/linux-$_basekernel
    install -D -m644 Makefile \
    ${pkgdir}/usr/src/linux-${_kernver}/Makefile
    install -D -m644 kernel/Makefile \
    ${pkgdir}/usr/src/linux-${_kernver}/kernel/Makefile
    install -D -m644 .config \
    ${pkgdir}/usr/src/linux-${_kernver}/.config
    mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/include
    for i in acpi asm-generic config generated linux math-emu media net pcmcia scsi sound trace video xen; do
    cp -a include/$i ${pkgdir}/usr/src/linux-${_kernver}/include/
    done
    # copy arch includes for external modules
    mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/arch/x86
    cp -a arch/x86/include ${pkgdir}/usr/src/linux-${_kernver}/arch/x86/
    # copy files necessary for later builds, like nvidia and vmware
    cp Module.symvers ${pkgdir}/usr/src/linux-${_kernver}
    cp -a scripts ${pkgdir}/usr/src/linux-${_kernver}
    # fix permissions on scripts dir
    chmod og-w -R ${pkgdir}/usr/src/linux-${_kernver}/scripts
    mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/.tmp_versions
    mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/arch/$KARCH/kernel
    cp arch/$KARCH/Makefile ${pkgdir}/usr/src/linux-${_kernver}/arch/$KARCH/
    if [ "$CARCH" = "i686" ]; then
    cp arch/$KARCH/Makefile_32.cpu ${pkgdir}/usr/src/linux-${_kernver}/arch/$KARCH/
    fi
    cp arch/$KARCH/kernel/asm-offsets.s ${pkgdir}/usr/src/linux-${_kernver}/arch/$KARCH/kernel/
    # add headers for lirc package
    mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/video
    cp drivers/media/video/*.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/video/
    for i in bt8xx cpia2 cx25840 cx88 em28xx et61x251 pwc saa7134 sn9c102; do
    mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/video/$i
    cp -a drivers/media/video/$i/*.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/video/$i
    done
    mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/drivers/staging/usbvideo/
    cp -a drivers/staging/usbvideo/*.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/staging/usbvideo/
    # add docbook makefile
    install -D -m644 Documentation/DocBook/Makefile \
    ${pkgdir}/usr/src/linux-${_kernver}/Documentation/DocBook/Makefile
    # add dm headers
    mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/drivers/md
    cp drivers/md/*.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/md
    # add inotify.h
    mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/include/linux
    cp include/linux/inotify.h ${pkgdir}/usr/src/linux-${_kernver}/include/linux/
    # add wireless headers
    mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/net/mac80211/
    cp net/mac80211/*.h ${pkgdir}/usr/src/linux-${_kernver}/net/mac80211/
    # add dvb headers for external modules
    # in reference to:
    # http://bugs.archlinux.org/task/9912
    mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/dvb-core
    cp drivers/media/dvb/dvb-core/*.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/dvb-core/
    # add dvb headers for external modules
    # in reference to:
    # http://bugs.archlinux.org/task/11194
    mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/include/config/dvb/
    cp include/config/dvb/*.h ${pkgdir}/usr/src/linux-${_kernver}/include/config/dvb/
    # add dvb headers for http://mcentral.de/hg/~mrec/em28xx-new
    # in reference to:
    # http://bugs.archlinux.org/task/13146
    mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/frontends/
    cp drivers/media/dvb/frontends/lgdt330x.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/frontends/
    cp drivers/media/video/msp3400-driver.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/frontends/
    # add dvb headers
    # in reference to:
    # http://bugs.archlinux.org/task/20402
    mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/dvb-usb
    cp drivers/media/dvb/dvb-usb/*.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/dvb-usb/
    mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/frontends
    cp drivers/media/dvb/frontends/*.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/frontends/
    mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/common/tuners
    cp drivers/media/common/tuners/*.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/common/tuners/
    # add xfs and shmem for aufs building
    mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/fs/xfs
    mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/mm
    cp fs/xfs/xfs_sb.h ${pkgdir}/usr/src/linux-${_kernver}/fs/xfs/xfs_sb.h
    # add headers vor virtualbox
    # in reference to:
    # http://bugs.archlinux.org/task/14568
    cp -a include/drm $pkgdir/usr/src/linux-${_kernver}/include/
    # add headers for broadcom wl
    # in reference to:
    # http://bugs.archlinux.org/task/14568
    cp -a include/trace $pkgdir/usr/src/linux-${_kernver}/include/
    # add headers for crypto modules
    # in reference to:
    # http://bugs.archlinux.org/task/22081
    cp -a include/crypto $pkgdir/usr/src/linux-${_kernver}/include/
    # copy in Kconfig files
    for i in `find . -name "Kconfig*"`; do
    mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/`echo $i | sed 's|/Kconfig.*||'`
    cp $i ${pkgdir}/usr/src/linux-${_kernver}/$i
    done
    chown -R root.root ${pkgdir}/usr/src/linux-${_kernver}
    find ${pkgdir}/usr/src/linux-${_kernver} -type d -exec chmod 755 {} \;
    # strip scripts directory
    find ${pkgdir}/usr/src/linux-${_kernver}/scripts -type f -perm -u+w 2>/dev/null | while read binary ; do
    case "$(file -bi "$binary")" in
    *application/x-sharedlib*) # Libraries (.so)
    /usr/bin/strip $STRIP_SHARED "$binary";;
    *application/x-archive*) # Libraries (.a)
    /usr/bin/strip $STRIP_STATIC "$binary";;
    *application/x-executable*) # Binaries
    /usr/bin/strip $STRIP_BINARIES "$binary";;
    esac
    done
    # remove unneeded architectures
    rm -rf ${pkgdir}/usr/src/linux-${_kernver}/arch/{alpha,arm,arm26,avr32,blackfin,cris,frv,h8300,ia64,m32r,m68k,m68knommu,mips,microblaze,mn10300,parisc,powerpc,ppc,s390,sh,sh64,sparc,sparc64,um,v850,xtensa}
    package_kernel26-docs() {
    pkgdesc="Kernel hackers manual - HTML documentation that comes with the Linux kernel."
    cd ${srcdir}/linux-$_basekernel
    mkdir -p $pkgdir/usr/src/linux-$_kernver
    mv Documentation $pkgdir/usr/src/linux-$_kernver
    find $pkgdir -type f -exec chmod 444 {} \;
    find $pkgdir -type d -exec chmod 755 {} \;
    # remove a file already in kernel26 package
    rm -f $pkgdir/usr/src/linux-$_kernver/Documentation/DocBook/Makefile
    I wonder if localyesconfig would take care of broadcom-wl for me...
    Last edited by Ben9250 (2011-04-20 00:12:44)

    Thank you. I guess trying the abs method wouldn't hurt. My main issue was configuration. I've only just skimmed the PKGBUILD so I'm not aware of how it handles it. I suppose I could write my own as described in the wiki as well. Thanks again.
    Edit: Further research has revealed to me that the kernel headers are merely there for when the full source tree isn't. Seeing as the full tree is present in my case, the headers are unnecessary. I may take graysky's advice though and use pacman to manage my kernel.
    Last edited by smithr.michael1997 (2011-03-31 02:17:29)

  • Can anyone make a PKGBUILD for Novel iFolder and Novel consoleone ?

    Like in subject. I tried install it from Novel homepage, but i have problem with make dependiences and this two package, can anyone make good PKGBUILD for new version ? In AUR i found PKGBUILD's but the mirror doesn't work and i can't find another mirror. Thanks Igor. Have a nice day !

    Yes, but i saw many rpm package, and source code. If you talk about license there is oportunity to get free license for 30 or 60 day's. Thanx for respone.

  • Help with PKGBUILD for nvidia driver cards

    Hello, I'm trying to make a PKGBUILD for the new geforce beta driver for the kernel26-mm kernel, geforce-utils went just fine, but the the geforce package was more tricky, here's the PKGBUILD:
    pkgname=geforce-mm
    pkgver=173.08
    _kernver='2.6.25-mm'
    pkgrel=1
    pkgdesc="NVIDIA drivers for kernel26mm."
    arch=(i686 x86_64)
    [ "$CARCH" = "i686" ] && ARCH=x86
    [ "$CARCH" = "x86_64" ] && ARCH=x86_64
    url="http://www.nvidia.com/"
    depends=('kernel26mm' 'geforce-utils')
    install=geforce.install
    source=(http://us.download.nvidia.com/XFree86/Linux-$ARCH/${pkgver}/NVIDIA-Linux-$ARCH-${pkgver}-pkg1.run)
    md5sums=()
    [ "$CARCH" = "x86_64" ] && md5sums=()
    build()
    # Extract
    cd $startdir/src/
    sh NVIDIA-Linux-$ARCH-${pkgver}-pkg1.run --extract-only
    cd NVIDIA-Linux-$ARCH-${pkgver}-pkg1
    cd usr/src/nv/
    ln -s Makefile.kbuild Makefile
    make SYSSRC=/lib/modules/${_kernver}/build module || return 1
    # install kernel module
    mkdir -p $startdir/pkg/lib/modules/${_kernver}/kernel/drivers/video/
    install -m644 nvidia.ko $startdir/pkg/lib/modules/${_kernver}/kernel/drivers/video/
    sed -i -e "s/KERNEL_VERSION='.*'/KERNEL_VERSION='${_kernver}'/" $startdir/*.install
    Output when running it:
    [roberth@Magda geforce-mm]$ makepkg
    ==> Making package: geforce-mm 173.08-1 (Mon Apr 14 22:44:41 CEST 2008)
    ==> Checking Runtime Dependencies...
    ==> Checking Buildtime Dependencies...
    ==> Retrieving Sources...
    -> Downloading NVIDIA-Linux-x86-173.08-pkg1.run...
    --2008-04-14 22:44:41-- http://us.download.nvidia.com/XFree86/Linux-x86/173.08/NVIDIA-Linux-x86-173.08-pkg1.run
    Resolving us.download.nvidia.com... 193.213.121.82, 193.213.121.74
    Connecting to us.download.nvidia.com|193.213.121.82|:80... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 18958181 (18M) [application/octet-stream]
    Saving to: `NVIDIA-Linux-x86-173.08-pkg1.run'
    100%[===========================================================================================================================================================================================>] 18,958,181 710K/s in 26s
    2008-04-14 22:45:07 (720 KB/s) - `NVIDIA-Linux-x86-173.08-pkg1.run' saved [18958181/18958181]
    ==> WARNING: Integrity checks (md5) are missing or incomplete.
    ==> Extracting Sources...
    ==> Entering fakeroot environment...
    ==> Starting build()...
    Creating directory NVIDIA-Linux-x86-173.08-pkg1
    Verifying archive integrity... OK
    Uncompressing NVIDIA Accelerated Graphics Driver for Linux-x86 173.08...............................................................................................................................................................................................................................................................................................
    NVIDIA: calling KBUILD...
    make CC=cc KBUILD_VERBOSE=1 -C /lib/modules/2.6.25-mm/build SUBDIRS=/home/roberth/pkg/geforce-mm/src/NVIDIA-Linux-x86-173.08-pkg1/usr/src/nv modules
    test -e include/linux/autoconf.h -a -e include/config/auto.conf || ( \
    echo; \
    echo " ERROR: Kernel configuration is invalid."; \
    echo " include/linux/autoconf.h or include/config/auto.conf are missing."; \
    echo " Run 'make oldconfig && make prepare' on kernel src to fix it."; \
    echo; \
    /bin/false)
    mkdir -p /home/roberth/pkg/geforce-mm/src/NVIDIA-Linux-x86-173.08-pkg1/usr/src/nv/.tmp_versions ; rm -f /home/roberth/pkg/geforce-mm/src/NVIDIA-Linux-x86-173.08-pkg1/usr/src/nv/.tmp_versions/*
    make -f scripts/Makefile.build obj=/home/roberth/pkg/geforce-mm/src/NVIDIA-Linux-x86-173.08-pkg1/usr/src/nv
    cc -Wp,-MD,/home/roberth/pkg/geforce-mm/src/NVIDIA-Linux-x86-173.08-pkg1/usr/src/nv/.nv.o.d -nostdinc -isystem /usr/lib/gcc/i686-pc-linux-gnu/4.3.0/include -D__KERNEL__ -Iinclude -include include/linux/autoconf.h -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -O2 -fno-stack-protector -m32 -msoft-float -mregparm=3 -freg-struct-return -mpreferred-stack-boundary=2 -march=i686 -mtune=generic -ffreestanding -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -Iinclude/asm-x86/mach-default -fno-omit-frame-pointer -fno-optimize-sibling-calls -Wdeclaration-after-statement -Wno-pointer-sign -I/home/roberth/pkg/geforce-mm/src/NVIDIA-Linux-x86-173.08-pkg1/usr/src/nv -Wall -Wimplicit -Wreturn-type -Wswitch -Wformat -Wchar-subscripts -Wparentheses -Wpointer-arith -Wno-multichar -Werror -MD -Wsign-compare -Wno-cast-qual -Wno-error -D__KERNEL__ -DMODULE -DNVRM -DNV_VERSION_STRING=\"173.08\" -UDEBUG -U_DEBUG -DNDEBUG -DMODULE -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(nv)" -D"KBUILD_MODNAME=KBUILD_STR(nvidia)" -c -o /home/roberth/pkg/geforce-mm/src/NVIDIA-Linux-x86-173.08-pkg1/usr/src/nv/nv.o /home/roberth/pkg/geforce-mm/src/NVIDIA-Linux-x86-173.08-pkg1/usr/src/nv/nv.c
    In file included from include/linux/list.h:8,
    from include/linux/preempt.h:11,
    from include/linux/spinlock.h:49,
    from include/linux/seqlock.h:29,
    from include/linux/time.h:8,
    from include/linux/timex.h:57,
    from include/linux/sched.h:54,
    from include/linux/utsname.h:35,
    from /home/roberth/pkg/geforce-mm/src/NVIDIA-Linux-x86-173.08-pkg1/usr/src/nv/nv-linux.h:19,
    from /home/roberth/pkg/geforce-mm/src/NVIDIA-Linux-x86-173.08-pkg1/usr/src/nv/nv.c:14:
    include/linux/prefetch.h: In function 'prefetch_range':
    include/linux/prefetch.h:57: warning: pointer of type 'void *' used in arithmetic
    In file included from include/linux/gfp.h:4,
    from include/linux/slab.h:14,
    from include/linux/percpu.h:5,
    from include/linux/rcupdate.h:41,
    from include/linux/pid.h:4,
    from include/linux/sched.h:74,
    from include/linux/utsname.h:35,
    from /home/roberth/pkg/geforce-mm/src/NVIDIA-Linux-x86-173.08-pkg1/usr/src/nv/nv-linux.h:19,
    from /home/roberth/pkg/geforce-mm/src/NVIDIA-Linux-x86-173.08-pkg1/usr/src/nv/nv.c:14:
    include/linux/mmzone.h: In function 'first_zones_zonelist':
    include/linux/mmzone.h:778: warning: comparison between signed and unsigned
    include/linux/mmzone.h:781: warning: comparison between signed and unsigned
    include/linux/mmzone.h: In function 'next_zones_zonelist':
    include/linux/mmzone.h:798: warning: comparison between signed and unsigned
    include/linux/mmzone.h:801: warning: comparison between signed and unsigned
    In file included from include/asm/dma-mapping_32.h:5,
    from include/asm/dma-mapping.h:2,
    from include/linux/dma-mapping.h:52,
    from include/asm-generic/pci-dma-compat.h:7,
    from include/asm/pci.h:90,
    from include/linux/pci.h:937,
    from /home/roberth/pkg/geforce-mm/src/NVIDIA-Linux-x86-173.08-pkg1/usr/src/nv/nv-linux.h:86,
    from /home/roberth/pkg/geforce-mm/src/NVIDIA-Linux-x86-173.08-pkg1/usr/src/nv/nv.c:14:
    include/linux/scatterlist.h: In function 'sg_virt':
    include/linux/scatterlist.h:199: warning: pointer of type 'void *' used in arithmetic
    In file included from /home/roberth/pkg/geforce-mm/src/NVIDIA-Linux-x86-173.08-pkg1/usr/src/nv/nv-linux.h:109,
    from /home/roberth/pkg/geforce-mm/src/NVIDIA-Linux-x86-173.08-pkg1/usr/src/nv/nv.c:14:
    include/linux/highmem.h: In function 'zero_user_segments':
    include/linux/highmem.h:134: warning: pointer of type 'void *' used in arithmetic
    include/linux/highmem.h:134: warning: pointer of type 'void *' used in arithmetic
    include/linux/highmem.h:134: warning: pointer of type 'void *' used in arithmetic
    include/linux/highmem.h:134: warning: pointer of type 'void *' used in arithmetic
    include/linux/highmem.h:137: warning: pointer of type 'void *' used in arithmetic
    include/linux/highmem.h:137: warning: pointer of type 'void *' used in arithmetic
    include/linux/highmem.h:137: warning: pointer of type 'void *' used in arithmetic
    include/linux/highmem.h:137: warning: pointer of type 'void *' used in arithmetic
    /home/roberth/pkg/geforce-mm/src/NVIDIA-Linux-x86-173.08-pkg1/usr/src/nv/nv.c: In function 'nv_kern_vma_nopage':
    /home/roberth/pkg/geforce-mm/src/NVIDIA-Linux-x86-173.08-pkg1/usr/src/nv/nv.c:1846: error: 'NOPAGE_SIGBUS' undeclared (first use in this function)
    /home/roberth/pkg/geforce-mm/src/NVIDIA-Linux-x86-173.08-pkg1/usr/src/nv/nv.c:1846: error: (Each undeclared identifier is reported only once
    /home/roberth/pkg/geforce-mm/src/NVIDIA-Linux-x86-173.08-pkg1/usr/src/nv/nv.c:1846: error: for each function it appears in.)
    /home/roberth/pkg/geforce-mm/src/NVIDIA-Linux-x86-173.08-pkg1/usr/src/nv/nv.c: At top level:
    /home/roberth/pkg/geforce-mm/src/NVIDIA-Linux-x86-173.08-pkg1/usr/src/nv/nv.c:1853: error: unknown field 'nopage' specified in initializer
    /home/roberth/pkg/geforce-mm/src/NVIDIA-Linux-x86-173.08-pkg1/usr/src/nv/nv.c:1853: warning: initialization from incompatible pointer type
    make[3]: *** [/home/roberth/pkg/geforce-mm/src/NVIDIA-Linux-x86-173.08-pkg1/usr/src/nv/nv.o] Error 1
    make[2]: *** [_module_/home/roberth/pkg/geforce-mm/src/NVIDIA-Linux-x86-173.08-pkg1/usr/src/nv] Error 2
    NVIDIA: left KBUILD.
    nvidia.ko failed to build!
    make[1]: *** [module] Error 1
    make: *** [module] Error 2
    ==> ERROR: Build Failed.
    Aborting...
    Anybody have a clue?

    It seems I was wrong! I found a patch on the nvidia forums which actually makes it works
    I don't know if it will work for you, or how safe it is, but I guess it is worth a shot.
    The patch:
    --- os-agp.c.25 2008-04-02 01:34:49.000000000 -0400
    +++ os-agp.c 2008-04-02 01:39:00.000000000 -0400
    @@ -293,7 +293,7 @@
    nv_pte_t *page_ptr = at->page_table[i];
    - page_ptr->phys_addr = (ptr->memory[i] & PAGE_MASK);
    + page_ptr->phys_addr = (ptr->memory[i]);
    page_ptr->virt_addr = (unsigned long) __va(page_ptr->phys_addr);
    page_ptr->dma_addr = page_ptr->phys_addr;
    --- nv.c.25 2008-03-15 22:00:46.000000000 -0400
    +++ nv.c 2008-04-02 01:31:46.000000000 -0400
    @@ -613,7 +613,7 @@
    nv_state_t *nv;
    nv_linux_state_t *nvl;
    - proc_nvidia = create_proc_entry("nvidia", d_flags, proc_root_driver);
    + proc_nvidia = create_proc_entry("driver/nvidia", d_flags, NULL);
    if (!proc_nvidia)
    goto failed;
    @@ -1811,6 +1811,19 @@
    +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 24))
    +int nv_kern_vma_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
    +{
    +struct page *page;
    +
    + page = pfn_to_page(vma->vm_pgoff);
    + if (!page)
    + return VM_FAULT_SIGBUS;
    + get_page(page);
    + vmf->page = page;
    + return 0;
    +}
    +#else
    struct page *nv_kern_vma_nopage(
    struct vm_area_struct *vma,
    unsigned long address,
    @@ -1832,11 +1845,16 @@
    return NOPAGE_SIGBUS;
    #endif
    +#endif /* 2.6.24 */
    struct vm_operations_struct nv_vm_ops = {
    .open = nv_kern_vma_open,
    .close = nv_kern_vma_release, /* "close" */
    +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 24))
    + .fault = nv_kern_vma_fault,
    +#else
    .nopage = nv_kern_vma_nopage,
    +#endif
    static nv_file_private_t *

  • Creating PKGBUILD for palemoon, browser based on firefox

    Hi,
    I'm relative new Arch user and I haven't done any packaging until today with Pale Moon. It is a web browser based on Mozilla Firefox and it has been build to linux just a while ago. The author of the project gave me permission to submit it to AUR. I would be happy to do it, but I don't have any previous experience with packaging. Could someone check the PKGBUILD that it is correct and adheres the AUR standards? And, anyone interested with more experience is free to take it over.
    The project home page is http://palemoon.org
    and the linux binaries are at http://sourceforge.net/projects/pm4linux/,
    Here is the PKGBUILD file. I used firefox-esr-bin as an example and copied the dependencies from it.
    # Maintainer: sumt <sumt at sci dot fi>
    pkgname=palemoon
    pkgver=24.3.1
    pkgrel=1
    pkgdesc="Browser based on Firefox that's optimised for performance."
    arch=('i686' 'x86_64')
    url="http://sourceforge.net/projects/pm4linux/"
    license=('MPL' 'GPL' 'LGPL')
    depends=('gtk2' 'dbus-glib' 'desktop-file-utils' 'libxt' 'mime-types' 'nss' 'shared-mime-info')
    optdepends=('networkmanager: Location detection via available WiFi networks'
    'gstreamer0.10-base-plugins: vorbis decoding, ogg demuxing'
    'gstreamer0.10-good-plugins: webm and mp4 demuxing'
    'gstreamer0.10-bad-plugins: aac, vp8 and opus decoding'
    'gstreamer0.10-ugly-plugins: h.264 and mp3 decoding'
    'gstreamer0.10-ffmpeg: more decoders'
    'libpulse: PulseAudio audio driver')
    install=$pkgname.install
    source=(http://downloads.sourceforge.net/pm4linux/$pkgname-$pkgver.en-US.linux-$CARCH.tar.bz2
    $pkgname.desktop)
    md5sums=('88fe69cd12baf1de15d58c1be5e68a2e'
    '220EDFF6FA5A275B53D7EDC1E6A3DB99')
    [ "$CARCH" == "i686" ] && md5sums[0]='065793af06c68a4491acb2fd1a9eda29'
    package() {
    cd $srcdir
    install -d $pkgdir/{usr/{bin,share/applications},opt}
    cp -r $pkgname/ $pkgdir/opt/$pkgname
    ln -s /opt/$pkgname/$pkgname $pkgdir/usr/bin/$pkgname
    install -m644 $srcdir/$pkgname.desktop $pkgdir/usr/share/applications/
    Results of namcap for the build package. Is there anything that I should be concerned about?
    > namcap palemoon-24.3.1-1-x86_64.pkg.tar.xz
    palemoon E: ELF file ('opt/palemoon/libnssdbm3.so') outside of a valid path.
    palemoon E: ELF file ('opt/palemoon/libssl3.so') outside of a valid path.
    palemoon E: ELF file ('opt/palemoon/palemoon-bin') outside of a valid path.
    palemoon E: ELF file ('opt/palemoon/plugin-container') outside of a valid path.
    palemoon E: ELF file ('opt/palemoon/palemoon') outside of a valid path.
    palemoon E: ELF file ('opt/palemoon/libmozalloc.so') outside of a valid path.
    palemoon E: ELF file ('opt/palemoon/libplds4.so') outside of a valid path.
    palemoon E: ELF file ('opt/palemoon/libsmime3.so') outside of a valid path.
    palemoon E: ELF file ('opt/palemoon/libsoftokn3.so') outside of a valid path.
    palemoon E: ELF file ('opt/palemoon/libxul.so') outside of a valid path.
    palemoon E: ELF file ('opt/palemoon/libmozsqlite3.so') outside of a valid path.
    palemoon E: ELF file ('opt/palemoon/mozilla-xremote-client') outside of a valid path.
    palemoon E: ELF file ('opt/palemoon/libnss3.so') outside of a valid path.
    palemoon E: ELF file ('opt/palemoon/libplc4.so') outside of a valid path.
    palemoon E: ELF file ('opt/palemoon/libfreebl3.so') outside of a valid path.
    palemoon E: ELF file ('opt/palemoon/libnspr4.so') outside of a valid path.
    palemoon E: ELF file ('opt/palemoon/libnssckbi.so') outside of a valid path.
    palemoon E: ELF file ('opt/palemoon/libnssutil3.so') outside of a valid path.
    palemoon E: ELF file ('opt/palemoon/webapprt-stub') outside of a valid path.
    palemoon E: ELF file ('opt/palemoon/browser/components/libbrowsercomps.so') outside of a valid path.
    palemoon E: ELF file ('opt/palemoon/components/libmozgnome.so') outside of a valid path.
    palemoon E: ELF file ('opt/palemoon/components/libdbusservice.so') outside of a valid path.
    palemoon W: Referenced library 'libmozsqlite3.so' is an uninstalled dependency
    palemoon W: Referenced library 'libxul.so' is an uninstalled dependency
    palemoon W: Referenced library 'libmozalloc.so' is an uninstalled dependency
    palemoon E: Dependency java-environment detected and not included (found class files opt/palemoon/distribution/bundles/[email protected]/chrome.jar, opt/palemoon/browser/chrome/browser.jar, opt/palemoon/browser/chrome/en-US.jar, opt/palemoon/chrome/marionette.jar, opt/palemoon/chrome/en-US.jar, opt/palemoon/chrome/toolkit.jar, opt/palemoon/chrome/recording.jar, opt/palemoon/chrome/pippki.jar, opt/palemoon/webapprt/chrome/en-US.jar, opt/palemoon/webapprt/chrome/webapprt.jar)
    palemoon W: Dependency alsa-lib detected but optional (libraries ['usr/lib/libasound.so.2'] needed in files ['opt/palemoon/libxul.so'])
    palemoon W: Dependency included and not needed ('mime-types')
    palemoon W: Dependency shared-mime-info included but already satisfied
    Last edited by up (2014-02-10 07:27:04)

    Well, I changed the path from /opt/palemoon to /usr/lib/palemoon, added icons to usr/share, and symlinked dictionary folders to use system-provided paths.
    Here is the new PKGBUILD,
    # Maintainer: sumt <sumt at sci dot fi>
    pkgname=palemoon
    pkgver=24.3.1
    pkgrel=1
    pkgdesc="Browser based on Firefox that's optimised for performance."
    arch=('i686' 'x86_64')
    url="http://sourceforge.net/projects/pm4linux/"
    license=('MPL' 'GPL' 'LGPL')
    depends=('gtk2' 'dbus-glib' 'desktop-file-utils' 'libxt' 'mime-types' 'nss' 'alsa-lib')
    optdepends=('networkmanager: Location detection via available WiFi networks'
    'gstreamer0.10-base-plugins: vorbis decoding, ogg demuxing'
    'gstreamer0.10-good-plugins: webm and mp4 demuxing'
    'gstreamer0.10-bad-plugins: aac, vp8 and opus decoding'
    'gstreamer0.10-ugly-plugins: h.264 and mp3 decoding'
    'gstreamer0.10-ffmpeg: more decoders'
    'libpulse: PulseAudio audio driver')
    install=palemoon.install
    source=(http://downloads.sourceforge.net/pm4linux/$pkgname-$pkgver.en-US.linux-$CARCH.tar.bz2
    $pkgname.desktop)
    md5sums=('88fe69cd12baf1de15d58c1be5e68a2e'
    '00d640ab6261fd1fb4adbadf79edd1f5')
    [ "$CARCH" == "i686" ] && md5sums[0]='065793af06c68a4491acb2fd1a9eda29'
    package() {
    install -d "$pkgdir"/usr/{bin,lib}
    cp -r palemoon/ "$pkgdir/usr/lib/$pkgname"
    ln -s "/usr/lib/$pkgname/palemoon" "$pkgdir/usr/bin/palemoon"
    install -Dm644 palemoon.desktop "$pkgdir/usr/share/applications/$pkgname.desktop"
    # icons
    install -Dm644 palemoon/browser/chrome/icons/default/default16.png \
    "$pkgdir/usr/share/icons/hicolor/16x16/apps/$pkgname.png"
    install -Dm644 palemoon/browser/chrome/icons/default/default32.png \
    "$pkgdir/usr/share/icons/hicolor/32x32/apps/$pkgname.png"
    install -Dm644 palemoon/browser/chrome/icons/default/default48.png \
    "$pkgdir/usr/share/icons/hicolor/48x48/apps/$pkgname.png"
    install -Dm644 palemoon/browser/icons/mozicon128.png \
    "$pkgdir/usr/share/icons/hicolor/128x128/apps/$pkgname.png"
    # use system-provided dictionaries
    rm -rf "$pkgdir"/usr/lib/$pkgname/{dictionaries,hyphenation}
    ln -s /usr/share/hunspell "$pkgdir/usr/lib/$pkgname/dictionaries"
    ln -s /usr/share/hyphen "$pkgdir/usr/lib/$pkgname/hyphenation"
    # avoid duplicate binaries
    # https://bugzilla.mozilla.org/show_bug.cgi?id=658850
    ln -sf palemoon "$pkgdir/usr/lib/$pkgname/palemoon-bin"
    and namcap results,
    > namcap palemoon-24.3.1-1-x86_64.pkg.tar.xz
    palemoon W: Referenced library 'libmozsqlite3.so' is an uninstalled dependency
    palemoon W: Referenced library 'libxul.so' is an uninstalled dependency
    palemoon W: Referenced library 'libmozalloc.so' is an uninstalled dependency
    palemoon E: Symlink (usr/lib/palemoon/hyphenation) points to non-existing /usr/share/hyphen
    palemoon E: Symlink (usr/lib/palemoon/dictionaries) points to non-existing /usr/share/hunspell
    palemoon E: Dependency java-environment detected and not included (found class files usr/lib/palemoon/distribution/bundles/[email protected]/chrome.jar, usr/lib/palemoon/browser/chrome/browser.jar, usr/lib/palemoon/browser/chrome/en-US.jar, usr/lib/palemoon/chrome/marionette.jar, usr/lib/palemoon/chrome/en-US.jar, usr/lib/palemoon/chrome/toolkit.jar, usr/lib/palemoon/chrome/recording.jar, usr/lib/palemoon/chrome/pippki.jar, usr/lib/palemoon/webapprt/chrome/en-US.jar, usr/lib/palemoon/webapprt/chrome/webapprt.jar)
    palemoon W: Dependency included and not needed ('mime-types')
    Any comments? Thanks.

  • Hdf4 and pyhdf AUR PKGBUILDS for review

    pyhdf is a Python interface to the HDF4 library. HDF4 is a scientific data file format. pyhdf links to the static libs built by the HDF4 package. I decided to split HDF4 out into its own package because someone else might want to link to these libraries, or use the numerous HDF4 utilities that accompany them. There is an hdf5 package in the AUR already, but hdf5 coexists with hdf4, rather than replacing it.
    Here is the HDF4 PKGBUILD:
    # Contributor: David Scholl <djscholl>
    pkgname=hdf4
    pkgver=2r1
    pkgrel=1
    pkgdesc="General purpose library and file format for storing scientific data."
    url="http://hdf.ncsa.uiuc.edu/hdf4.html"
    license="custom"
    depends=('zlib' 'libjpeg')
    makedepends=(gcc-fortran)
    source=(ftp://ftp.ncsa.uiuc.edu/HDF/HDF/HDF_Current/src/HDF4.$pkgver.tar.gz ftp://ftp.ncsa.uiuc.edu/HDF/HDF/HDF_Current/src/patches/configure)
    md5sums=('9082c6fa913b9188452fa6c5217e1573' '845b0e1a20c0a969fca386b8830236ed')
    build() {
    cp ./configure $startdir/src/HDF4.$pkgver
    cd $startdir/src/HDF4.$pkgver
    ./configure --prefix=/usr F77=gfortran FFLAGS=-ffixed-line-length-0
    make || return 1
    make prefix=$startdir/pkg/usr install
    mkdir -p $startdir/pkg/usr/share/licenses/hdf4
    cp $startdir/src/HDF4.$pkgver/COPYING $startdir/pkg/usr/share/licenses/hdf4
    HDF4 was originally built with commercial Fortran 77 compilers, although g77 worked too. Since g77 is gone, I built it with gfortran. I encountered a couple of issues with the "make check" command, which compiles and runs tests of the libraries and utilities. The main package builds without errors using plain gfortran. However, the test code contains lines longer than 72 characters, so I had to add the FFLAGS=-ffixed-line-length-0 option to the configure script to be able to build the tests. When I manually do
    cd $startdir/src/HDF4.$pkgver
    make check || return 1
    all of the tests are built and passed without errors. However, when I put these two lines into the build script, the tests fail as follows:
    ============================
    HDF-SD C interfaces tests
    ============================
    srcdir="." ./hdftest > hdfout.new
    make[2]: *** [check] Error 1
    make[2]: Leaving directory `/home/dscholl/abs/hdf4check/src/HDF4.2r1/mfhdf/libsrc'
    make[1]: *** [check-recursive] Error 1
    make[1]: Leaving directory `/home/dscholl/abs/hdf4check/src/HDF4.2r1/mfhdf'
    make: *** [check-recursive] Error 1
    ==> ERROR: Build Failed. Aborting...
    I would like to include the tests in the build, because it's bad when your data gets mangled. However, I don't know how to get the tests to run in the build script. If anyone has any suggestions I would appreciate them.
    HDF4 is released under a license which resembles other Open Source licenses I have read, so I treated it as a custom license. The HDF4 package can be built with an optional compression library called szip, which is not an Open Source product. szip is available under non-commercial and commercial licenses, but prospective commercial users must contact the licensing agent. The AUR doesn't have a way to make that clear to prospective users, so I left out szip.
    Here is the PKGBUILD for pyhdf:
    # Contributor: David Scholl <djscholl>
    pkgname=pyhdf
    pkgver=0.7.3
    pkgrel=1
    pkgdesc="Python bindings for the HDF library."
    url="http://pysclint.sourceforge.net/pyhdf/"
    license="Python"
    depends=('python' 'python-numeric' 'zlib' 'libjpeg')
    makedepends=(hdf4)
    source=(http://dl.sourceforge.net/pysclint/$pkgname-0.7-3.tar.gz)
    md5sums=('f55aa19e61cf6501f436e27783098000')
    build() {
    cd $startdir/src/$pkgname-0.7-3
    sed -i '/#extra_compile_args=["-DNOSZIP"],/s/#//' setup.py
    sed -i '/libraries = ["mfhdf", "df", "jpeg", "z", "sz"]/s/libraries/#libraries/' setup.py
    sed -i '/#libraries = ["mfhdf", "df", "jpeg", "z"]/s/#//' setup.py
    python setup.py install --root=$startdir/pkg
    pyhdf assumes the availability of szip by default, so its setup.py must be hacked to build it without szip.  I do this with three sed commands, following the instructions in the INSTALL file and the comments in the setup.py. The sourceforge page for pyhdf describes it as being released under the Python license, but there is no copyright file included with the source distribution, nor did I find one on the project website.
    If anyone has corrections or improvements to suggest, please post.

    I have done some further digging into the "make check" issue, but I don't know enough to solve it. I'm hoping someone will be able to figure out a patch or work-around that I can use.
    The error message announces leaving the src/HDF4.2r1/mfhdf/libsrc directory. We can find the first part of the error message in the Makefile:
    less -N src/HDF4.2r1/mfhdf/libsrc/Makefile
    729 check:
    730 @echo "============================"
    731 @echo "HDF-SD C interfaces tests"
    732 @echo "============================"
    733 srcdir="$(srcdir)" ./hdftest > hdfout.new
    734 @cmd="$(DIFF) hdfout.new $(srcdir)/hdfout.sav";
    It appears to me that line 733 bombs when "make check" is run from the build script, and the diff command in 734 doesn't get a chance to run.
    The hdfout.new from the build script "make check" ends in
    *** UNEXPECTED VALUE from second SDstart is 393216 at line 61 in tsd.c
    num_err == 1
    The file src/HDF4.2r1/mfhdf/libsrc/hdfout.sav ends in
    num_err == 0
    less -N src/HDF4.2r1/mfhdf/libsrc/tsd.c
    24 #define FILE_NAME "sdtest.hdf" /* data file to test ID types */
    59 /* Create a protected file */
    60 fid = SDstart(FILE_NAME, DFACC_CREATE);
    61 VERIFY(fid, FAIL, "second SDstart");
    Running "make check" manually:
    $ ls -l sdtest.hdf
    --w------- 1 dscholl dscholl 2503 2006-08-13 09:45 sdtest.hdf
    Running "make check" from within the build script:
    $ ls -l sdtest.hdf
    -rw------- 1 dscholl dscholl 2502 2006-08-13 09:48 sdtest.hdf
    I'm not a C programmer, but it appears to me that the hdftest binary is trying to create a read-protected --w------- file, and actually creating a -rw------- file. When it tries to read it, it generates an error message and the Makefile stops running. What is different about the build script environment that would cause this difference in file creation?

  • E17 SVN Builder, a new script for pacman to keep your E17 up to date!

    I created a script called E17 SVN Builder because of what it does: create packages of E17 direct from SVN using the same PKGBUILDs as the Arch snapshots do. It came around because I was bitten by the Settings panel bug, which was fixed in upstream a few days after the SVN snapshot was taken. I wanted an up to date E17 install, so I created this script. Do NOT use it if you want your E17 install to be stable(r?)!
    I just thought I would share this script since it works for me. Perhaps people could help me improve it?
    Anyway, the dependancies right now are:
    yaourt-git (I need it to fetch the PKGBUILDs for the images from CVS)
    svn (to fetch the E17 code)
    TODO:
    - I need to get rid of the dependancy on yaourt-git by extracting the code for fetching the PKGBUILDs with it.
    - I want to be able to use flags with this.
    License: GPLv3
    Version: 0.2
    #!/bin/sh
    # * E17-svn-builder *
    # * A script to build E17 directly from SVN *
    # * By smartboyathome *
    VERSION=0.2
    usage(){
    echo 'E17 SVN Builder'
    echo 'This is version '$VERSION
    echo 'For now, this is a very simple script. It will fetch and build the PKGBUILDs for you. It is recommend you create a new directory to run this in, as it will pollute a directory with tons of files and folders.'
    echo '-h, --help; Show this message.'
    while [ "$#" -ne "0" ]; do
    case $1 in
    --help)
    usage
    exit 0
    -h)
    usage
    exit 0
    esac
    done
    buildpkg(){
    echo 'Building '$_E17PKG'...'
    # Check if the package directory exists, and if not, create it.
    if [ -d $_E17PKG ]; then
    cd $_E17PKG
    else
    mkdir $_E17PKG
    cd $_E17PKG
    fi
    # Check if the PKGBUILD exists, and if not, get it.
    if [ -d PKGBUILD ]; then
    yaourt -G $_E17PKG
    else
    mv PKGBUILD PKGBUILD.old
    yaourt -G $_E17PKG
    mv PKGBUILD PKGBUILD.new | mv PKGBUILD.old PKGBUILD
    cmp -s PKGBUILD PKGBUILD.new || mv PKGBUILD.new PKGBUILD
    fi
    makepkg PKGBUILD
    mv *.pkg.tar.gz ../
    cd ../
    # Make sure there aren't any left over environment variables from a previous run or program. This keeps things clean. :)
    unset _EXTRA
    unset _E17PKG
    echo 'Would you like to build the e17-extra-svn packages as well? (y/n)'
    read _EXTRA
    # Remove all packages
    rm *.pkg.tar.gz
    echo 'Beginning to build e17-svn packages...'
    #--- Begin building eina-svn ---
    _E17PKG=eina-svn
    buildpkg
    #--- Begin building eet-svn ---
    _E17PKG=eet-svn
    buildpkg
    #--- Begin building evas-svn ---
    _E17PKG=evas-svn
    buildpkg
    #--- Begin building ecore-svn ---
    _E17PKG=ecore-svn
    buildpkg
    #--- Begin building embryo-svn ---
    _E17PKG=embryo-svn
    buildpkg
    #--- Begin building edje-svn ---
    _E17PKG=edje-svn
    buildpkg
    #--- Begin building e_dbus-svn ---
    _E17PKG=e_dbus-svn
    buildpkg
    #--- Begin building efreet-svn ---
    _E17PKG=efreet-svn
    buildpkg
    #--- Begin building e-svn ---
    _E17PKG=e-svn
    buildpkg
    echo 'Finished building e17-svn packages!'
    if [ $EXTRA="y" ]; then
    echo 'Beginning to build e17-extra-svn packages...'
    #--- Begin building exml-svn ---
    _E17PKG=exml-svn
    buildpkg
    #--- Begin building emprint-svn ---
    _E17PKG=emprint-svn
    buildpkg
    #--- Begin building engrave-svn ---
    _E17PKG=engrave-svn
    buildpkg
    #--- Begin building epsilon-svn ---
    _E17PKG=epsilon-svn
    buildpkg
    #--- Begin building esmart-svn ---
    _E17PKG=esmart-svn
    buildpkg
    #--- Begin building etk-svn ---
    _E17PKG=etk-svn
    buildpkg
    #--- Begin building ewl-svn ---
    _E17PKG=ewl-svn
    buildpkg
    #--- Begin building e-modules-extra-svn ---
    _E17PKG=e-modules-extra-svn
    buildpkg
    #--- Begin building elitaire-svn ---
    _E17PKG=elitaire-svn
    buildpkg
    #--- Begin building entrance-svn ---
    _E17PKG=entrance-svn
    buildpkg
    #--- Begin building exhibit-svn ---
    _E17PKG=exhibit-svn
    buildpkg
    echo 'Finished building e17-extra-svn packages!'
    fi
    echo ''
    echo 'All package building is complete!'
    echo 'It is recommended you restart E17 after installing these packages.'
    echo 'To do this, go to menu > Enlightenment > Restart;'
    echo 'If you cant, then issue this command to restart it:'
    echo 'enlightenment_remote -restart'
    echo ''
    echo 'Have a nice day!'
    # Unsetting our variables so that we aren't messing with anything else. Also keeps things clean. :)
    unset _E17PKG
    unset _EXTRA
    exit 0
    Last edited by smartboyathome (2008-12-21 21:10:47)

    UPDATE! This package has had a couple changes:
    - Repetitive stuff was condensed into one piece of code. Now, its much easier to read.
    - I implemented extra differently. Instead of using a flag (which for some reason always sent me into a loop, I need more practice with scripting ), I just ask the person running the script whether they want to build extra as well as the core e17-svn stuff. Now it doesn't build them all automatically.

Maybe you are looking for

  • Need for multiple ASM disk groups on a SAN with RAID5??

    Hello all, I've successfully installed clusterware, and ASM on a 5 node system. I'm trying to use asmca (11Gr2 on RHEL5)....to configure the disk groups. I have a SAN, which actually was previously used for a 10G ASM RAC setup...so, reusing the candi

  • How to check the properties or the source file or the HTML coding of any particular link on the web page?

    Earlier when I wanted to see the HTML coding of any link on the web page, I was able to see it but now I am not able to do that. Like earlier I used to right click on the link and there was an option of "View Properties" through which I was able to v

  • Error Building LW 2010 Distribution Kit

    I get the following error when trying to build my distribution kit on a factory test set PC.  The same kit will build on my work laptop. I have found various posts of similar problems building distributions with LW, LV, Test Stand, etc. but none are

  • IR highlight row error

    Hi, I have two columns in IR - Amount to be paid - Paid amount I would like to highlight rows that have remain amount =0 so I created a Compute column Name Remain Amount = Amount to be paid - Paid amount and created highlight condition where Remain A

  • Building a CSV with TAB Delimited

    Apex 3.1.2 Customer wants to build a Apex Report with CSV output, but have TAB delimited columns, not comma delimited. Any ideas on how to insert a TAB into the CSV "Separator" column? Thanks, Dwight