[SCRIPT]: Build AUR Packages With Ease

I just started to use Arch, and coming from Ubuntu/Debian, it was a bit of a shock, but Arch does grow on you.  One of it's strengths is the AUR.  When I first found out about it, I was all like, "HOLY $#!% ITS MACPORTS FOR LINUX."  Turns out is isn't quite as easy to use, but it works.  Walking into Arch, the only languages I was comfortable writing code in were C/Objective-C.  Tonight I learned a little bash and wrote this wrapper around makepkg.  Tell me what you think.  The only thing missing that I can think of is dependency resolving, but I didn't want to put in the work for that just yet.
#! /bin/bash
ROOT=`pwd`
BUILDDIR=pkgbuild
NAME=$2
PREFIX=`expr ${NAME:0:2}`
URL=http://aur.archlinux.org/packages/$PREFIX/$NAME/$NAME.tar.gz
echo Package URL is $URL
setup() {
mkdir -p $BUILDDIR/$NAME
cd $BUILDDIR
download() {
curl $URL | gunzip | tar -x
cd $NAME
build() {
makepkg -s 1>/dev/null
install() {
makepkg -si 1>/dev/null
clean() {
cd $ROOT/$BUILDDIR
rm -rf $NAME
allclean() {
cd $ROOT
rm -rf $BUILDDIR
case $1 in
install)
setup
download
install
build)
setup
download
build
clean)
clean
allclean)
allclean
echo "Usage:"
echo $0 "{install|build|clean|allclean} <package>"
esac
Here is the command syntax:
Usage:
./archpkg {install|build|clean|allclean} <package>
Last edited by Relish (2012-01-16 05:31:33)

karol wrote:
Relish wrote:Here are the command synaptics:
I think you mean 'command syntax' :-)
You can try to get the BUILDDIR from makepkg.conf.
Yes
I can't seem to find that entry in makepkg.conf.

Similar Messages

  • [SOLVED] How to install AUR packages with patchname.patch

    Hi all,
    I'm trying to install lottanzb from the AUR and there's are a dependency called par2cmdline 0.4-13 that has a lot of nameofpatch.patch that are included in the AUR par2cmdline 0.4-13 package page that just open up to a url that shows code.
    I created patch files from the code displayed in the url with a text editor and added them to the extracted LOTTANZB folder in my build directory but when I go to build the package with PKGBUILD it runs through a check sum while building and the checks don't match.
    I'm obviously doing something fundamentally wrong here. Can someone direct me?
    Thanks,
    Last edited by bennylb0 (2010-05-28 13:30:16)

    Hi, thanks for reply.
    Sorry, my mistake.
    I did place patch files inside the par2cmdline-0.4 folder. The only reason I created the .patch files and placed them inside par2cmdline-0.4 folder was because the PKGBUILD as well as the other 5 .patch files didn't exist inside the extracted build folder. They only place I could find them was in AUR par2cmdline-0.4 displayed as a url.
    When I copied and created the PKGBUILD as it did not exist inside the extracted folder par2cmdline-0.4 folder I received the following error:- 
    Error autoconf.patch was not found in the build directory and is not a url. That along with 4 others do not exist in the build directory.
    You can see this bellow:-
    [ben@ben par2cmdline-0.4]$ makepkg
    ==> Making package: par2cmdline 0.4-13 i686 (Fri May 28 22:08:21 EST 2010)
    ==> Checking Runtime Dependencies...
    ==> Checking Buildtime Dependencies...
    ==> Retrieving Sources...
      -> Downloading par2cmdline-0.4.tar.gz...
    --2010-05-28 22:08:23--  http://downloads.sourceforge.net/source … 0.4.tar.gz
    Resolving downloads.sourceforge.net... 216.34.181.59
    Connecting to downloads.sourceforge.net|216.34.181.59|:80... connected.
    HTTP request sent, awaiting response... 301 Moved Permanently
    Location: http://downloads.sourceforge.net/projec … 0.4.tar.gz [following]
    --2010-05-28 22:08:23--  http://downloads.sourceforge.net/projec … 0.4.tar.gz
    Reusing existing connection to downloads.sourceforge.net:80.
    HTTP request sent, awaiting response... 302 Found
    Location: http://transact.dl.sourceforge.net/proj … 0.4.tar.gz [following]
    --2010-05-28 22:08:24--  http://transact.dl.sourceforge.net/proj … 0.4.tar.gz
    Resolving transact.dl.sourceforge.net... 202.55.147.10
    Connecting to transact.dl.sourceforge.net|202.55.147.10|:80... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 239312 (234K) [application/x-gzip]
    Saving to: "par2cmdline-0.4.tar.gz.part"
    100%[===================================================>] 239,312      179K/s   in 1.3s   
    2010-05-28 22:08:26 (179 KB/s) - "par2cmdline-0.4.tar.gz.part" saved [239312/239312]
    ==> ERROR: par2cmdline-0.4-autoconf.patch was not found in the build directory and is not a URL.

  • Craete AUR package with no url in PKGBUILD ?

    Hi.
    I am trying to create a package for AUR.
    The package is just a script installed to /usr/local/bin
    it has no url as the script is included (as source)
    how can I create a package with no 'url' - when I try to upload to AUR is says I needed a url section
    I created one with
    url=()
    but then I get (when submitting package)
    'Package URL is missing a protocol (ie. http:// ,ftp://)'
    Can anyone help upload an AUR package (with no ur) ?
    Cheers !

    Just open a thread here for the package and link it in the PKGBUILD, like this package:
    https://aur.archlinux.org/packages.php?ID=41689
    UPDATE - Sorry, not that one, that is recursive
    This one is a better example:
    https://aur.archlinux.org/packages.php?ID=32483
    Last edited by SanskritFritz (2011-11-12 20:12:28)

  • How to use single ant build to package with and without native extensions

    Hi,
    I am using iOS native extensions for Adobe air. For this I am listing the extensionid in the application descriptor file. Since the package with native extensions are meant to run only on device, I want my build script to work without native extensions too to be able to run on simulator. Is this manadatory that I need two separate application descriptors/basically two build scripts to compile and package them? Please suggest and let me know if more explanation is needed.
    Thanks,
    Swathi.

    why are you wanting to use single frames?
    They allow having the initial frame address stay in the
    address bar, and not
    show the linked page's address. The problems they cause
    usually override any
    value.
    Or- if we aren't using the same words the same way, please
    give an example
    site of what you want to do.
    Alan
    Adobe Community Expert, dreamweaver
    http://www.adobe.com/communities/experts/

  • How to build a package with a hyphen

    Hi guys,
    Im trying to make my own wine 1.0-rc1
    Ive tried just changing the pkgver but i get
    ERROR: pkgver is not allowed to contain hyphens.
    so what is the preferred method of doing it?
    Thanks

    kumico wrote:i think the convention is to create a new variable called _pkgver with the real required pkgver, and set pkgver to one without the hyphen
    no it is not. Please be sure you've read the Arch packaging standards before commenting on such things.
    http://wiki.archlinux.org/index.php/Arch_Packaging_Standards wrote:Do not introduce new variables into your PKGBUILD build scripts, unless the package cannot be built without doing so, as these could possibly conflict with variables used in makepkg itself. If a new variable is absolutely required, prefix the variable name with an underscore (_)

  • How to build distribution package with Agilent VISA as primary

    Hi everybody,
         I build a distribution package under LW 8.0 in a PC(Agilent VISA is primary), then I install the distribution package in another PC.
    But I found the distribution package install NI VISA as primary in another PC. So How could I make Agilent VISA as primary when I build Distribution Package?
    Does anyone can help me?

    TaoZ,
    Does your application use both NI-VISA and Agilent VISA? NI-VISA is only functional as the primary VISA, so if you need to use both NI-VISA and Agilent VISA, Agilent VISA will need to be secondary. If you are using just Agilent VISA, then you should not need to install NI-VISA. If you already have NI-VISA installed on the system, then typically Agilent VISA will overwrite NI-VISA because they use higher version numbers than us, but this is not necessarily always the case. Which version of each driver are you working with?
    National Instruments
    Product Support Engineer

  • [solved] building a package with bjam

    Hello all,
    I'm trying to figure out how to create a package that builds with bjam. When I build the package manually, I only need to run
    ./bjam --prefix=/usr --with-feature1 --with-feature2 ...etc
    and the binaries are created correctly. I need to use "./bjam" because the project supplies its own version of bjam to reassure compatibility with its code.
    When I use the same command inside the PKGBUILD, compilation starts fine and in the end I get an error in the build() function, without further explanations.
    Since I'm not at all familiar with bjam, can anyone point me to some sample PKGBUILDs or give me some tips how to create the PKGBUILD?
    TIA
    EDIT: It seems no special procedure is needed. The problem occurs due to a failure in the bjam build which forces makepkg to abort.
    Last edited by panosk (2012-09-10 19:35:29)

    The pkgtools package will do this for you.
    See https://wiki.archlinux.org/index.php/Pkgtools for instructions on how to set it up.
    Last edited by szim90 (2011-08-03 14:25:58)

  • Abs yaourt building aur packages really slow +15 niceness

    Help, this is probley a easy fix im missing. now when i build firefox pgo beta and any other aur package all the processes are +15 niceness so building never seems to finish. . can any of you think what i may have broke?
    im dong yaourt -S pakage-name
    just like i always have

    i found the answer else where, its the mozconfig file http://aur.archlinux.org/packages.php?ID=22919

  • Building CS5 package with AAMEE

    I am trying to build a CS5 master collection deployment package for use with the Casper suite using AAMEE 2.1 on the Mac OS 10.6 and 10.7 systems.
    The build begins, but then ends with an error message.
    The log of the error looks like this:
    [ERROR] AdobePackageBuilder - OS ErrMsg : Failed to copy object. ErrorCode (-128) ErrorString (userCanceledErr:).
    [ERROR] AdobePackageBuilder - Aborted the copy operation.
    [FATAL] AdobePackageBuilder - Error Failed to copy the contents of the folder.
    [ERROR] AdobePackageBuilder - Failed to copy Payload folder (AdobeGermanSpeechAnalysisModels2All)
    This occurs when trying to build the package from the installation disks.
    If I try to copy the disks to my computer first, some of the payload files won't copy from the disk.
    Any suggestions for overcoming these issues?

    Hi,
         Can you give us some more information on what you are doing:
    - Are you using the same machine to mount the disks and creating the package?
    - What is the error you are receiving when you are trying to copy the disks in your computer?
    Also, please send me PDApp.log and PackageBuilder Log so that we can have a lead.
    Thanks,
    Abhishek | [email protected]

  • Download all your AUR packages with a script

    Here's a little quickie that will download all your scripts to the current working directory.  Uses ruby and requires the hpricot gem.  Also requires cower, install it from the AUR.  This is still pretty early, so it isn't very robust, but as long as you provide it with a valid username and the current directory is empty, you're good
    #!/usr/bin/env ruby
    require 'open-uri'
    require 'hpricot'
    abort "Usage: " + File.basename(__FILE__) + " username\n" if $*.count != 1
    sourceHtml = Hpricot(open("http://aur.archlinux.org/packages.php?O=0&K=#{$*[0]}&do_Search=Go&detail=0&C=0&SeB=m&SB=v&SO=d&PP=10000"))
    packages = sourceHtml.search("//a[@href^='packages.php?ID=']/span/text()").map { |package| package.to_s.sub(/ .*/, '') }
    packages.sort.each { |package| puts `cower -d #{package}` }
    Three lines of code for the grunt work.  Amazing, isn't it?

    It is much shorter when you use the rpc interface.
    username=xduugu; curl -Ss 'https://aur.archlinux.org/rpc.php?type=msearch&arg='"$username" | sed 's/},{/\n/g' | sed -r 's#.*"URLPath":"([^"]+)".*#\1#g;s#\\/#/#g' | wget -B https://aur.archlinux.org/ -i -

  • Trouble building klibc package with Zen kernel

    Hello,
    I'm using a kernel from the latest Zen-Sources Git (in other words, a modified 2.6.29-rc). I'm trying to build klibc, but having trouble. I'm using the klibc PKGBUILD and files with only a slight modification to _kver to point to my kernel under /lib/modules.
    The build process goes until:
    KLIBCLD usr/utils/shared/sync
    KLIBCLD usr/utils/shared/dmesg
    INSTALL headers + man pages to /root/klibc/pkg/usr/lib/klibc
    cp: cannot stat 'linux//include/asm/./asm': No such file or directory
    make[1]: *** [header] Error 1
    make: *** [install] Error 2
    ==> ERROR: Build Failed.
    Aborting...
    The problem is in /src/klibc-1.5.15/scripts/Kbuild.install, near the end (under the big comment block). I won't post the code block because it's massive and I don't have copy+paste because of something unrelated, but you can get it from using ABS.
    I don't know if the problem is because of 2.6.29, zen, or something I'm doing. I tried disabling a few of the patches we used, and I looked at the patches in the (sort-of-outdated) klibc-zen package in the AUR, but none of those seem to be related at all.
    Thanks for any help!

    create symlink asm to asm-x86
    this is on 32-bit system,

  • [SOLVED] Transient prob, can't resolve host when building AUR packages

    I'm building xscreensaver-arch-logo from the AUR. I downloaded the PKGBUILD into an empty directory, ran
    makepkg -s
    , but I get this error:
    ==> Making package: xscreensaver-arch-logo 5.15-3 (Sat May 12 03:13:31 CDT 2012)
    ==> Checking runtime dependencies...
    ==> Checking buildtime dependencies...
    ==> Retrieving Sources...
    -> Downloading xscreensaver-5.15.tar.gz...
    Warning: Transient problem: timeout Will retry in 3 seconds. 3 retries left.
    Warning: Transient problem: timeout Will retry in 3 seconds. 2 retries left.
    Warning: Transient problem: timeout Will retry in 3 seconds. 1 retries left.
    curl: (6) Could not resolve host: www.jwz.org; No address associated with hostname
    ==> ERROR: Failure while downloading xscreensaver-5.15.tar.gz
    Aborting...
    My internet connection is working at the moment. I can download the tarball from the AUR (this link: https://aur.archlinux.org/packages.php?ID=26586), but if I place it in the same directory as the PKGBUILD file, I get this error when I run makepkg -s:
    ==> Making package: xscreensaver-arch-logo 5.15-3 (Sat May 12 03:18:59 CDT 2012)
    ==> Checking runtime dependencies...
    ==> Checking buildtime dependencies...
    ==> Retrieving Sources...
    -> Found xscreensaver-5.15.tar.gz
    ==> ERROR: add-electricsheep.diff was not found in the build directory and is not a URL.
    Any help here? I've read of the benefits of using this package over the one in the official repositories, so I'd prefer to use the AUR version if at all possible.
    Last edited by pythonscript (2012-05-27 16:05:26)

    I believe I did download the wrong source package for xscreensaver, but if I download the package from this link: https://aur.archlinux.org/packages/xs/x … ogo.tar.gz and extract it, these are the files I see.
    add-electricsheep.diff logo-180.png logo-50.png PKGBUILD
    LICENSE logo-180.xpm logo-50.xpm xscreensaver.pam
    That all appears correct. However, running makepkg -s in that directory yields the same error as the original post:
    ==> Making package: xscreensaver-arch-logo 5.15-3 (Fri May 11 23:11:01 CDT 2012)
    ==> Checking runtime dependencies...
    ==> Checking buildtime dependencies...
    ==> Retrieving Sources...
    -> Downloading xscreensaver-5.15.tar.gz...
    Warning: Transient problem: timeout Will retry in 3 seconds. 3 retries left.
    Warning: Transient problem: timeout Will retry in 3 seconds. 2 retries left.
    Warning: Transient problem: timeout Will retry in 3 seconds. 1 retries left.
    curl: (6) Could not resolve host: www.jwz.org; No address associated with hostname
    ==> ERROR: Failure while downloading xscreensaver-5.15.tar.gz
    Aborting...
    Also, I receive a highly similar error when building the dropbox package from the AUR, which hints to me that this is a wider problem than simply the xscreensaver package. When downloading the dropbox tar file (link to file: https://aur.archlinux.org/packages/dr/d … ox.tar.gz), extracting it and listing the directory yields this:
    dropbox.desktop dropbox.png PKGBUILD terms.txt
    However, the error upon running makepkg -s is similar.
    ==> Making package: dropbox 1.4.3-1 (Fri May 11 23:13:01 CDT 2012)
    ==> Checking runtime dependencies...
    ==> Checking buildtime dependencies...
    ==> Retrieving Sources...
    -> Downloading dropbox-lnx.x86-1.4.3.tar.gz...
    Warning: Transient problem: timeout Will retry in 3 seconds. 3 retries left.
    Warning: Transient problem: timeout Will retry in 3 seconds. 2 retries left.
    Warning: Transient problem: timeout Will retry in 3 seconds. 1 retries left.
    curl: (6) Could not resolve host: dl-web.dropbox.com; No address associated with hostname
    ==> ERROR: Failure while downloading dropbox-lnx.x86-1.4.3.tar.gz
    Aborting...

  • [solved] Can no longer untar AUR packages with tar xvf /directory/

    For about a year now I've used this line of code from my .bash_aliases file to untar files from their source directory to the one I am currently CDed in at that moment: 
    alias tarx='tar xvf' # extracts files from a tarball using tar [e]x[tract] v[erbose] f[orced]
    This alias failed to work a few weeks ago for some unknown reason and now spits out this error:
    tarx /media/aur/srcpackages/atom-editor.tar.gz ./
    tar: .: Not found in archive
    tar: Exiting with failure status due to previous errors
    Why on earth would this suddenly stop working.  I haven't changed my .bashrc file apart from some small comments but here it is in case I'm totally out of it:
    # ~/.bashrc
    # This file is sourced by all *interactive* bash shells on startup, #
    # including some apparently interactive shells such as scp and rcp #
    # that can't tolerate any output. So make sure this doesn't display #
    # anything or bad things will happen ! #
    # If not running interactively, don't do anything #
    [[ $- != *i* ]] && return
    # If the connection to the system is a remote connection 'ssh' will be #
    ## appended to the prompt. Otherwise the prompt will be displayed normally #
    # See: remote.colourful.prompt_how-to on /media/lynwyn/networking/ssh #
    # Default prompt from the above-named document: #
    # export PS1='\[\e[0;31m\]\u@\h:\w${text}$\[\e[m\]' # # #
    if [ -n "$SSH_CLIENT" ]; then text=":ssh:"
    fi
    # Alias definitions.
    # You may want to put all your additions into a separate file like
    # ~/.bash_aliases, instead of adding them here directly.
    # See /usr/share/doc/bash-doc/examples in the bash-doc package.
    if [ -f ~/.bash_aliases ]; then
    . ~/.bash_aliases
    fi
    ### [User Prompts]
    ### White Yunzi
    export PS1='\[\e[0;37m\]: \[\e[1;92m\]\W\[\e[0;37m\] :\[\e[m\] \[\e[0;37m\]'
    #### Silver Yunzi
    #export PS1='\[\e[0;37m\]: \[\e[1;94m\]\W\[\e[0;37m\] :\[\e[m\] \[\e[0;37m\]'
    ### Pink Yunzi
    #export PS1='\[\e[0;37m\]: \[\e[1;95m\]\W\[\e[0;37m\] :\[\e[m\] \[\e[1;95m\]'
    ### [Root Prompts]
    ### White Yunzi Root
    #export PS1='\[\e[1;37m\]:\[\e[1;92m\]\u\[\e[1;37m\]:\[\e[1;92m\]\W\[\e[1;37m\]:\[\e[m\] \[\e[0;37m\]'
    ### Silver Yunzi Root
    #export PS1='\[\e[0;37m\]:\[\e[1;94m\]\u\[\e[0;37m\]:\[\e[1;94m\]\W\[\e[0;37m\]:\[\e[m\]\[\e[0;37m\]'
    ### Pink Yunzi Root
    #export PS1='\[\e[0;37m\]:\[\e[1;95m\]\u\[\e[0;37m\]:\[\e[1;95m\]\W\[\e[0;37m\]:\[\e[m\] \[\e[0;37\]'
    ### * BASH options * ###
    ### Last edited January 2014 by H.L.
    # Bash won't get SIGWINCH if another process is in the foreground.
    # Enable checkwinsize so that bash will check the terminal size when
    # it regains control.
    # [check the window size after each command and, if necessary,
    # update the values of LINES and COLUMNS.]
    # http://cnswww.cns.cwru.edu/~chet/bash/FAQ (E11)
    shopt -s checkwinsize
    # automatically prepend cd when entering just a path in the shell
    shopt -s autocd
    # Enable history appending instead of overwriting.
    shopt -s histappend
    # for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
    HISTSIZE=10000
    HISTFILESIZE=20000
    ## erase duplicate entries in your history file
    ## and force Bash History to ignorespace
    export HISTCONTROL=erasedups:ignorespace
    # set variable identifying the chroot you work in (used in the prompt below)
    #if [ -z "$arch_chroot" ] && [ -r /etc/arch_chroot ]; then
    # debian_chroot=$(cat /etc/arch_chroot)
    #fi
    # make "less" more friendly for non-text input files, see lesspipe(1)
    [ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
    # TMUX
    # Put this this snippet BEFORE the aliases in .bashrc.
    # This code starts TMUX with only one session (unless you start some manually), on login;
    # it will try to attach to a currently running session.
    # If there isn't a currently running session then TMUX will create one.
    # if which tmux 2>&1 >/dev/null; then
    # if not inside a tmux session, and if no session is started start a new session
    # test -z "$TMUX" && (tmux attach || tmux new-session)
    # fi
    # environment variables using gedit and nano
    export EDITOR="$(if [[ -n $DISPLAY ]]; then echo 'gedit'; else echo 'nano'; fi)"
    ### Coloured man pages with explanations of colours in comments
    # Note to self: all of the colour & escape statements work ONLY by using double quote marks, e.g. " ... "
    ## Coloured man pages with explanations of colours in comments
    # 67: Primary colour for program names is Dark Green [old 80's CRT green!]
    # 68: Optional arguments and/or separate options for arguments is Bright Green
    # 69: Text Reset
    # 70: Text Reset
    # 71: man page info bottom of page is Dark Red on Black background (net effect is transparent background with red writing)
    # 72: Text Reset
    # 73: References to other programs (and their respective man page(s)) are Bright Yellow [good neutral yellow]
    man() {
    env LESS_TERMCAP_mb=$(printf "\e[1;31m") \
    LESS_TERMCAP_md=$(printf "\e[1;31m") \
    LESS_TERMCAP_me=$(printf "\e[0m") \
    LESS_TERMCAP_se=$(printf "\e[0m") \
    LESS_TERMCAP_so=$(printf "\e[1;44;33m") \
    LESS_TERMCAP_ue=$(printf "\e[0m") \
    LESS_TERMCAP_us=$(printf "\e[1;32m") \
    man "$@"
    ## To get a skin of your choice loaded instead of mc's default
    ## skin, you might consider the following solution:
    ## Multi-User: Create an alias for mc in your ~/.bashrc, like:
    if [ $TERM = "screen-256color" ]; then
    if [ $USER = "root" ]; then
    myMCSkin="modarcon16root-defbg"
    else
    myMCSkin="modarcon16-defbg"
    fi
    alias mc='mc --skin $myMCSkin'
    alias mcedit="mcedit --skin $myMCSkin"
    alias mcview="mcview --skin $myMCSkin"
    alias mcdiff="mcdiff --skin $myMCSkin"
    fi
    Last edited by MoonSwan (2014-07-09 04:31:06)

    I seem to have a larger problem on my desktop machine.  When I try to untar stuff on that one it creates a .cache directory for some weird reason and populates it with, I think, cached files from my home directory.  It ends up having firefox, mc and other cached files in the new directory and then tar just errors out with:
    gzip: stdin: unexpected end of file
    tar: Unexpected EOF in archive
    tar: Unexpected EOF in archive
    tar: Error is not recoverable: exiting now
    Very odd behaviour and I'm assuming some config file somewhere is responsible for this behaviour.  But where else can I look apart from .bashrc? 
    @ids1024, I'll do what you've what you suggested on my netbook later today and record the information to post afterward.
    [edit] Here are the contents of that .cache directory, if it helps:
    dconf event-sound-cache.tdb.silver_yunzi.x86_64-unknown-linux-gnu event-sound-cache.tdb.tengen.x86_64-unknown-linux-gnu fontconfig mc dmenu_run
    event-sound-cache.tdb.silveryunzi.x86_64-unknown-linux-gnu event-sound-cache.tdb.white_yunzi.x86_64-unknown-linux-gnu gstreamer-1.0 mozilla
    Last edited by MoonSwan (2014-06-28 19:57:10)

  • [SOLVED]I can build a package with "make install" but not with makepkg

    I'm quite new to Arch and it's my first PKGBUILD.
    I successfully built the software lhapdf http://www.hepforge.org/archive/lhapdf/ … 3.1.tar.gz with the traditional system:
    1) I do a patch for compatibility with gcc 4.3
    cd lhapdf-5.3.1
    sed -i "s/<string>/<cstring>/" ccwrap/test-lhapdf-ccwrap.cc
    and then
    ./configure --prefix=/usr
    make
    sudo make install
    Then I tried to write a PKGBUILD
    pkgname=lhapdf
    pkgver=5.3.1
    pkgrel=1
    pkgdesc="Unified and easy to use interface to modern PDF sets"
    arch=(i686 x86_64)
    url="http://projects.hepforge.org/lhapdf"
    license=('GPL')
    groups=()
    depends=()
    makedepends=()
    provides=()
    conflicts=()
    replaces=()
    backup=()
    options=()
    install=
    source=(http://www.hepforge.org/archive/lhapdf/$pkgname-$pkgver.tar.gz)
    noextract=()
    md5sums=() #generate with 'makepkg -g'
    build() {
    cd "$srcdir/$pkgname-$pkgver"
    #Change needed in order to compile with gcc 4.3
    sed -i "s/<string>/<cstring>/" ccwrap/test-lhapdf-ccwrap.cc
    ./configure --prefix=/usr
    make || return 1
    make DESTDIR="$pkgdir" install
    # vim:set ts=2 sw=2 et:
    and it doesn't work. The last lines of the output of makepkg are:
    g++ -march=nocona -O2 -pipe -o .libs/test-lhapdf-ccwrap test-lhapdf-ccwrap.o -L/home/cafarell/abs/lhapdf/src/lhapdf-5.3.1/ccwrap -L/home/cafarell/abs/lhapdf/src/lhapdf-5.3.1/src -lLHAPDFWrap /home/cafarell/abs/lhapdf/src/lhapdf-5.3.1/src/.libs/libLHAPDF.so -Wl,--rpath -Wl,/usr/lib
    /usr/bin/ld: cannot find -lLHAPDFWrap
    collect2: ld returned 1 exit status
    make[1]: *** [test-lhapdf-ccwrap] Error 1
    make[1]: *** Waiting for unfinished jobs....
    make[1]: Leaving directory `/home/cafarell/abs/lhapdf/src/lhapdf-5.3.1/ccwrap'
    make: *** [all-recursive] Error 1
    ==> ERRORE: Compilazione interrotta.
    L'operazione sta per essere interrotta...
    Any idea?
    Last edited by alcafar (2008-04-09 11:03:00)

    Thank you Snowman, it works with options=('!makeflags'). The changes in the paths were not needed, I copied them from /usr/share/pacman/PKGBUILD.proto, probably is some new feature.
    Now, I'd like to post the PKGBUILD to AUR. This is currently my PKGBUILD:
    # Contributor: My name <[email protected]>
    pkgname=lhapdf
    pkgver=5.3.1
    pkgrel=1
    pkgdesc="Unified and easy to use interface to modern PDF sets"
    arch=(i686 x86_64)
    url="http://projects.hepforge.org/lhapdf"
    license=('GPL')
    groups=()
    depends=(gcc-libs)
    makedepends=()
    provides=()
    conflicts=()
    replaces=()
    backup=()
    options=('!makeflags')
    install=
    source=(http://www.hepforge.org/archive/lhapdf/$pkgname-$pkgver.tar.gz)
    noextract=()
    md5sums=('df667840071996d2c58a125567be26b2')
    build() {
    cd "$srcdir/$pkgname-$pkgver"
    #Change needed in order to compile with gcc 4.3
    sed -i "s/<string>/<cstring>/" ccwrap/test-lhapdf-ccwrap.cc
    ./configure --prefix=/usr
    make || return 1
    make DESTDIR="$pkgdir" install
    # vim:set ts=2 sw=2 et:
    I have the following output from namcap:
    $ namcap lhapdf-5.3.1-1-x86_64.pkg.tar.gz
    lhapdf W: File (usr/lib/libLHAPDFWrap.la) is a libtool file.
    lhapdf W: File (usr/lib/libLHAPDF.la) is a libtool file.
    $ namcap PKGBUILD
    PKGBUILD (lhapdf) W: Missing Maintainer tag
    PKGBUILD (lhapdf) W: Missing CVS Id tag
    and this output from ldd
    $ ldd libLHAPDF.so
    linux-vdso.so.1 => (0x00007fff86dfe000)
    libgfortran.so.3 => /usr/lib/libgfortran.so.3 (0x00002b70367fe000)
    libm.so.6 => /lib/libm.so.6 (0x00002b7036ace000)
    libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00002b7036d52000)
    libc.so.6 => /lib/libc.so.6 (0x00002b7036f69000)
    /lib/ld-linux-x86-64.so.2 (0x0000555555554000)
    $ ldd libLHAPDFWrap.so
    linux-vdso.so.1 => (0x00007fffeeffe000)
    libLHAPDF.so.0 => not found
    libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00002b11bbd53000)
    libm.so.6 => /lib/libm.so.6 (0x00002b11bc060000)
    libc.so.6 => /lib/libc.so.6 (0x00002b11bc2e3000)
    libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00002b11bc636000)
    /lib/ld-linux-x86-64.so.2 (0x0000555555554000)
    What should I add to PKGBUILD?
    The program is in fortran, so I'm surprised that namcap did not add gcc-fortran in the dependencies. Should I add it to depends or makedepends? Or maybe it is included in gcc-libs?

  • Searching for AUR packages with "%" queries

    According to https://wiki.archlinux.org/index.php/AUR#Searching it is possible to use mysql LIKE queries to search for a package.  But I can't find packages if I use queries with "%".
    For example, when I try to search for firefox%spell or firefox%spell%, I get nothing.
    I expected those queries would return the same results as firefox-spell.
    The question is: do LIKE queries work (or do I use them wrong)?
    Last edited by alezost (2014-02-13 08:14:08)

    It's not working from the web iterface, but cower does a good job:
    ~ > cower -s firefox spell
    aur/firefox-spell-en-us 7.0.1-2 (3)
    English (US) spellchecking dictionary for Firefox.
    aur/firefox-spell-es-es 1.7-1 (2)
    Spanish (Spain) spellchecking dictionary for Firefox.
    aur/firefox-spell-es-mx 1.1.3-3 (0)
    Spanish (Mexico) spellchecking dictionary for Firefox.
    aur/firefox-spell-pt-br 2.1.1-1 <!> (3)
    Brazilian Portuguese language dictionary (spellcheker) for Firefox
    aur/firefox-spell-ru-en 1.0.0.1-8 <!> (10)
    Russian/English spellchecker dictionary for Firefox
    aur/mozvoikko 2.0.1-9 (4)
    Finnish spell-checker extension for Firefox/thunderbird/seamonkey using Voikko

Maybe you are looking for

  • Lenovo G460 - dead pixel, LCD can't be waken up from sleep/ hibernation , very hard to use Touchpad

    I got this unit as my birthday present last week. I was very happy about it, as i've been using Dell laptops for the past 6 years of my life, this is the very first time in my life that i'm getting a Lenovo laptop, and i gotta say i'm very disappoint

  • Verizon 9100EM Router - ARP Table No Longer Working

    I have the Westell 9100EM router from Verizon.  The router allows to set static DHCP connections using a function called ARP Table (under Advanced menu).  It actually used to work.  However, when I attempted to add a new static connection today, ARP

  • Pass-through recording with Canon ZR25

    I have an older Canon ZR25.  Is it capable of pass-through recording from a VCR?  I can plug the VCR to the camera, and the camera to the computer via the firewire, but can't get anything to work.  Is my only option to actually record the VCR tape on

  • Upgrading T61 NIC -- 4956agn (n-disable​d) -- to 802.11n

    I have a T61 7659-12U.  According to the Lenovo specs and what I see using Windows Device Manager, this -12U version of model 7659 comes with the Intel 4965agn wireless card (n-disabled).  I am therefore only able to use 802.11g wireless connections,

  • Xterm-256color + screen + mutt + vim = @£%&¡#!

    Sorry, I shouldn't be swearing in the subject line, I know, it's just that I've spending way too much time lately trying to get xterm with 256 colors to go nicely with mutt and vim through screen. It seems that no matter how I tweak the settings, in