PKGBUILD suggestions

i have some PKGBUILD suggestions
-newer version of "houdini"
- softimage xsi
- unity3d
-newer version of google-earth
-udk
-vmware workstation
thanks
Last edited by cyberscan (2011-10-21 10:32:07)

Fukawi's suggestion was actually correct, I overlooked the $pkgdir variable in his code snippet.  As for the variable, I may create it, but I believe the creator of the program will avoid that naming scheme once it's no longer in beta, making it irrelevant for the time being.
Still no luck with the install line   Anyways, thanks again, I'll be putting the PKGBUILD up as soon as I get it working right.
Wasn't able to get the install line to work, so I've gone back to using mv for the time being.
Install line that fails:
install -Dd "$srcdir/$pkgname" "$pkgdir/opt/full-circle-notifier"
Results (without the -d) in omitting directory warnings, and with -d it results in an empty directory.
Package is here for anyone interested: http://aur.archlinux.org/packages.php?ID=40227
Final PKGBUILD:
# Maintainer: Lucas Westermann <[email protected]>
pkgname=full-circle-notifier
pkgver=1.0
pkgrel=1
pkgdesc="Notifier for the popular FCM Ubuntu Community Magazine."
arch=('x86_64' 'i686')
url="http://bitbucket.org/mrmonday/full-circle-notifier/get/$pkgver-beta1.tar.gz"
license=('GPL')
depends=('qjson' 'qt')
source=($pkgname-$pkgver-beta1.tar.gz)
md5sums=('3aa7ba198afcfe748c72aeed7e57111e')
build() {
cd "$srcdir/$pkgname"
qmake
make
package() {
mkdir -p $pkgdir/opt/full-circle-notifier/ $pkgdir/usr/bin
mv $srcdir/$pkgname/ $pkgdir/opt/
ln -s "/opt/full-circle-notifier/fcnotifier" "$pkgdir/usr/bin/fcnotifier"
Last edited by lswest (2010-08-25 01:32:46)

Similar Messages

  • [SOLVED] EurKEY PKGBUILD request for comments

    Hi, I just finished a PKGBUILD for EurKEY "European Keyboard Layout". It installs and removes fine on my system, and I took care to respect the packaging standards, but before submitting it to AUR I would like to get any comments/suggestions.
    PKGBUILD
    # Maintainer: Christoph Roeper <cr (at) roeper (dot) biz>
    pkgname=eurkey
    pkgver=1.1
    pkgrel=1
    pkgdesc="The European Keyboard Layout"
    arch=('any')
    url="http://eurkey.steffen.bruentjen.eu/"
    license=('GPL3')
    depends=('xkeyboard-config' 'sed' 'gawk')
    install="$pkgname.install"
    source=(http://eurkey.steffen.bruentjen.eu/download/debian/binary/eurkey.deb)
    md5sums=('8da8472f8f8d30baaa6a50145264024b')
    package() {
    cd "$srcdir"
    ar x $pkgname.deb
    tar xzf data.tar.gz -C "$pkgdir/"
    cd "${pkgdir}"
    # euro on '5', swap with pound
    awk='\
    BEGIN { fix = 0 } \
    if ( $2 == "<AE04>" ) { $7="sterling,"; fix = 1 } \
    else if ( $2 == "<AE05>" ) { $7="EuroSign,"; fix = 1 } \
    if ( fix == 1 ) { printf "%11s %s %s %s%16s%19s%22s%21s %s %s\n",$1,$2,$3,$4,$5,$6,$7,$8,$9,$10; fix = 0 } \
    else { print } \
    file="usr/share/X11/xkb/symbols/eurkey"
    tmpfile="$file".`date +%FT%T`.temp
    awk -- "$awk" $file > $tmpfile
    cat $tmpfile > $file
    rm $tmpfile
    pkgname.install
    post_install() {
    # Installs the EurKEY layout.
    if test "$EUID" = 0; then SUDO=; else SUDO=sudo; fi
    exec $SUDO bash /dev/stdin "$@" <<'ENDSUDO'
    set -e
    str=" <layout>\n\
    <configItem>\n\
    <name>eurkey</name>\n\
    <shortDescription>EUR</shortDescription>\n\
    <description>EurKEY</description>\n\
    <languageList>\n\
    <iso639Id>cat</iso639Id>\n\
    <iso639Id>dan</iso639Id>\n\
    <iso639Id>eng</iso639Id>\n\
    <iso639Id>est</iso639Id>\n\
    <iso639Id>fao</iso639Id>\n\
    <iso639Id>fin</iso639Id>\n\
    <iso639Id>ger</iso639Id>\n\
    <iso639Id>gre</iso639Id>\n\
    <iso639Id>gsw</iso639Id>\n\
    <iso639Id>ita</iso639Id>\n\
    <iso639Id>lav</iso639Id>\n\
    <iso639Id>lit</iso639Id>\n\
    <iso639Id>nld</iso639Id>\n\
    <iso639Id>nor</iso639Id>\n\
    <iso639Id>por</iso639Id>\n\
    <iso639Id>spa</iso639Id>\n\
    <iso639Id>swe</iso639Id>\n\
    </languageList>\n\
    </configItem>\n\
    </layout>\n\
    </layoutList>"
    for file in /usr/share/X11/xkb/rules/{base,evdev}.xml; do
    if [ ! -f "$file" ]; then
    echo "File $file is not a regular file (skipped)"
    elif [ $(grep -ci eurkey "$file") -ne 0 ]; then
    echo "File $file already constains eurkey (skipped)"
    else
    echo "processing $file"
    sed -i "s~</layoutList>~$str~" "$file"
    fi
    done
    ENDSUDO
    pre_remove() {
    # Removes the EurKEY layout.
    if test "$EUID" = 0; then SUDO=; else SUDO=sudo; fi
    exec $SUDO bash /dev/stdin "$@" <<'ENDSUDO'
    set -e
    for file in {/etc/vconsole.conf,/etc/X11/xorg.conf.d/*keyboard*}; do
    if [ -f $file ]; then
    [ `grep -ci '^\s*[^#].*eurkey' $file` -ne 0 ] && echo -e "Cannot completely remove EurKEY since it's still configured in $file.\nPlease remove it manually or use the settings manager." && exit 1
    fi
    done
    exit 0
    ENDSUDO
    post_remove() {
    # Removes the EurKEY layout.
    if test "$EUID" = 0; then SUDO=; else SUDO=sudo; fi
    exec $SUDO bash /dev/stdin "$@" <<'ENDSUDO'
    set -e
    awk='
    BEGIN { output = 1 ; buffer = "" }
    $0~/<layout>/ { output = 0 ; deleteSection = 0 }
    output == 1 { print $0 }
    $0~/<\/layout>/ { output = 1 ; buffer = buffer $0 ; if (deleteSection == 0) print buffer ; buffer = "" }
    $0~/<name>eurkey<\/name>/ { deleteSection = 1 }
    output == 0 { buffer = buffer $0 "\n" }
    for file in /usr/share/X11/xkb/rules/{base,evdev}.xml; do
    if test -f "$file"; then
    tmpfile="$file".`date +%FT%T`.temp
    echo "processing $file"
    awk -- "$awk" $file > $tmpfile
    cat $tmpfile > $file
    rm $tmpfile
    fi
    done
    ENDSUDO
    'sed' and 'awk' are neither build nor run-time dependencies, both are install dependencies, but I did not find a proper option for that.
    The (un-)install-scripts are taken from the Debian source, however with deb-packages it is obviously possible to abort  pre/post_remove on failure (here used if the keyboard layout is still in use => no uninstall). I did not find a proper way to accomplish this with PKGBUILD install scripts.
    Both scripts a rather long, but in other review requests forum veterans preferred to have scripts posted here instead of a link to AUR or pastebin. If it's nevertheless wrong I will relocate the scripts.
    Thanks in advance.
    Last edited by roepi (2014-03-17 17:42:44)

    If you still want to modify the XML, I would use xmlstarlet instead of awk/sed. I haven't tested the following scripts so they will probably need some debugging but they should give you a general idea of what I would do.
    The post remove script would be reduced to:
    set -e
    # xpath selector to select layouts that are named eurkey
    xpath='/xkbConfigRegistry/layoutList/layout/configItem/name[text()="eurkey"]/../..'
    for file in /usr/share/X11/xkb/rules/{base,evdev}.xml; do
    [[ -f "$file" ]] && xml ed --inplace -d "$xpath" "$file"
    done
    And the post install script would become:
    set -e
    xpath='/xkbConfigRegistry/layoutList/layout/configItem/name[text()="eurkey"]'
    for file in /usr/share/X11/xkb/rules/{base,evdev}.xml; do
    if [[ ! -f "$file" ]]; then
    echo "File $file is not a regular file (skipped)"
    elif xml sel -t -c "$xpath" $file >/dev/null; then
    echo "File $file already constains eurkey (skipped)"
    else
    echo "processing $file"
    xml ed -P -L \
    -s /xkbConfigRegistry/layoutList -t elem -n layoutTMP -v '' \
    -s //layoutTMP -t elem -n configItem -v '' \
    -s //layoutTMP/configItem -t elem -n name -v 'eurkey' \
    -s //layoutTMP/configItem -t elem -n shortDescription -v 'EUR' \
    -s //layoutTMP/configItem -t elem -n description -v 'EurKEY' \
    -s //layoutTMP/configItem -t elem -n languageList -v '' \
    -s //layoutTMP/configItem/languageList -t elem -n iso639Id -v 'cat' \
    -s //layoutTMP/configItem/languageList -t elem -n iso639Id -v 'dan' \
    -s //layoutTMP/configItem/languageList -t elem -n iso639Id -v 'eng' \
    -s //layoutTMP/configItem/languageList -t elem -n iso639Id -v 'est' \
    -s //layoutTMP/configItem/languageList -t elem -n iso639Id -v 'fao' \
    -s //layoutTMP/configItem/languageList -t elem -n iso639Id -v 'fin' \
    -s //layoutTMP/configItem/languageList -t elem -n iso639Id -v 'ger' \
    -s //layoutTMP/configItem/languageList -t elem -n iso639Id -v 'gre' \
    -s //layoutTMP/configItem/languageList -t elem -n iso639Id -v 'gsw' \
    -s //layoutTMP/configItem/languageList -t elem -n iso639Id -v 'ita' \
    -s //layoutTMP/configItem/languageList -t elem -n iso639Id -v 'lav' \
    -s //layoutTMP/configItem/languageList -t elem -n iso639Id -v 'lit' \
    -s //layoutTMP/configItem/languageList -t elem -n iso639Id -v 'nld' \
    -s //layoutTMP/configItem/languageList -t elem -n iso639Id -v 'nor' \
    -s //layoutTMP/configItem/languageList -t elem -n iso639Id -v 'por' \
    -s //layoutTMP/configItem/languageList -t elem -n iso639Id -v 'spa' \
    -s //layoutTMP/configItem/languageList -t elem -n iso639Id -v 'swe' \
    -r //layoutTMP -v layout \
    "$file"
    fi
    done

  • [SOLVED] Asking for help and reviews for a PKGBUILD (cnijfilter-mp250)

    Hi everyone,
    I recently changed the desktop pc used by my parents, and I installed Arch on it (the previous desktop was running Debian). I know that I need to install a driver to get the printer working (a Canon MP 250 Series), because I did it before with Debian.
    The driver is in the AUR:
    https://aur.archlinux.org/packages/cnijfilter-mp250/
    A user in the comment (Huulivoide) suggested that the PKGBUILD was old, but the current mantainer didn't respond, so I decided to try to update the PKGBUILD myself as a learning opportunity and as a way to give something back to the community. This is the first PKGBUILD that I modify; while I've used Arch for quite some time, I'm still a noob in many respects.
    I tried to apply all the suggestions, and I did some other things (like quoting variables) that I often see in PKGBUILDs. This is the PKGBUILD:
    # Maintainer: Alireza Savand <[email protected]>
    # Special thanks to: olive, mirrr, GUiHKX, alessiofachechi, jeremy33,
    # jstitch, plv
    pkgname=cnijfilter-mp250
    pkgver=3.40.1
    pkgrel=5.1
    _pkgrealver=3.40
    _pkgrealrel=1
    pkgdesc="Canon IJ Printer Driver (MP250 series)"
    url="http://support-au.canon.com.au/contents/AU/EN/0100302002.html"
    arch=('i686' 'x86_64')
    license=('custom')
    depends=(
    'libcups'
    'cups'
    'popt'
    'ghostscript'
    'gsfonts'
    'atk>=1.9.0'
    'gtk2>=2.8.0'
    'pango>=1.12.3'
    'libpng>=1.2.8'
    'libtiff'
    'cairo>=1.0.2'
    'libxml2>=2.6.24'
    'fontconfig>=2.3.0'
    'libxinerama'
    makedepends=(
    'autoconf>=2.13'
    'automake>=1.6'
    'tar'
    'make'
    'gcc'
    conflicts=('cnijfilter-common')
    install=cnijfilter-mp250.install
    source=(
    'http://gdlp01.c-wss.com/gds/0/0100003020/01/cnijfilter-source-3.40-1.tar.gz'
    'fix.patch'
    'libpng.patch'
    'automake_fix.patch'
    md5sums=(
    '609975a05d6050fcca88f312d3f35c6a'
    'ba9c7ec49e76bf74cc50702e362aba7b'
    '15e417cd427a920c83e4f28e225e428e'
    '07f698d8987632d9bb427d3f4a42a29a'
    prepare() {
    cd "${srcdir}/cnijfilter-source-${_pkgrealver}-${_pkgrealrel}/"
    #patch -p0 < "${srcdir}/fix.patch"
    #patch -p0 < "${srcdir}/libpng.patch"
    #patch -p0 < "${srcdir}/automake_fix.patch"
    build() {
    cd "${srcdir}/cnijfilter-source-${_pkgrealver}-${_pkgrealrel}/libs"
    ./autogen.sh --prefix=/usr --program-suffix=mp250
    make
    cd "${srcdir}/cnijfilter-source-${_pkgrealver}-${_pkgrealrel}/cngpij"
    ./autogen.sh --prefix=/usr --program-suffix=mp250 --enable-progpath=/usr/bin
    make
    cd "${srcdir}/cnijfilter-source-${_pkgrealver}-${_pkgrealrel}/cnijfilter"
    ./autogen.sh --prefix=/usr --program-suffix=mp250 --enable-progpath=/usr/bin
    make
    cd "${srcdir}/cnijfilter-source-${_pkgrealver}-${_pkgrealrel}/pstocanonij"
    ./autogen.sh --prefix=/usr --program-suffix=mp250 --enable-progpath=/usr/bin
    make
    cd "${srcdir}/cnijfilter-source-${_pkgrealver}-${_pkgrealrel}/lgmon"
    ./autogen.sh --prefix=/usr --program-suffix=mp250 --enable-progpath=/usr/bin
    make
    cd "${srcdir}/cnijfilter-source-${_pkgrealver}-${_pkgrealrel}/ppd"
    ./autogen.sh --prefix=/usr --program-suffix=mp250
    make
    cd "${srcdir}/cnijfilter-source-${_pkgrealver}-${_pkgrealrel}/cngpijmon/cnijnpr"
    ./autogen.sh --prefix=/usr --program-suffix=mp250 --enable-progpath=/usr/bin LIBS="-ldl"
    make
    cd "${srcdir}/cnijfilter-source-${_pkgrealver}-${_pkgrealrel}/backend"
    ./autogen.sh --prefix=/usr --program-suffix=mp250 --enable-progpath=/usr/bin
    make
    cd "${srcdir}/cnijfilter-source-${_pkgrealver}-${_pkgrealrel}/backendnet"
    ./autogen.sh --prefix=/usr --program-suffix=mp250 --enable-progpath=/usr/bin
    make
    package() {
    cd "${srcdir}/cnijfilter-source-${_pkgrealver}-${_pkgrealrel}/libs"
    make DESTDIR="${pkgdir}" install
    cd "${srcdir}/cnijfilter-source-${_pkgrealver}-${_pkgrealrel}/cngpij"
    make DESTDIR="${pkgdir}" install
    cd "${srcdir}/cnijfilter-source-${_pkgrealver}-${_pkgrealrel}/cnijfilter"
    make DESTDIR="${pkgdir}" install
    cd "${srcdir}/cnijfilter-source-${_pkgrealver}-${_pkgrealrel}/pstocanonij"
    make DESTDIR="${pkgdir}" install
    cd "${srcdir}/cnijfilter-source-${_pkgrealver}-${_pkgrealrel}/lgmon"
    make DESTDIR="${pkgdir}" install
    cd "${srcdir}/cnijfilter-source-${_pkgrealver}-${_pkgrealrel}/ppd"
    make DESTDIR="${pkgdir}" install
    cd "${srcdir}/cnijfilter-source-${_pkgrealver}-${_pkgrealrel}/cngpijmon/cnijnpr"
    make DESTDIR="${pkgdir}" install
    cd "${srcdir}/cnijfilter-source-${_pkgrealver}-${_pkgrealrel}/backend"
    make DESTDIR="${pkgdir}" install
    cd "${srcdir}/cnijfilter-source-${_pkgrealver}-${_pkgrealrel}/backendnet"
    make DESTDIR="${pkgdir}" install
    cp "${srcdir}/cnijfilter-source-${_pkgrealver}-${_pkgrealrel}"/cnijfilter/src/config* \
    "${srcdir}/cnijfilter-source-${_pkgrealver}-${_pkgrealrel}"/lgmon/src/
    cp "${srcdir}/cnijfilter-source-${_pkgrealver}-${_pkgrealrel}"/cnijfilter/src/config* \
    "${srcdir}/cnijfilter-source-${_pkgrealver}-${_pkgrealrel}"/cngpijmon/cnijnpr/cnijnpr/
    cd "${srcdir}/cnijfilter-source-${_pkgrealver}-${_pkgrealrel}"
    install -d "${pkgdir}/usr/lib/bjlib"
    install -m 755 356/database/* "${pkgdir}/usr/lib/bjlib"
    if [ "$CARCH" == "x86_64" ]; then
    libdir=libs_bin64
    else
    libdir=libs_bin32
    fi
    install -m 755 "${srcdir}/cnijfilter-source-${_pkgrealver}-${_pkgrealrel}/356/${libdir}/libcnbpcmcm356.so.8.0.1" \
    "${pkgdir}/usr/lib/"
    install -m 755 "${srcdir}/cnijfilter-source-${_pkgrealver}-${_pkgrealrel}/356/${libdir}/libcnbpcnclapi356.so.3.5.0" \
    "${pkgdir}/usr/lib/"
    install -m 755 "${srcdir}/cnijfilter-source-${_pkgrealver}-${_pkgrealrel}/356/${libdir}/libcnbpcnclbjcmd356.so.3.3.0" \
    "${pkgdir}/usr/lib/"
    install -m 755 "${srcdir}/cnijfilter-source-${_pkgrealver}-${_pkgrealrel}/356/${libdir}/libcnbpcnclui356.so.3.6.0" \
    "${pkgdir}/usr/lib/"
    install -m 755 "${srcdir}/cnijfilter-source-${_pkgrealver}-${_pkgrealrel}/356/${libdir}/libcnbpess356.so.3.3.3" \
    "${pkgdir}/usr/lib/"
    install -m 755 "${srcdir}/cnijfilter-source-${_pkgrealver}-${_pkgrealrel}/356/${libdir}/libcnbpess356.so.3.3.3" \
    "${pkgdir}/usr/lib/"
    install -m 755 "${srcdir}/cnijfilter-source-${_pkgrealver}-${_pkgrealrel}/356/${libdir}/libcnbpo356.so.1.0.2" \
    "${pkgdir}/usr/lib/"
    install -m 755 "${srcdir}/cnijfilter-source-${_pkgrealver}-${_pkgrealrel}/com/${libdir}/libcnnet.so.1.2.0" \
    "${pkgdir}/usr/lib/"
    cd "${pkgdir}/usr/lib/"
    ln -s libcnbpcmcm356.so.8.0.1 libcnbpcmcm356.so
    ln -s libcnbpcnclapi356.so.3.5.0 libcnbpcnclapi356.so
    ln -s libcnbpcnclbjcmd356.so.3.3.0 libcnbpcnclbjcmd356.so
    ln -s libcnbpcnclui356.so.3.6.0 libcnbpcnclui356.so
    ln -s libcnbpess356.so.3.3.3 libcnbpess356.so
    ln -s libcnbpo356.so.1.0.2 libcnbpo356.so
    ln -s libcnnet.so.1.2.0 libcnnet.so
    cd "${srcdir}/cnijfilter-source-${_pkgrealver}-${_pkgrealrel}"
    install -D "LICENSE-cnijfilter-${_pkgrealver}EN.txt" \
    "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE-cnijfilter-${_pkgrealver}EN.txt"
    Questions:
    * Is the PKGBUILD all right?
    * The PKGBUILD apparently needs some patches. Unfortunately I don't code so I don't understand what their effect is. As far as I can tell, automake_fix.patch isn't needed anymore: I actually had to remove it to make the package build. Can someone confirm that it is safe to remove automake_fix.patch? What about the other patches? The package seems to build fine without libpng.patch and fix.patch, but since I don't know what they do I cannot really evaluate the impact of removing them.
    * namcap outputs some warnings about missing libraries. I'm not sure how to proceed here. Here is the output:
    cnijfilter-mp250 W: Referenced library 'libcnbpess356.so' is an uninstalled dependency
    cnijfilter-mp250 W: Referenced library 'libcnnet.so' is an uninstalled dependency
    cnijfilter-mp250 W: Referenced library 'libcnbpcmcm356.so' is an uninstalled dependency
    cnijfilter-mp250 W: Referenced library 'libcnbpcnclbjcmd356.so' is an uninstalled dependency
    cnijfilter-mp250 W: Referenced library 'libcnbpcnclapi356.so' is an uninstalled dependency
    cnijfilter-mp250 W: Referenced library 'libcnbpcnclui356.so' is an uninstalled dependency
    On the other hand, if I try to search (with find) for the name of the library in the package, I can see them:
    ./src/cnijfilter-source-3.40-1/356/libs_bin32/libcnbpess356.so
    ./src/cnijfilter-source-3.40-1/356/libs_bin64/libcnbpess356.so
    ./pkg/cnijfilter-mp250/usr/lib/libcnbpess356.so
    ./src/cnijfilter-source-3.40-1/com/libs_bin32/libcnnet.so
    ./src/cnijfilter-source-3.40-1/com/libs_bin64/libcnnet.so
    ./pkg/cnijfilter-mp250/usr/lib/libcnnet.so
    ./src/cnijfilter-source-3.40-1/356/libs_bin32/libcnbpcmcm356.so
    ./src/cnijfilter-source-3.40-1/356/libs_bin64/libcnbpcmcm356.so
    ./pkg/cnijfilter-mp250/usr/lib/libcnbpcmcm356.so
    ./src/cnijfilter-source-3.40-1/356/libs_bin32/libcnbpcnclbjcmd356.so
    ./src/cnijfilter-source-3.40-1/356/libs_bin64/libcnbpcnclbjcmd356.so
    ./pkg/cnijfilter-mp250/usr/lib/libcnbpcnclbjcmd356.so
    ./src/cnijfilter-source-3.40-1/356/libs_bin32/libcnbpcnclapi356.so
    ./src/cnijfilter-source-3.40-1/356/libs_bin64/libcnbpcnclapi356.so
    ./pkg/cnijfilter-mp250/usr/lib/libcnbpcnclapi356.so
    ./src/cnijfilter-source-3.40-1/356/libs_bin32/libcnbpcnclui356.so
    ./src/cnijfilter-source-3.40-1/356/libs_bin64/libcnbpcnclui356.so
    ./pkg/cnijfilter-mp250/usr/lib/libcnbpcnclui356.so
    So, all I can guess is that they're not in the correct place... Some of these "missing" libraries are moved around in the pkgbuild. Maybe I should move them in another dir...?
    There are other warnings in namcap; I'm inclined to ignore these:
    cnijfilter-mp250 W: Dependency libcups included but already satisfied
    cnijfilter-mp250 W: Dependency included and not needed ('cups')
    cnijfilter-mp250 W: Dependency included and not needed ('ghostscript')
    cnijfilter-mp250 W: Dependency included and not needed ('gsfonts')
    cnijfilter-mp250 W: Dependency included and not needed ('atk')
    cnijfilter-mp250 W: Dependency included and not needed ('gtk2')
    cnijfilter-mp250 W: Dependency included and not needed ('pango')
    cnijfilter-mp250 W: Dependency libpng included but already satisfied
    cnijfilter-mp250 W: Dependency libtiff included but already satisfied
    cnijfilter-mp250 W: Dependency included and not needed ('cairo')
    cnijfilter-mp250 W: Dependency included and not needed ('libxml2')
    cnijfilter-mp250 W: Dependency included and not needed ('fontconfig')
    cnijfilter-mp250 W: Dependency included and not needed ('libxinerama')
    * now the *really* noob question... My understanding is that the PKGBUILD contains instructions to produce a binary from source. What it's still mysterious to me is how to write these instruction *in practice*. E.g. in this PKGBUILD I see a lot of things copied/installed around, but how the user that originally wrote the PKGBUILD came to determine what to move and where, is beyond me. If I were to write a PKGBUILD from scratch now, how should I know that I need to  e.g.
    cp "${srcdir}/cnijfilter-source-${_pkgrealver}-${_pkgrealrel}"/cnijfilter/src/config* \
    "${srcdir}/cnijfilter-source-${_pkgrealver}-${_pkgrealrel}"/cngpijmon/cnijnpr/cnijnpr/
    Thanks to those who will find the time/patience to respond, and sorry for the long post.
    Last edited by greymatter (2014-04-06 13:06:27)

    Wow, so much could be simplified with a few cd's and a few for loops.
    Yes, it's OK. Not great, but OK.
    The patches, build fails here without fix.patch and libpng.patch. Make sure to delete your src dir before rebuilding, you probably still have the patches applied from a previous run. It works for now without the automake patch, but it may be needed again in the future. It would be much better done with sed than a patch, though.
    Edit: first attempt at a major cleanup
    # Maintainer: Alireza Savand <[email protected]>
    # Special thanks to: olive, mirrr, GUiHKX, alessiofachechi, jeremy33,
    # jstitch, plv
    pkgname=cnijfilter-mp250
    pkgver=3.40.1
    pkgrel=5.1
    _pkgrealver=3.40
    _pkgrealrel=1
    pkgdesc="Canon IJ Printer Driver (MP250 series)"
    url="http://support-au.canon.com.au/contents/AU/EN/0100302002.html"
    arch=('i686' 'x86_64')
    license=('custom')
    depends=(
    'libcups'
    'cups'
    'popt'
    'ghostscript'
    'gsfonts'
    'atk'
    'gtk2'
    'pango'
    'libpng'
    'libtiff'
    'cairo'
    'libxml2'
    'fontconfig'
    'libxinerama'
    conflicts=('cnijfilter-common')
    install=cnijfilter-mp250.install
    source=(
    'http://gdlp01.c-wss.com/gds/0/0100003020/01/cnijfilter-source-3.40-1.tar.gz'
    'fix.patch'
    'libpng.patch'
    'automake_fix.patch'
    md5sums=(
    '609975a05d6050fcca88f312d3f35c6a'
    'ba9c7ec49e76bf74cc50702e362aba7b'
    '15e417cd427a920c83e4f28e225e428e'
    '07f698d8987632d9bb427d3f4a42a29a'
    prepare() {
    cd "${srcdir}/cnijfilter-source-${_pkgrealver}-${_pkgrealrel}/"
    patch -p0 < "${srcdir}/fix.patch"
    patch -p0 < "${srcdir}/libpng.patch"
    #patch -p0 < "${srcdir}/automake_fix.patch"
    build() {
    for i in libs cngpij cnijfilter pstocanonij lgmon ppd backend backendnet; do
    cd "${srcdir}/cnijfilter-source-${_pkgrealver}-${_pkgrealrel}/${i}"
    ./autogen.sh --prefix=/usr --program-suffix=mp250 --enable-progpath=/usr/bin
    make
    done
    cd "${srcdir}/cnijfilter-source-${_pkgrealver}-${_pkgrealrel}/cngpijmon/cnijnpr"
    ./autogen.sh --prefix=/usr --program-suffix=mp250 --enable-progpath=/usr/bin LIBS="-ldl"
    make
    package() {
    for i in libs cngpij cnijfilter pstocanonij lgmon ppd backend backendnet cngpijmon/cnijnpr; do
    cd "${srcdir}/cnijfilter-source-${_pkgrealver}-${_pkgrealrel}/${i}"
    make DESTDIR="${pkgdir}" install
    done
    cd "${srcdir}/cnijfilter-source-${_pkgrealver}-${_pkgrealrel}"
    install -d "${pkgdir}/usr/lib/bjlib"
    install -m 755 356/database/* "${pkgdir}/usr/lib/bjlib"
    install -D "LICENSE-cnijfilter-${_pkgrealver}EN.txt" \
    "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE-cnijfilter-${_pkgrealver}EN.txt"
    if [ "$CARCH" == "x86_64" ]; then
    local _libdir=libs_bin64
    else
    local _libdir=libs_bin32
    fi
    cd "${srcdir}/cnijfilter-source-${_pkgrealver}-${_pkgrealrel}/356/${_libdir}/"
    install -m 755 -t "${pkgdir}/usr/lib/" \
    libcnbpcmcm356.so* \
    libcnbpcnclapi356.so* \
    libcnbpcnclbjcmd356.so* \
    libcnbpcnclui356.so* \
    libcnbpess356.so* \
    libcnbpo356.so* \
    "${srcdir}/cnijfilter-source-${_pkgrealver}-${_pkgrealrel}/com/${_libdir}/"libcnnet.so*
    Things to note:
    1. Versions are not needed on the deps unless it needs something different than what is in the main repos
    2. Anything included in base-devel should not be in the makedeps.
    3. The libdir variable was changed to _libdir and declared local. Need to avoid conflicting with other potential variables from the environment.
    Last edited by Scimmia (2014-04-05 18:04:26)

  • A suggestion for pacman

    Right now if you want to use "makepkg" effectively, you have to install and setup "sudo" just to be able to get the dependencies for a build (makepkg -s).
    My suggestion is for pacman to have a new parameter, like "pacman -P" for example, that would read a PKGBUILD file from the current directory and automatically parse the mentioned dependencies for installation. That way sudo wouldn't be required to easily use AUR/ABS.
    I think implementing this would make some systems more secure (no need to give users pacman permission) and also makes things more simple imo.
    I already use a bad self-made script for directly reading and installing PKGBUILD deps, but it would be cool to have it as native feature of pacman.
    What do you think.

    Welcome to the forums app4des.
    Ideas for improving the distro are always very well taken around here. Things do have a tendency to get lost in the forums, so what rson451 said is the best way to get ideas and suggestions across. There's a dedicated pacman section in the bug tracker. Look right under the user name box and you'll see a drop down lists.

  • [SOLVED] PKGBUILD equivalents for other distros

    I'd like to package some of my tools for other distros - mainly .deb and .rpm based for now.  Ideally, I'd like to not have to build full packages for each distro, but instead host build scripts or equivalents of PKGBUILDs for other distros.  As I am not nearly as well versed in other distros as I am with arch, I'm not sure how to find the needed information to accomplish this.
    To take .deb as an example, the pacman rosetta page suggests debuild is the equivalent tool to makepkg.  However, the debuild man page indicates that debuild can simply be run within the source tree to build a package.  Certainly this can't be the case, unless there are distro-specific files within that source tree that debuild finds and uses.  That man page does not indicate what these files are and how they are written.
    I have found documentation for creating full binary packages for debian-based distros, but is there an equivalent to a PKGBUILD?  I know for Gentoo, ebuilds are well documented and should be quite doable.  But frankly I'm pretty sure most gentoo users wouldn't need my help with those.  I'm currently primarily targeting .deb as many novice linux users that I'd like to make a couple of my tools available to seem to use ubuntoo.
    I suspect I may just be missing the proper documentation and/or am not using the right search terms.  Any nudges in the right direction would be appreciated.
    (edit: marked 'solved' as I now have the information I needed to get started working on this - but more input can always be handy.)
    Last edited by Trilby (2014-01-08 20:34:26)

    I recently discovered Debian's `checkinstall` which is very close to what I was looking for.  One can easily create a script that will download and install a "non-debianized" source package as a .deb that can be managed by dpkg/apt-get.
    Allegedly it can also create rpm packages, but I'm not going to worry about trying that out for a while.
    A simple example of a script to allow debian/*buntu users to install one of my packages can be seen here.  There is an executable script called `makedeb` - guess what it does.  There is also a package-specific file called DEBBUILD - guess what that's for .  With just those two files, a debian user could run the script which would get the needed info from the DEBUILD to install the needed dependencies, download and build the source, install under the watch of checkinstall to a temp directory, have checkinstall build a .deb package, remove the builddeps (and optionally all deps installed during the build), and leave them with a *.deb file ready for dpkg.
    This instance of makedeb was intentionally made generic so it could work for other packages, however it is also *very* simple and so will not work for all other packages.  A DEBBUILD is nearly identical to a PKGBUILD, except the dependency names need to be converted to the debian deps (and there may be many more deps needed as you cannot assume our base/base-devel components are there ... and split -dev packages suck).
    Making this DEBBUILD + makedeb made me wonder how hard it would be to convert our own makepkg over to work on top of apt-get/dpkg.  I've installed debian (crunchbang) on one of my systems to experiment with this.  I've realized there may not be much to it really.  I've just completed my revision to the actual makepkg script (and makepkg.conf) to make a full featured makedeb and makedeb.conf.  It is not yet tested - and once I test it I may find it is not nearly as complete as I had hoped.  But the goal is to allow PKGBUILD -> DEBBUILD conversions to be quite easy (just change the deps).
    I may post my full featured makedeb in "community contributions" if/when it passes a few basic tests.  It will not run on arch, but it is suited for archers who need to make debs.  It may eventually run on arch (there are dpkg is in the AUR, and so is checkinstall, though it is very broken ATM), but this is not a goal of mine.
    Last edited by Trilby (2014-05-30 17:37:40)

  • First PKGBUILD: fsv2 (3D File System Visualizer, gtk2 port)

    The purpose of this thread is to see whether the PKGBUILD is correct/adequate and whether there is interest in this package.
    I have managed to create a working PKGBUILD for fsv2 based on the one for the original fsv and the wiki prototype. The guidelines state that the package has to be useful - "more than a few people" would have to be interested. The original fsv PKGBUILD is out of date and the last comment is nine months old, but one can hope.
    It seems illogical that a program with a GUI suggests a text-based browser to view the provided documentation. I've left it in the PKGBUILD just in case, but one could easily suggest a different browser or perhaps use a simple text editor to view the documentation. Also, I have not tested it on x86-64 since I do not have access to such a machine.
    pkgname=fsv2
    pkgver=1.1.0
    pkgrel=1
    pkgdesc="gtk2 port of fsv, the 3D File System Visualizer as seen in Jurassic Park"
    arch=('i686' 'x86_64')
    url="http://fedorchenko.net/fsv2.php"
    license=('LGPL')
    depends=('xorg-server' 'gtkglarea' 'gdk-pixbuf2' 'ftgl' 'gtkmm')
    #optdepends=('lynx: help browser')
    options=('!libtool')
    source=(http://fedorchenko.net/src/${pkgname}-${pkgver}.tar.bz2)
    md5sums=('3a8e5e6a9b2e5cdc7a111765a2f18599')
    build() {
    cd "$srcdir/$pkgname-$pkgver"
    ./configure --prefix=/usr
    make
    package() {
    cd "$srcdir/$pkgname-$pkgver"
    make DESTDIR="$pkgdir/" install
    Edit: fixed namcap errors and warnings
    Last edited by al (2012-01-19 05:23:10)

    I did some corrections:
    pkgname=fsv2
    pkgver=1.1.0
    pkgrel=1
    pkgdesc="GTK2 port of fsv, the 3D File System Visualizer as seen in Jurassic Park"
    arch=('i686' 'x86_64')
    url="http://fedorchenko.net/fsv2.php"
    license=('LGPL')
    depends=('ftgl' 'gtkglarea' 'gtkmm')
    #optdepends=('lynx: help browser')
    options=('!libtool')
    source=("http://downloads.sf.net/sourceforge/${pkgname}/${pkgname}-${pkgver}.tar.bz2")
    md5sums=('3a8e5e6a9b2e5cdc7a111765a2f18599')
    build() {
    cd "$srcdir/$pkgname-$pkgver"
    ./configure --prefix=/usr
    make
    package() {
    cd "$srcdir/$pkgname-$pkgver"
    make DESTDIR="$pkgdir/" install
    # vim:set ts=2 sw=2 et:
    Looking at namcap output on PKGBUILD and built package will help you a lot.
    Remember to put the Maintainer tag at the beginning.
    BTW, I suggest that you take care of gtkglarea package as well, since the current AUR one is not good at all.
    Here's my take on it (tested):
    # Contributor: arjan <[email protected]>
    # Contributor: Tom Newsom <[email protected]>
    # Contributor: Luca Bennati <lucak3 AT gmail DOT com>
    # Maintainer: Andreas B. Wagner <[email protected]>
    pkgname=gtkglarea
    pkgver=2.0.1
    pkgrel=2
    pkgdesc="GTK/GL Area libraries"
    arch=('i686' 'x86_64')
    url="http://mono-project.com/GtkGLArea"
    license=('LGPL')
    depends=('gtk2' 'mesa')
    options=('!libtool')
    source=("http://ftp.gnome.org/pub/GNOME/sources/${pkgname}/2.0/${pkgname}-${pkgver}.tar.gz")
    md5sums=('2a81a86cfa80a920a5454dd00fad2e1d')
    build() {
    cd "${srcdir}/${pkgname}-${pkgver}"
    sed -r -i -e '5 a\AC_CONFIG_MACRO_DIR([m4])' configure.ac
    sed -r -i -e 's/(ACLOCAL_FLAGS =)/\1 -I m4/' Makefile.am
    sed -r -i -e 's/(LDADD =)/\1 -lm/' examples/Makefile.am
    sed -r -i -e 's/(Libs: .*)/\1 -lm/' gtkgl-2.0.pc.in
    libtoolize --copy --force
    autoreconf -vfi
    ./configure --prefix=/usr --with-lib-GL
    make
    package() {
    cd "${srcdir}/${pkgname}-${pkgver}"
    make DESTDIR="${pkgdir}" install
    # vim:set ts=2 sw=2 et:
    Remember to adjust the Maintainer tag if you adopt this one.
    I built and tested successfully gtkglarea and fsv2.

  • PKGBUILD for a bzr project (pacman 4.1 format) [SOVLED]

    I am trying to modernize ufw-brz but am running into a wall on two issues:
    1) The 000 permissions of pkg seem be to tripping up makepkg:
    % makepkg -s
    copying staging/util.py -> build/lib/ufw
    copying staging/applications.py -> build/lib/ufw
    copying staging/parser.py -> build/lib/ufw
    running install_lib
    creating /scratch/ufw-bzr-new/pkg/ufw-bzr
    error: could not create '/scratch/ufw-bzr-new/pkg/ufw-bzr': Permission denied
    ==> ERROR: A failure occurred in build().
    Aborting...
    2) When I attempt to re-run makepkg, the method I am using to check out the bzr repo is not right as makepkg tells me:
    % makepkg -s
    ==> Making package: ufw-bzr 810-1 (Sun Apr 7 11:47:56 EDT 2013)
    ==> Checking runtime dependencies...
    ==> Checking buildtime dependencies...
    ==> Retrieving sources...
    ==> ERROR: /scratch/ufw-bzr-new/ufw is not a branch of https://code.launchpad.net/~jdstrand/ufw/trunk
    Aborting...
    Thanks for the suggestions.
    Working draft of PKGBUILD:
    # Maintainer: graysky <graysky AT archlinux DOT us>
    # Contributor: Bartłomiej Piotrowski <[email protected]>
    # Contributor: Jaroslav Lichtblau <[email protected]>
    # Contributor: Kessia 'even' Pinheiro <kessiapinheiro at gmail.com>
    # Contributor: Sorin Ionescu <[email protected]>
    pkgname=ufw-bzr
    _pkgname=ufw
    pkgver=810
    pkgrel=1
    pkgdesc="Uncomplicated and easy to use CLI tool for managing a netfilter firewall. Development branch."
    arch=('any')
    url="https://code.launchpad.net/~jdstrand/ufw/trunk"
    license=('GPL3')
    depends=('iptables' 'python2')
    makedepends=('bzr')
    provides=('ufw')
    conflicts=('ufw')
    backup=('etc/ufw/before.rules'
    'etc/ufw/before6.rules'
    'etc/ufw/after.rules'
    'etc/ufw/after6.rules'
    'etc/ufw/ufw.conf'
    'etc/ufw/user.rules'
    'etc/ufw/sysctl.conf'
    'etc/default/ufw'
    'usr/lib/ufw/user.rules'
    'usr/lib/ufw/user6.rules')
    source=("$_pkgname::bzr+https://code.launchpad.net/~jdstrand/$_pkgname/trunk"
    "$_pkgname.service")
    sha256sums=('SKIP'
    'fdface6f4690e4748fbbd5661c02e1967a8750fdb23581d35516174017a3fe39')
    pkgver() {
    cd "$_pkgname"
    bzr revno
    prepare() {
    cd "$_pkgname"
    # FS#28769 - move from /lib to /usr/lib
    sed -e 's|/lib|/usr/lib|' -i setup.py
    build() {
    cd "$_pkgname"
    python2 setup.py install --root=$pkgdir
    package() {
    cd "$_pkgname"
    install -Dm644 $srcdir/$_pkgname.service $pkgdir/usr/lib/systemd/system/$_pkgname.service
    install -Dm755 $pkgdir/usr/sbin/$_pkgname $pkgdir/usr/bin/$_pkgname
    rm -rf $pkgdir/usr/sbin
    chmod 644 $pkgdir/etc/ufw/*.rules $pkgdir/usr/lib/ufw/*.rules
    Last edited by graysky (2013-04-07 20:15:57)

    @Scimmia - OK.  Issue #1 is solved; good suggestion.  As to issue #2, I must a moron.  What am I missing:
    % diff -u ../old/PKGBUILD PKGBUILD
    --- ../old/PKGBUILD 2013-04-07 15:26:18.557839507 -0400
    +++ PKGBUILD 2013-04-07 15:32:25.001894314 -0400
    @@ -26,7 +26,7 @@
    'etc/default/ufw'
    'usr/lib/ufw/user.rules'
    'usr/lib/ufw/user6.rules')
    -source=("$_pkgname::bzr+https://code.launchpad.net/~jdstrand/$_pkgname/trunk"
    +source=("$_pkgname::bzr+http://bazaar.launchpad.net/~jdstrand/$_pkgname/trunk"
    "$_pkgname.service")
    sha256sums=('SKIP'
    'fdface6f4690e4748fbbd5661c02e1967a8750fdb23581d35516174017a3fe39')
    Last edited by graysky (2013-04-07 19:33:47)

  • Help to create a pkgbuild for harpia

    hi i want to create a pkgbuild for the harpia program http://s2i.das.ufsc.br/harpia/en/home.html
    searching in the aur and in the net i couldn't find something
    harpia exist for ubuntu and the .deb file is hosted here http://packages.ubuntu.com/oneiric/all/harpia
    can someone help me create a working pkgbuild for arch through the .deb file
    i tried to create a first approach by creating the following PKGBUILD:
    pkgname=harpia
    pkgver=1.1
    pkgrel=1
    pkgdesc="Image Processing/Computer Vision Automatic Prgm. Tool"
    arch=('any')
    url="http://s2i.das.ufsc.br/harpia/en/home.html"
    license=('GPL2')
    depends=('')
    source=("http://archive.ubuntu.com/ubuntu/pool/universe/h/harpia/${pkgname}_${pkgver}-0ubuntu1.1_all.deb")
    md5sums=('56c6cb146ea5652e41b77506ad8ec263')
    build() {
    bsdtar -C "$pkgdir" -xvf data.tar.gz
    however when i am running the program i am taking the following error:
    Traceback (most recent call last):
    File "/usr/bin/harpia", line 32, in <module>
    from harpia import harpiagcfrontend
    ImportError: No module named harpia
    i guess that the problem might have to do with some dependencies or with the python library, can you provide me with some tips
    thanks

    Well, I'm not going to tell you every little thing .
    I found a likely candidate for python-gnome2 in pacman using a judicious choice of search terms. As for the rest, I suggest you go to the Debian or Ubuntu package lists. The Debian ones are easy to find in Google. These lists contain lots of information about what packages contain and what they provide and where the source code is from.
    Do some detective work, you will figure it out.

  • Requesting some changes for xen PKGBUILD to work with --enable-ovmf

    For background about this issue, you may want to read these two E-Mails to edk2 Mailing List:
    http://sourceforge.net/p/edk2/mailman/e … sg32776907
    http://sourceforge.net/p/edk2/mailman/e … sg32793684
    Basically, it goes like this:
    - Xen can be compiled with the optional --enable-ovmf option, so it can make DomU VMs using UEFI Firmware. Instructions here:
    http://wiki.xen.org/wiki/OVMF
    This can be done in Arch Linux by adding in the ./configure line of PKGBUILD --enable-ovmf, adding an additional step where makepkg downloads Source Code from edk2 repository.
    - Currently, it fails to build that way with this error:
    http://lists.xen.org/archives/html/xen- … 02855.html
    This error is caused because the edk2 Source Code that xen pulls during build is fresh and doesn't include any patch to make it aware that Arch Linux has both Python 3 (python) and Python 2 (python2). By default, it tries to compile with Python 3, so it fails.
    - Assuming than the Python version issue was fixed (I did it in a non-elegant way, replacing /usr/bin/python with /usr/bin/python2), it will still fail with this error:
    https://bugs.archlinux.org/task/40277
    https://aur.archlinux.org/packages/ovmf-svn/ (Some of the latest comments)
    This error is caused by building with GCC 4.9, earlier versions seems unaffected.
    The AUR has also a very similar package (If not identical) that is based on edk2 Source Code, the same which xen downloads while building, ovmf-svn:
    https://aur.archlinux.org/packages/ovmf-svn/
    This one has a PKGBUILD which includes some lines that seem to point that it is aware of both the python version issue, and the GCC 4.9 build issue, by providing a patch:
    https://aur.archlinux.org/packages/ov/ovmf-svn/PKGBUILD
    Reelevant lines seems to be these ones:
        msg "Fix GenFw: ERROR 3000: Invalid, Unsupported section alignment"
        patch -Np1 -i "${srcdir}/edk2-basetools-add-gcc4.9-support.patch" || true
        patch -Np1 -i "${srcdir}/edk2-ovmfpkg-add-gcc4.9-support.patch" || true
        msg "Use python2 for UDK BaseTools"
        sed 's|python |python2 |g' -i "${EDK_TOOLS_PATH}/BinWrappers/PosixLike"/* || true
        sed 's|python |python2 |g' -i "${EDK_TOOLS_PATH}/Tests/GNUmakefile"
    I didn't found any info regarding if Xen can work with OVMF ready-to-use binaries, or either building ovmf-svn, which I didn't tested but I suppose should build properly. All instructions regarding using Xen with OVMF request that it is added as option during build time. This forces me to have to modify the edk2 Source Code that xen downloads.
    Basically, what I want to request is if xen PKGBUILD can be modified to include a statement that checks if --enable-ovmf is being used, then make the appropriate changes to the edk2 Source Code that gets downloaded while building Xen so it successfully builds. This could *POSSIBILY* be based on existing ovmf-svn PKGBUILD code.
    This change could also be applied to other xen-based packages that can also be builded with --enable-ovmf and presents the same issues.

    FINALLY managed to get this thing working:
    http://i.imgur.com/ZWTRcn0.png
    I tried to build xen with --with-system-ovmf= as suggested like ten times or so, with no success. While xen seemed to build fine, when I tried to create a UEFI DomU, it simply opens and inmediately closes, through if using SeaBIOS worked fine. On xen IRC there was another Arch Linux user claiming that he recently got Xen with OVMF working using that parameter and the bios.bin binary from the ovmf-bin package from AUR. Installing ovmf-bin then providing xen the full path (--with-system-ovmf=/usr/share/ovmf/bios.bin) didn't worked, neither building ovmf-svn myself then using ovmf_x64.bin (Or renaming it to OVMF.fd, ovmf.bin, etc). It always builded perfectly, yet it failed to make a UEFI DomU. Still, both Firmwares worked when using qemu from the official Arch Linux repository (Note that ovmf-bin bios.bin is 1 MiB in size while ovmf-svn ovmf_x64.bin is 2 MiB, not sure what accounts for the difference).
    So how I got it working? A bit complex:
    - While in my first post I mention that ovmf-svn had a patch for GCC 4.9, it seems than the patch was removed in the last two days. Without the patch, ovmf-svn still builded properly, so I expected than the GCC 4.9 fix got included in edk2 Source Repository. This was blocking me earlier, so decided to give --enable-ovmf another go.
    - Renamed python2 to python as a workaround to not have to touch the edk2 tree that xen downloads, which worked the last time.
    - Used makepkg with --enable-ovmf in the PKGBUILD ./configure line. I expected it to work due what I mentioned earlier, but it still fails with the GCC 4.9's GenFw: ERROR 3000.
    - As a last resort measure, I decided to try to merge into xen the source that ovmf-svn PKGBUILD modifies, as that one builds properly.
    - I replaced all the directories inside xen/src/xen-4.4.1/tools/firmware/ovmf-dir-remote/ with the ones from ovmf-svn/src/tianocore-edk2-svn_build/. Not all directories were replaced, seems than ovmf-svn just downloads the parts of the tree required for building the OVMF Firmware, not everything, which xen does.
    - Used makepkg again, which used the existing source to try to build again.
    - It builded, no python or GenFw error. Installed the new package, rebooted, tried to make the UEFI DomU and BAM! There it is, as you can see in the Screenshot.
    Why can some users get this running with just providing bios.bin from ovmf-bin while I have to do a walk around the globe is anyone guess...
    To not derail this request further, I can say the following:
    - Assuming than --with-system-ovmf= works consistently, which for me didn't, is currently possible to build Xen with OVMF, so making a more complex PKGBUILD to be able to use --enable-ovmf may not be needed.
    - --enable-ovmf is still useful because it may reduce a two-step process (Installing ovmf-bin or building ovmf-svn) into one, through I'm not sure if there are pros/cons for each approach besides than you will have latest OVMF version compared to the ready-to-use binary. It also makes xen package more compatible with the mainstream Xen instructions, as  --with-system-ovmf= is quite unknow.
    These decisions are for kantras to make.
    Last edited by zir_blazer (2014-09-06 06:54:02)

  • Input on a PKGBUILD appreciated

    I found myself in need of a software package that were not in the repos nor in aur, but instead of
    just compile and be done with it I made it into a package, as practice.
    There are some issues that made it harder to package, for me:
    The source archive is a tarbomb, the template PKGBUILD recommends cd $srcdir/$pkgname-$pkgver
    and I assume it should be created by the source package? ...anyway it is not created in this instance.
    The makefile has no install option, copying has to be done by hand.
    There are some files provided for the user's benefit that do not fall into the bin/conf/doc categories (I put them in /usr/share/$pkgname)
    I've tried to adhere to the building standards etc, but in the above cases I am not sure I've made the correct choices,
    (in some cases the documentation was for cases not similar enough for this package, in some it was unclear if the statement was a suggestion
    or a requirement)
    The package is quite specialized, so I doubt I'll submit it to aur, but input would be welcome anyway.
    # Maintainer: Leo Bärring <[email protected]>
    pkgname=lifutils
    pkgver=1.4
    pkgrel=1
    pkgdesc="LIF Utilities"
    arch=(any)
    url="http://www.hpcc.org/datafile/hpil/lif_utils.html"
    license=('GPL')
    depends=(glibc)
    source=('http://www.hpcc.org/datafile/hpil/lifutils.tar.gz')
    md5sums=('c70ecf3f059e10333c8d79ec8bea14bd')
    build() {
    cd $srcdir
    make
    package() {
    cd $srcdir
    install -dm755 $pkgdir/usr/{bin,share/{$pkgname/{hardware,xroms},man/man{1,5}}}
    install -m755 -t $pkgdir/usr/bin \
    lifimage lifdump lifdir lifget lifaddhdr lifrmhdr \
    hptext sdata prog41 text75 regs41 stat41 key41 outp41\
    inp41 wall41 wcat41 in71 out71 lifstat sdatabar \
    barprt barps rom41 rom41cat prog41bar
    install -m644 hardware/* $pkgdir/usr/share/$pkgname/hardware
    install -m644 xroms/* $pkgdir/usr/share/$pkgname/xroms
    install -m644 manpages/*.1 $pkgdir/usr/share/man/man1
    install -m644 manpages/*.5 $pkgdir/usr/share/man/man5
    Last edited by tlvb (2011-01-30 06:58:07)

    [...editing...]
    Done and done. PKGBUILD above updated.
    I thought I should be able to use the -D flag to create the directories on the go as the files were copied, but no cigar.

  • Pkgbuild: rekall - kde db front-end (like ms access)

    I finally found some time to finish PKGBUILD for non-commercial version of rekall - a database front-end  similar to microsoft access. I built rekall with support for 3 types of databases:
    - postgresql
    - mysql
    - xbase/xbsql - dbf (dBase IV and Clipper) files
    Rekall also supports python scripting and it should work but I'm not a python programmer so I didn't try it :-). I built rekall with kde gui. It's theoretically possible to build it only with qt and without kdelibs but it is not advised (broken, too old, etc.)
    It is also possible to build OS odbc proxy support (for accessing other databases from windows hosts for conversion, etc.) for this version of rekall but I didn't have time to test it and to build more packages. Check this page if you want to try it too http://www.rekallrevealed.org/toplevel/ … vers.shtml. Commercial version features are presented here http://www.thekompany.com/products/rekall/
    It would really be nice to have a precompiled package in some repository because it takes aaaaaages to compile it. Anybody?
    rekall PKGBUILD
    pkgname=rekall
    pkgver=2.2.0
    pkgrel=1
    pkgdesc="Mysql/Postgresql/dbf kde front-end with python scripting"
    url="http://www.rekallrevealed.org"
    makedepends=('postgresql' 'mysql' 'xbsql')
    depends=('python' 'kdelibs')
    source=(http://www.rekallrevealed.org/packages/$pkgname-$pkgver.tar.gz)
    md5sums=('cabba34f0392f4eca0373b9c0cf6b2cc')
    build() {
    cd $startdir/src/$pkgname-$pkgver
    ./configure --prefix=/opt/kde --with-gui=kde
    --enable-mysql
    --enable-pgsql
    --enable-xbase
    sed -i "/^GETVALUE/s/;//" $startdir/src/$pkgname-$pkgver/libs/kbase/kb_options.cpp
    sed -i "/Q_OBJECT/s/;//" $startdir/src/$pkgname-$pkgver/libs/kbase/kb_draglist.h
    sed -i "/Q_OBJECT/s/;//" $startdir/src/$pkgname-$pkgver/libs/kbase/kb_optionsdlg.h
    sed -i "s/-pedantic//" $startdir/src/$pkgname-$pkgver/libs/extra/Makefile
    sed -i "s/-pedantic//" $startdir/src/$pkgname-$pkgver/libs/kdeplugins/Makefile
    sed -i "s/-pedantic//" $startdir/src/$pkgname-$pkgver/db/mysql/Makefile
    sed -i "s/-pedantic//" $startdir/src/$pkgname-$pkgver/db/pgsql/Makefile
    sed -i "s/-pedantic//" $startdir/src/$pkgname-$pkgver/db/xbase/Makefile
    sed -i "s/-pedantic//" $startdir/src/$pkgname-$pkgver/script/python/Makefile
    sed -i "s/-pedantic//" $startdir/src/$pkgname-$pkgver/script/python/stub/Makefile
    sed -i "s/-pedantic//" $startdir/src/$pkgname-$pkgver/parts/table2/Makefile
    sed -i "s/-pedantic//" $startdir/src/$pkgname-$pkgver/parts/form/Makefile
    sed -i "s/-pedantic//" $startdir/src/$pkgname-$pkgver/parts/report/Makefile
    sed -i "s/-pedantic//" $startdir/src/$pkgname-$pkgver/parts/query/Makefile
    sed -i "s/-pedantic//" $startdir/src/$pkgname-$pkgver/parts/copier/Makefile
    sed -i "s/-pedantic//" $startdir/src/$pkgname-$pkgver/parts/component/Makefile
    sed -i "s/-pedantic//" $startdir/src/$pkgname-$pkgver/parts/editor/Makefile
    sed -i "s/-pedantic//" $startdir/src/$pkgname-$pkgver/parts/macro/Makefile
    sed -i "s/$(LN_S) $(kde_libs_htmldir)/$(LN_S) /opt/kde/share/doc/HTML/"
    $startdir/src/$pkgname-$pkgver/doc/rekall/Makefile
    make || return 1
    make prefix=$startdir/pkg/opt/kde install
    I put postgresql, mysql and xbsql as makedependencies only. I tried running rekall without mysql and xbase/xbsql installed and It seems that it can run without them fine - just complains that libs can't be found when you try to connect to mysql database for example.
    xbase PKGBUILD
    pkgname=xbase
    pkgver=2.0.0
    pkgrel=1
    pkgdesc="Library for accessing dBase .dbf, .ndx, .dbt, and Clipper .ntx files"
    url="http://www.rekallrevealed.org/toplevel/getting/source.shtml"
    depends=('gcc' 'bash')
    install=xbase.install
    source=(http://www.rekallrevealed.org/packages/$pkgname-$pkgver.tgz)
    md5sums=('f3a65965af6bda221c89b2f3e1d24bb0')
    build() {
    cd $startdir/src/$pkgname-$pkgver
    ./configure --prefix=/usr --enable-static
    make || return 1
    sed -i "s//usr/bin/install//bin/install/g"
    $startdir/src/$pkgname-$pkgver/Makefile
    sed -i "s//usr/bin/install//bin/install/g"
    $startdir/src/$pkgname-$pkgver/bin/Makefile
    sed -i "s//usr/bin/install//bin/install/g"
    $startdir/src/$pkgname-$pkgver/docs/Makefile
    sed -i "s//usr/bin/install//bin/install/g"
    $startdir/src/$pkgname-$pkgver/examples/Makefile
    sed -i "s//usr/bin/install//bin/install/g"
    $startdir/src/$pkgname-$pkgver/html/Makefile
    sed -i "s//usr/bin/install//bin/install/g"
    $startdir/src/$pkgname-$pkgver/libtest/Makefile
    sed -i "s//usr/bin/install//bin/install/g"
    $startdir/src/$pkgname-$pkgver/tv/Makefile
    sed -i "s//usr/bin/install//bin/install/g"
    $startdir/src/$pkgname-$pkgver/xbase/Makefile
    make DESTDIR=$startdir/pkg install
    I'm not sure if install is really needed - it only runs ldconfig - I just followed rpm specs for other distros.
    xbase.install
    # arg 1: the new package version
    post_install() {
    /sbin/ldconfig
    # arg 1: the new package version
    # arg 2: the old package version
    post_upgrade() {
    /sbin/ldconfig
    # arg 1: the old package version
    pre_remove() {
    /bin/true
    # arg 1: the old package version
    post_remove() {
    /sbin/ldconfig
    op=$1
    shift
    $op $*
    xbsql PKGBUILD
    pkgname=xbsql
    pkgver=0.11
    pkgrel=1
    pkgdesc="An SQL wrapper for xbase"
    url="http://www.rekallrevealed.org/toplevel/getting/source.shtml"
    depends=('xbase' 'readline')
    source=(http://www.rekallrevealed.org/packages/$pkgname-$pkgver.tgz)
    md5sums=('7f8c8584cf0f592660fb2653a4bfc415')
    build() {
    cd $startdir/src/$pkgname-$pkgver
    ./configure --prefix=/usr
    make || return 1
    make DESTDIR=$startdir/pkg install
    If you find something that can be improved please post it here.

    being the redevelopment of the order processing modules (as described earlier).Where are these order processing modules? MS Access just stores the data. Where is the business logic to actually process the data, interface with other business systems, etc? If all that is in Access or MS-related components too, I would stand by my earlier recommendation. You dont just "inject" HTML DB as just a front-end development platform/language, like you do for example PHP, Perl or whatever.
    Given that you would like to migrate the entire system over to Oracle eventually, I think starting with the front-end is a little backwards. I would suggest using data migration tools like the Oracle Migration Workbench and stuff to migrate your data over to Oracle first and then build your HTML DB application on top of it.
    Thanks.

  • X cursors pkgbuilds: animated tux and more...

    Ok. So I asimilated tux'n'tosh icons http://www.sadeem.net/tux.html to my xfce panel. They look good.  But I also found this animated and fun tux cursor.
    Pkgbuild and install file:
    pkgbuild:
    pkgname=xserver-tuxcursor
    pkgver=0.4
    pkgrel=1
    pkgdesc="Animated Tux cursor theme for x-server"
    url="http://www.kde-look.org/content/show.php?content=5376"
    depends=('x-server')
    install=xserver-tuxcursor.install
    source=(http://www.kde-look.org/content/files/5376-tuxresize.tar.gz)
    md5sums=('b43b0193cca54cb6477db560110d56ef')
    build() {
    cd $startdir/src
    install -d -m755 $startdir/pkg/usr/share/icons/tuxcursor/cursors
    cp -R tuxcursor/cursors/* $startdir/pkg/usr/share/icons/tuxcursor/cursors
    install file:
    # arg 1: the new package version
    post_install() {
    cat << END
    tuxcursor theme is now installed in
    /usr/share/icons/tuxcursor
    To use it add the following line:
    Xcursor.theme: tuxcursor
    to your ~/.Xdefaults or ~/.Xresources
    To change cursor size add another line
    like this:
    Xcursor.size: 32
    Tuxcursor theme supports 32, 48 and 64
    (default with max detail) cursor sizes.
    If the cursor is flickering and you are
    using nvidia drivers you can add
    Option "HWCursor" "false"
    to your nvidia device section. This will
    turn off hardware cursor accelleration
    and cursor should stop flickering when idle.
    This may result in a little more cpu usage
    and less smooth cursor animation during
    high system load - the choice is up to you...
    END
    # arg 1: the new package version
    # arg 2: the old package version
    post_upgrade() {
    /bin/true
    # arg 1: the old package version
    pre_remove() {
    /bin/true
    # arg 1: the old package version
    post_remove() {
    cat << END
    If tuxcursor theme was your default cursor
    theme remember to change it to another one
    or core x-server theme.
    END
    I'm also posting pkgbuilds for more nice x cursor themes in separate posts below in this thread.
    All pkgbuilds use /usr/share/icons that should be quite neutral (according to man Xcursor) and do not change anything in default X package settings. Base usage instructions are included in install files.
    I din't have time to use and play with all of these themes so any suggestions, bug reports, etc. are welcome.

    pkgbuild:
    pkgname=xserver-crystalcursor
    pkgver=0.9
    pkgrel=1
    pkgdesc="Crystal cursor theme for x-server"
    url="http://www.kde-look.org/content/show.php?content=6240"
    depends=('x-server')
    install=xserver-crystalcursor.install
    source=(http://digilander.libero.it/m4rt/files/Crystalcursors.tar.bz2)
    md5sums=('bb97e94f4d8fd4c76901e90d1e188400')
    build() {
    cd $startdir/src/Crystalcursors
    make || return 1
    sed -i "s/$(HOME)/../gi" ./Makefile
    sed -i "s/cp -f/#/" ./Makefile
    sed -i "s/$(HOME)/../gi" ./blue_src/Makefile
    sed -i "s/$(HOME)/../gi" ./green_src/Makefile
    sed -i "s/$(HOME)/../gi" ./gray_src/Makefile
    sed -i "s/$(HOME)/../gi" ./white_src/Makefile
    sed -i "s/$(HOME)/../gi" ./blue_src_left/Makefile
    sed -i "s/$(HOME)/../gi" ./green_src_left/Makefile
    sed -i "s/$(HOME)/../gi" ./gray_src_left/Makefile
    sed -i "s/$(HOME)/../gi" ./white_src_left/Makefile
    sed -i "s/$(HOME)/../../gi" ./blue_src/nonanim/Makefile
    sed -i "s/$(HOME)/../../gi" ./green_src/nonanim/Makefile
    sed -i "s/$(HOME)/../../gi" ./gray_src/nonanim/Makefile
    sed -i "s/$(HOME)/../../gi" ./white_src/nonanim/Makefile
    sed -i "s/$(HOME)/../../gi" ./blue_src_left/nonanim/Makefile
    sed -i "s/$(HOME)/../../gi" ./green_src_left/nonanim/Makefile
    sed -i "s/$(HOME)/../../gi" ./gray_src_left/nonanim/Makefile
    sed -i "s/$(HOME)/../../gi" ./white_src_left/nonanim/Makefile
    sed -i "s/$(HOME)/../../gi" ./blue_src/classic/Makefile
    sed -i "s/$(HOME)/../../gi" ./green_src/classic/Makefile
    sed -i "s/$(HOME)/../../gi" ./blue_src_left/classic/Makefile
    sed -i "s/$(HOME)/../../gi" ./green_src_left/classic/Makefile
    make install
    cd $startdir/src/Crystalcursors/.icons
    install -d -m755 $startdir/pkg/usr/share/icons
    rm -rf ./default
    cp -R * $startdir/pkg/usr/share/icons
    install file:
    # arg 1: the new package version
    post_install() {
    cat << END
    Crystalcursor themes are now installed in
    /usr/share/icons
    To see what theme names are available run
    ls /usr/share/icons/crystal*
    To use a given theme add the following line:
    Xcursor.theme: cursor_subdirectory_name_here
    to your ~/.Xdefaults or ~/.Xresources
    Replace cursor_directory_name_hare with
    the theme name for example:
    Xcursor.theme: crystalblue
    To change default cursor size add
    another line like this:
    Xcursor.size: 32
    END
    # arg 1: the new package version
    # arg 2: the old package version
    post_upgrade() {
    /bin/true
    # arg 1: the old package version
    pre_remove() {
    /bin/true
    # arg 1: the old package version
    post_remove() {
    cat << END
    If crystalcursor theme was your default cursor
    theme remember to change it to another one
    or core x-server theme.
    END
    op=$1
    shift
    $op $*

  • Strange make error when script is started in PKGBUILD

    Hi
    I have an extremely strange error related to make when I tried to package the -git version of Open Watcom (v2 fork)
    https://aur.archlinux.org/packages/open_watcom-v2-git/
    When running makepkg -s, the build chokes on the following step:
    building wsplice in $srcdir/watcom/bld/wmake (Makefile: posmake)
    since this binary is not built, some headers are not generated and the build dies.
    Doing exactly the same thing as in the PKGBUILD "build()" outside of makepkg -s
    by cd-ing to $srcdir/watcom and running
    source setvars.sh
    ./build.sh
    works and stuff are building....
    Anyone got an idea what could be the issue?

    Trilby wrote:
    Can you provide the actual error output?
    Have you tried building manually as you describe after setting environment variables as specified in makepkg.conf?
    There is no actual error output where it actually goes wrong. This is the issue I opened before I noticed that the error only happened when I used makepkg:
    https://github.com/open-watcom/open-watcom-v2/issues/76
    The relevant part of the $srcdir/watcom/bld/wmake/posmake is this:
    wsplice: wsplice.o clibext.o
    $(CC) -g wsplice.o clibext.o -o $@
    usage.gh : ../h/usage.sp wsplice
    ./wsplice -kIS_RC -kENGLISH -f '{MSG_USAGE_BASE+%#%+, "%s"},' ../h/usage.sp -o "%n%n%n%n" $@
    usageend.gh: usage.gh wsplice
    ./wsplice -f "%+" usage.gh -o "#define MSG_USAGE_LAST (MSG_USAGE_BASE+%#)%n" $@
    cretype : ../c/cretype.c
    $(CC) -o $@ $?
    If I build with makepkg -s (invoking "source setvars.sh" and "./build.sh" inside PKGBUILD), this happens:
    rm -f *.o *.gh
    cc -g -O2 -I../h -I../../watcom/h -I../../lib_misc/h -I. -D__LINUX__ -D__UNIX__ -DUNIX -Uunix -DBOOTSTRAP -c ../../builder/c/wsplice.c
    cc -g -O2 -I../h -I../../watcom/h -I../../lib_misc/h -I. -D__LINUX__ -D__UNIX__ -DUNIX -Uunix -DBOOTSTRAP -c ../../watcom/c/clibext.c
    cc -o cretype ../c/cretype.c
    cc -g -O2 -I../h -I../../watcom/h -I../../lib_misc/h -I. -D__LINUX__ -D__UNIX__ -DUNIX -Uunix -DBOOTSTRAP -c ../c/macros.c
    In file included from ../c/macros.c:49:0:
    ../h/mrcmsg.h:245:23: fatal error: usageend.gh: No such file or directory
    #include "usageend.gh"
    ^
    compilation terminated.
    ../posmake:16: recipe for target 'macros.o' failed
    If I do exactly the same thing outside of makepkg (manually "source setvars.sh" and "./build.sh"), I get this:
    rm -f *.o *.gh
    cc -g -O2 -I../h -I../../watcom/h -I../../lib_misc/h -I. -D__LINUX__ -D__UNIX__ -DUNIX -Uunix -DBOOTSTRAP -c ../../builder/c/wsplice.c
    cc -g -O2 -I../h -I../../watcom/h -I../../lib_misc/h -I. -D__LINUX__ -D__UNIX__ -DUNIX -Uunix -DBOOTSTRAP -c ../../watcom/c/clibext.c
    cc -g wsplice.o clibext.o -o wsplice
    ./wsplice -kIS_RC -kENGLISH -f '{MSG_USAGE_BASE+%#%+, "%s"},' ../h/usage.sp -o "%n%n%n%n" usage.gh
    ./wsplice -f "%+" usage.gh -o "#define MSG_USAGE_LAST (MSG_USAGE_BASE+%#)%n" usageend.gh
    ./cretype > isarray.gh
    cc -g -O2 -I../h -I../../watcom/h -I../../lib_misc/h -I. -D__LINUX__ -D__UNIX__ -DUNIX -Uunix -DBOOTSTRAP -c ../c/macros.c
    cc -g -O2 -I../h -I../../watcom/h -I../../lib_misc/h -I. -D__LINUX__ -D__UNIX__ -DUNIX -Uunix -DBOOTSTRAP -c ../c/main.c
    cc -g -O2 -I../h -I../../watcom/h -I../../lib_misc/h -I. -D__LINUX__ -D__UNIX__ -DUNIX -Uunix -DBOOTSTRAP -c ../c/massert.c
    cc -g -O2 -I../h -I../../watcom/h -I../../lib_misc/h -I. -D__LINUX__ -D__UNIX__ -DUNIX -Uunix -DBOOTSTRAP -c ../c/mautodep.c
    cc -g -O2 -I../h -I../../watcom/h -I../../lib_misc/h -I. -D__LINUX__ -D__UNIX__ -DUNIX -Uunix -DBOOTSTRAP -c ../c/mautoomf.c
    (and so on...)
    Thanks to your suggestion, I also tried the manual method above but also with "source /etc/makepkg.conf" (and checked with echo that the variables were defined)
    This gives exactly the same output as my previous attempt to manually build, so this is not the issue...

  • Handling .deb files in PKGBUILDs [Solved]

    Hi,
    I am looking for a package that uses .deb files, want to check out how to extract .debs
    Anyone know of a PKGBUILD that uses them or a way of extracting .debs ?
    Thanks

    deb2targz is the usual suggestion - it's in community. AFAIR, a .deb is an ar archive, with a tarball (or two) inside it, if you prefer to do it by hand.

  • 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?

Maybe you are looking for

  • Is it possible to close all apps in one one click?

    Is there a simpler way of closing all apps on your iphone than doube-clicking the home button and then closing each one individually? I don't see a "close all apps" option anywhere.  Sometimes I find myself with 20 apps open all at once and it's tedi

  • How to build a search engine in the database?

    Hi there, say I have 3 tables: 1. Table_empl: idEmpl, fname, lname, dob... 2. table_department: idDpartment, idEmpl, departmentName, section... 3. table_fligths: idFlight, idEmapl, departure date, destination, carrier...I would like to provide the en

  • Parallel and Mac - can it work

    Hi, I just bought a new 21.7 brand new imac and encountered several difficulties. So, any assistance will be very appreciated! I have to mention that I am (used to be???) a heavy office/PC user. So, here are my initial questions (I'm sure I'll have m

  • RFC adapter as a sender

    Hi All, I have gone through the weblog /people/shabarish.vijayakumar/blog/2006/03/28/rfc--xi--webservice--a-complete-walkthrough-part-2 in this weblog CALL FUNCTION 'Z_WEBSERVICE_TEST_SHABZ' <b>destination 'Z_WEBSERVICE'</b>  EXPORTING FROMZIP       

  • LiveType Crashes Previewing Certain Effect  - lib3ivxEnc.dylib

    Hi, I've used LiveType before (with FCE) and have now installed FCS2 (with FCP 6, LT 2.1.3 etc.). However, poking around the LiveType text effects - the application always crashes on me when previewing certain effects. For example if I launch the app