PKGBUILD in Qt project

Hello everybody. I wanna create own package.
so i have folders /src and PKGBUILD
/src contain *.h *.cpp .pro, deployment.pri
Now i have PKGBUILD with that
# Maintainer:
# Contributor:
pkgname=chess
pkgver=0.1
pkgrel=0
pkgdesc="For curs project"
arch=(i686 x86_64)
url="no url"
license="GPL"
groups=
provides=Warezovvv
depends=('qt5-base')
makedepends=('')
#backup=('etc/chess/chess.conf')
#install=('chess.install')
#source=(http://www.foo.org/download/$pkgname-$pkgver.tar.gz)
#md5sums=('2c0cca3ef6330a187c6ef4fe41ecaa4d35175bee593a7cc7d6205584a94d8625')
package() {
cd $startdir/src
qmake -o Makefile Chess.pro
make || return 1
make DESTDIR=$startdir/pkg install
But it generates empty /pkg directory and empty (2 files) tat.gz package.
How can i generate only binary output in my package.
Thanks!!!

You don't need DESTDIR but INSTALL_ROOT in Qt packages, and qmake and first make command should be in the build() function.
You may want to read the wiki. For example:
- https://wiki.archlinux.org/index.php/Ar … _standards

Similar Messages

  • Unable to create PKGBUILD successfully

    Hi,
    This is the first time I am creating package and would like to maintain this package https://aur.archlinux.org/packages/mult … setlang=en as I am the author of upstraem package. Here is the git code https://github.com/mbusb/multibootusb . I have read and tried to create PKGBUILD using https://projects.archlinux.org/abs.git/ … thon.proto . However, It does not seems to create any package at all. Here is the contenet of my PKGBUILD:-
    # Contributor: Jonas Heinrich <[email protected]>
    # Maintainer: sundar_ima <[email protected]>
    pkgname=multibootusb
    pkgver=7.1.0
    pkgrel=1
    pkgdesc="Boot multiple live Linux distros from a usb flash drive"
    arch=('any')
    url="http://multibootusb.org"
    license=('gpl3')
    depends=('python-pyqt4' 'python2-psutil' 'mtools')
    sha512sums=('81a3680b42d49107ff8a05e7bdb856d2c75f24173cc836920b83deba20e321acc09fa17605f88cce10a09f23db242fe50cdee3e3d04b55ed4047683a7b69555e')
    #makepkgopt = strip
    #makepkgopt = docs
    #makepkgopt = libtool
    #makepkgopt = emptydirs
    #makepkgopt = zipman
    #makepkgopt = purge
    #makepkgopt = !upx
    source=("http://downloads.sourceforge.net/project/$pkgname/${pkgver}/Source/$pkgname-${pkgver}.tar.gz")
    package () {
    cd "$srcdir/$pkgname-$pkgver"
    python2.7 setup.py install --root="$pkgdir/" --optimize=1
    # vim:set ts=4 sw=4 et:
    When I tried to check PKGBUILD using namcap, it does not produce error at all. Any help to create successful PKGBUILD is appriciated.
    Thanks in advance.
    Last edited by sundar_ima (2014-04-28 00:08:35)

    @ Trilby
    I have modified the first post to use code. multibootusb is simmilar to unetbootin. However, many distros can be installed/ uninstalled. The famous linux version of YUMI by pendrivelinux.com is a fork of multibootusb. I hope you understand what my software does.
    There seems to be a difference between "makepkg" and "makepkg -S". Package has been succesfully created using "makepkg". However, it does not when I used "makepkg -S". Here is the out put I got when I used "makepkg -S"
    [sundar@arch arch]$ makepkg -S
    ==> Making package: multibootusb 7.1.0-1 (Mon Apr 28 05:41:38 IST 2014)
    ==> Retrieving sources...
    -> Downloading multibootusb-7.1.0.tar.gz...
    % Total % Received % Xferd Average Speed Time Time Time Current
    Dload Upload Total Spent Left Speed
    0 0 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0
    100 662k 100 662k 0 0 73219 0 0:00:09 0:00:09 --:--:-- 56066
    ==> Validating source files with sha512sums...
    multibootusb-7.1.0.tar.gz ... Passed
    ==> Entering fakeroot environment...
    ==> Creating source package...
    -> Adding PKGBUILD...
    -> Compressing source package...
    ==> Leaving fakeroot environment.
    ==> Source package created: multibootusb (Mon Apr 28 05:41:48 IST 2014)
    [sundar@arch arch]$ ls
    multibootusb-7.1.0-1.src.tar.gz multibootusb-7.1.0.tar.gz PKGBUILD src
    But the wiki says that "makepkg -S" is used  "To build the package and install needed dependencies automatically" .
    Regarding namcap warning, I have kept additional data required by multibootusb under python's system prefix. I had to do this as different distro uses different path for system prefix. Any suggestion to remove this warning is appriciated. Also this warning by namcap:-
    multibootusb W: Dependency included and not needed ('python-pyqt4')
    multibootusb W: Dependency included and not needed ('python2-psutil')
    multibootusb W: Dependency included and not needed ('mtools')
    does not seems to be true. These pacakages are must to run multibootusb.
    Last edited by sundar_ima (2014-04-28 00:27:28)

  • Old PKGBUILDs no longer available?

    Hi Arch Forums,
    We used to be able to search for a package and on that package's page click "SVN Entries" then "View Log" and easily obtain older PKGBUILD's (and any associated files).
    The process is even described in the wiki here:
    https://wiki.archlinux.org/index.php/Do … he_Package
    As of somewhat recently, unless I am missing something, we can no longer do this.
    Now when "log" is clicked we just see a log of changes and a diff style representation. (example)
    Just wondering if I'm missing something and somehow can easily view and download old PKGBUILD's? ...and if not, why was this change made? Personally I found the old functionality to be really useful at times.
    I did search the forums to see if anyone else had already asked this but didn't find anything. Apologies if the issue has already been raised and responded to, if so could someone please link me to the thread.

    You want the whole PKGBUILDs?
    http://projects.archlinux.org/svntogit/ … c7a420ac92
    Plain one for download http://projects.archlinux.org/svntogit/ … c7a420ac92
    Maybe the change is related to the move from SVN to git.
    Last edited by karol (2011-02-05 16:21:16)

  • Git versions in AUR

    Let's say I want to install randompackage-git from the AUR. It has a submission date, an update date, and a long weird version number.
    But I understand that the version number of that tarball is not necessarily the version number of the package. Somehow git gives me access to the latest version no matter what the version/update time on the AUR is, right? I searched for introductions to Git but found nothing dumbed down enough for a crude casual user like me.
    Last edited by stozi (2014-02-05 02:54:48)

    stozi wrote:Ok, life's short. So what then is the point of the aur package version number?
    I suspect it's just that the package version number has always been a mandatory field and it's not clear that it should be made non-mandatory just because of github.
    Probably, it would be a good idea for people putting code on github to give it a "tag" every now and again, which effectively imposes a notion of versioning, in which case the package version number would make sense.
    Also, many projects on github are just small little programs that don't really need installing to the system /usr/bin directory; I have a $HOME/src directory where I often put small things from github; after compiling, the binary can be symlinked to $HOME/bin.
    My philosophy on this is probably a long way from becoming an established convention, though.
    Also, your thread title is not consistent with the content of your opening post. Your topic is about the relationship between PKGBUILDs and github projects. It is not about the internal workings of git.

  • Amarok 2 too heavy

    Amarok 2.3.0 slows down my system and all my KDE environment becomes a bit unresponsive (and the odd thing is: this issue is random).
    I'm using Arch64. Anyone else with this issue?
    Thanks.
    Last edited by estevao (2010-05-06 15:10:07)

    patrickaupperle wrote:Amarok 2 (from kdemod) will not detect or properly scan my library. Amarok scans all the way to 100% then acts as if completed. Then no music shows up at all. It used to work and used to see my whole library and plays everything properly. Please help me resolve this issue, I will try to provide you with any other information.
    http://chakra-project.org/bbs/viewtopic.php?id=526&p=1
    I just rebuilt amarok with this PKGBUILD: http://chakra-project.org/code/index.ph … 2/PKGBUILD
    Last edited by BeholdMyGlory (2009-03-20 21:06:28)

  • ECLIPSE: How do I get the old version back?

    I was working on a rather important program that I ended up losing because eclipse 4.2 does not want to play nice with the android SDK. If anyone can tell me how to get the Indigo back or better yet how to fix up Juno so android SDK will work again it would be great.

    Look for the older PKGBUILD here:
    https://projects.archlinux.org/svntogit … es/eclipse
    And build the exact version you want yourself.

  • Why has my topic been closed?

    Hi.
    Recently I've posted a topic in "Multimedia & Games" named "OGS Mahjong" about the game I develop.
    It has been closed. Why?
    The screenshot featured Arch logo. The description provided the names of packages necessary to install with pacman to run OGS Mahjong.
    What have I violated?
    Thanks.

    I closed the topic.
    I understand you sent an inquiry by email to jasonwran, who responded by email with an explanation.
    I generally post a message explaining my actions which includes a link to me.  I thought I had in this case.  Apparently I did not do that this time -- for that I apologize.   You deserve  a link back to me.
    As has been pointed out by ngoonee and by jasonwryan, this was your very first post on Arch Linux and was clearly designed to drive traffic to your site.  As such, it qualifies as an advertisement and was handled as such.  I must admit, my response would have been different had you an established presence in these forums as opposed to it being your very first post.
    The package you posted does not have an installer for Arch Linux and was clearly not designed specifically for this distribution.  As Jasonwryan suggested, the way to handle this would be to create a PKGBUILD for your project and submit it to our AUR.  Then you would be more than welcome to post on these forums under the community contributions section identifying your package.  If you need help creating a PKGBUILD, these forums are the place to ask and I guarantee help will be forthcoming.
    These forums are intended to be for the support of Arch Linux.   Most forums are technical in nature with a few set aside for some levity.  It is an active community with well established norms.  It is the job of the moderators deal with issues that fall outside of those norms.  We are human and sometimes make the wrong call.  That is why we have multiple moderators who communicate off-line with each other.  In this case, I've seen no disagreement  from my colleagues. 
    Please consider submitting your package to our AUR and we can move forward from there.  We would like to have you as part of our community.
    ewaller

  • PKGBUILD "Project: Starfighter". Is all correct?

    I have created a PKBUILD for "Project: Starfighter" which btw is my first PKGBUILD. I would appreciate comments on this PKGBUILD before I post it on AUR.
    To make it build cleaner I had to change some paths in the makefile. I am not sure if I should name the patchfile (for the makefile) in any different way or if the name I have chosen works.
    PKGBUILD
    # Contributor: Peter Johansson <johpet>
    pkgname=starfighter
    pkgver=1.1
    pkgrel=1
    pkgdesc="Project: Starfighter is a 2D mission-based shoot-'em-up game."
    url="http://www.parallelrealities.co.uk/starfighter.php"
    license="GPL"
    depends=('sdl' 'sdl_image' 'sdl_mixer')
    source=('http://www.parallelrealities.co.uk/download.php?file=starfighter-1.1-1.tar.gz&type=zip')
    md5sums=('6a4b704dbc83c7403842b936f95ee958')
    build() {
    cd $startdir/src
    tar -xzf 'download.php?file=starfighter-1.1-1.tar.gz&type=zip'
    cd $startdir/src/$pkgname-$pkgver
    patch -p0 -i $startdir/$pkgname.patch
    make || return 1
    make DESTDIR=$startdir/pkg install
    starfighter.patch
    --- makefile.old 2006-05-26 07:39:55.000000000 +0200
    +++ makefile 2006-05-26 07:52:39.000000000 +0200
    @@ -7,8 +7,9 @@
    PACK = starfighter.pak
    DOCS = docs/*
    -BINDIR = /usr/games/
    -DATADIR = /usr/share/games/parallelrealities/
    +DESTDIR =
    +BINDIR = /usr/bin/
    +DATADIR = /usr/share/starfighter/
    DOCDIR = /usr/share/doc/starfighter/
    # top-level rule to create the program.
    all: $(PROG)
    @@ -30,8 +31,8 @@
    # install
    install:
    - mkdir -p $(DATADIR)
    + mkdir -p $(DESTDIR)$(DATADIR)
    + mkdir -p $(DESTDIR)$(BINDIR)
    strip $(PROG)
    - install -o root -g games -m 755 $(PROG) $(BINDIR)$(PROG)
    - install -o root -g games -m 644 $(PACK) $(DATADIR)$(PACK)
    - cp $(DOCS) $(DOCDIR)
    + install -m 755 $(PROG) $(DESTDIR)$(BINDIR)$(PROG)
    + install -m 644 $(PACK) $(DESTDIR)$(DATADIR)$(PACK)
    errors/warnings from namcap
    namcap PKGBUILD
    PKGBUILD (starfighter) W: Missing Maintainer tag
    PKGBUILD (starfighter) W: Missing CVS Id tag
    PKGBUILD (starfighter) W: file referenced in $startdir outside of $startdir/src or $startdir/pkg
    Should I put myself as a maintainer too?
    Is the second warning something I have to fix or is it something that is more necessary if I would build from cvs?
    I guess I could ignore the third warning since it probably is because I am reading a patchfile in $startdir
    When I run namcap starfighter-1.1-1.pkg.tar.gz it complains on the dependencies but I know that they are needed since I have checked them with  ldd and they are also listed as dependencies on the homepage. I am guessing that it is something that I could ignore? Or am I wrong?
    Thanks in advance for any suggestions/corrections anyone might have.
    Peter Johansson

    tomk wrote:
    Nice work. You can ignore the first two namcap messages - they only apply if the package is destined for a binary repo. The third message is important. All files required for a build must be listed in the source= array, with corresponding entries in the md5sums= array, and a PKGBUILD should only reference files in $startdir/src or $startdir/pkg. Put the patch file (the name is fine, btw) in source=, and change the path in the patch command to
    $startdir/src/$pkgname.patch
    One more thing, but this is optional. That source URL really offends me (<rant>why can't developers just link to the tarball, without this kind of crap?</rant>), so you could get it from somewhere a bit saner e.g.
    http://ftp.osuosl.org/pub/FreeBSD/distfiles/starfighter-1.1-1.tar.gz
    I've checked the md5sum, and it's the same. It's your package though, so you decide.
    namcap is a good tool, but it's not gospel - you're using it the right way i.e. with common sense.
    Thanks!
    I have fix those problems even the one with the URL. I totally agree with you, it looks a lot saner with the other URL. Going to upload it to AUR in a couple of minuts. Hopefully it doesn't have anymore errors.
    # Contributor: Peter Johansson <johpet>
    pkgname=starfighter
    pkgver=1.1
    pkgrel=1
    pkgdesc="Project: Starfighter is a 2D mission-based shoot-'em-up game."
    url="http://www.parallelrealities.co.uk/starfighter.php"
    license="GPL"
    depends=('sdl' 'sdl_image' 'sdl_mixer')
    source=(http://ftp.osuosl.org/pub/FreeBSD/distfiles/$pkgname-$pkgver-1.tar.gz starfighter.patch)
    md5sums=(6a4b704dbc83c7403842b936f95ee958 7d11a7217022b216c3de6e0455483418)
    build() {
    cd $startdir/src/$pkgname-$pkgver
    patch -p0 -i $startdir/src/$pkgname.patch
    make || return 1
    make DESTDIR=$startdir/pkg install

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

  • Pkgman - a bash script for local package and PKGBUILD management

    hi all,
    here is a script which manages a local repository and lets you edit
    PKGBUILDs and other related files, automatically generates checksums,
    build packages, add them to your local repo and so on.
    it also has AUR support for submitting tarballs, leaving comments, etc.
    get it from here:
    http://sourceforge.net/projects/pkgman/
    and AUR package:
    http://aur.archlinux.org/packages.php?ID=17100
    you need abs, curl and pacman and optionally namcap and desktop-file-utils.
    RTFM online:
    http://sourceforge.net/apps/mediawiki/p … n_man_page
    first of all copy the pkgman.conf and AUR.conf files from /usr/share/pkgman to ~/.config/pkgman/  or ${XDG_CONFIG_HOME}/pkgman - if ${XDG_CONFIG_HOME} is set,
    edit these two files and then run
    pkgman --runmefirst
    pkgman doesn´t install anything. if you want it just builds the package and moves it to your local repository. install it then with pacman.
    it also has no dependency handling. there are many other tools which provide this.
    the main intention was to keep track of package versions, different PKGBUILD versions and own AUR submitted tarballs; also to keep a clean local repository and clean build directories.
    pkgman is stable now. i´m using it for months without any issues.
    however, if there are problems or feedback please post them here.
    vlad
    changelog:
    version 2.4:
           *pkgman now respects the PKGDEST and SRCDEST variables from makepkg.conf. (though it still moves the src.tar.gz and .pkg.tar.gz to package backup directory).
    version 2.5:
           *pkgman uses PKGDEST if SRCDEST not set in makepkg.conf.
    version 2.6 -> r26:
           *changed version system: version 2.6 is now r26!
           *minor changes: > pkgman uses now the $SHELL variable.
                                    > new and more comprehensible manpage description (thanks to bender02)
    version r27:
           *changed SRCDEST since it's only a cache dir. all files (pkg.tar.gz and src.tar.gz) go to PKGDEST.
    version r28:
           *added new variable ShellCommand to pkgman.conf. Default is $SHELL.
           *One might use an external application (like screen or xterm) to switch to build directory and edit files simultaneously.
    version r30:
           *minor changes. nothing crucial
    r32: *OverwriteExistingPackage isn't used anymore. one can delete it from ~/.config/pkgman/pkgman.conf.
           *minor changes
    version r33:
           *"-l|--list" also shows installed package version and available ABS/AUR PKGBUILD version for given package.
           *"-a|--abs" can now also be used with other options (like "-e")
    r39: * when backing up src.tarballs it asks whether to backup the source file or not
           * more detailed "--list" option - also shows if package is installed or not and available ABS/AUR version
           * added prompt to clean up directory after makepkg
           * when checking pkg.tar.gz also possibility to check for conflicts with files of already installed packages
           * use $PAGER instead of less
           * --help directly shows the manpage
           * --shorthelp shows a brief usage overview
           * added a custom prompt, but only when using bash (is somehow experimental - works fine here for me)
           * minor internal changes
           * pkgman also reads ~/.aurvote file for getting aur name and password. if one already uses aurvote then there is no need for the
             ~/.config/pkgman/AUR.conf file.
    r40: * new manual page & rewrite of usage function
           * both option "--flush" and "--flushall" were omitted in favor of the more versatile "--cleanup" option
           * pkgman <packagename> checks now if <packagename> is owned by user
           * backup option after each editing
           * added license
           * minor internal changes
    r41: * just small bug fixes, nothing crucial.
    r42: * more bugs fixed.
    r45: * new options added:
              >   --listversions: list local and available versions of installed packages from LocalPackages directory
              >  --getownpackages: synchronize local own packages with AUR
           * added new variable in pkgman.conf:
              > ListOutputInPager: output of, for example, "--list" or "--own" is piped into $PAGER
           * added a new optional dependency "desktop-file-utils" for validating desktop entry files
           * also supports now auto-generation of sha sums not only md5
           * internal fixes due to AUR interface changes:
              > use of json interface
              > correct parsing of package category
           * added 2 proto files (located under /usr/share/pacman):
              >  proto.desktop: a template for *.desktop files
              > PKGBUILD-lib32.proto: a template for lib32 packages for x86_64
           * some code changes and fixes
    r46: * added new option to pkgman.conf (AutoGenerateSums).
             > if AutoGenerateSums=no then pkgman asks whether to generate checksums or not.
             > if set to yes it behaves like in former versions.
    r52: * "--getownpackages" with more than 100 packages works again
           * added new option "--cachecopy":
              For each package in CacheCopyList (new variable in pkgman.conf) get existing package from pacman's cache directory - if
              CopyPkgFromCache (new variable in pkgman.conf) is set to yes - and/or create a source tarball of PKGBUILD and related files from ABS -
              if CopySrcFromABS (new variable in pkgman.conf) is set to yes - and copy them to package backup directory.
           * added new variables to pkgman.conf:
               > "CacheCopyList=file" - batch backup file, one package per line - default location is "$HOME/.config/pkgman/package.list".
               > "CopySrcFromABS=[yes|no]"
               > "CopyPkgFromCache=[yes|no]"
           * some bugfixes
           * docs completed
           * CacheCopyList should look like
    package1
    package2
    #this is a comment
    ! this too
    package3
    !package4
    r54: * renamed "--listversions" option to "--diffversions". makes more sense!
              from the man page:
                  pkgman --diffversions
                  Show differing ABS/AUR versions of installed packages from LocalPackages.
    r55: * minor changes.
    r57: * testing release
           * added a new option "--rollback":
               "pkgman <packagename> --rollback" - checks  http://arm.kh.nu for available package versions,
                                                          lets you choose one, fetches the package and
                                                          moves it to the <packagename> backup directory (if "--repoadd" is used).
    r59: * stable release
           * new option "--rollback" (see r57):
                   it checks http://arm.kh.nu (Arch Rollback Machine) for available package versions,
                   downloads chosen file and moves it to local repository (if "-r|--repoadd"  is used).
            * posting files/comments/etc to AUR should work now again.
    r65: *stable release
           * new option "-M,--meta" to create metapackages and add them and their dependencies to local repository.
              it searches for deps inside the backup directories, pacman's cache and if the packages are not available, it tries to fetch the missing
              dependencies from the Arch Rollback Machine site (http://arm.kh.nu).
    r66: * minor fixes
    r68: * some bugfixes
           * "--repoadd" and "--Reporemove" now accurately removes old packages from LocalRepository
    r69: * small bugfixes when listing packages with similar names
           * curl retries now 5 times if connection is not established
    r75: * "--cachecopy" does not try to dl sourcefiles when backing up ABS PKGBUILDs
           * some work on package splitting
           * further internal changes
    r76: * minor mistakes with "ln" purged
    r79: * mostly small changes
           * "--cleanup" now also removes uninstalled packages from LocalRepository
    r81 & r80: * added AUR v1.6.0 support (use more json)
                    * small ARM changes ("--rollback")
    r85:
          * pkgman supports pkg.tar.xz packages
          * some code rewrite, bugs purged (hopefully)
    r113:
          * pkgman now supports building split packages through makepkg.
             If you already use pkgman you need to rerun "pkgman --runmefirst" after updating.
          * new  "-t,--template" option ("pkgman <packagename> --template <alt. packagename> [--pkgbuildversion <version>] [options]").
             Useful to create a new PKGBUILD and use an existing one as a template.
          * new option: "--conf /path/to/alternate/conf/file" - Specify another configuration file.
          * pkgman now uses ${XDG_CONFIG_HOME}/pkgman or $HOME/.config/pkgman - if first not set - as the default location for its conf files.
    r116:
          * check inet conection when submitting src tarballs to AUR
          * some bugs
          * updated manpage on sf
    For further details please read the manual page.
    Last edited by DonVla (2010-04-28 11:56:59)

    I'm having some troubles with it (perhaps missing dependencies, and forgotten hardcoded dirs?):
    jan@aconcagua 8:20PM ~ % pkgman --runmefirst
    /usr/bin/pkgman: line 77: /home/jan/apps/skripte/archscripts/pkgman/share/pkgman/color.bash: No such file or directory
    /usr/bin/pkgman: line 1293: initcolor: command not found
    /usr/bin/pkgman: line 312: highlight: command not found
    /usr/bin/pkgman: line 312: error: command not found
    /usr/bin/pkgman: line 313: highlight: command not found
    /usr/bin/pkgman: line 313: error: command not found
    /usr/bin/pkgman: line 314: highlight: command not found
    /usr/bin/pkgman: line 314: error: command not found
    /usr/bin/pkgman: line 315: highlight: command not found
    /usr/bin/pkgman: line 315: error: command not found
    /usr/bin/pkgman: line 317: error: command not found
    /usr/bin/pkgman: line 318: error: command not found
    /usr/bin/pkgman: line 321: highlight: command not found
    /usr/bin/pkgman: line 321: msg: command not found
    /usr/bin/pkgman: line 329: list: command not found
    /usr/bin/pkgman: line 332: list: command not found
    /usr/bin/pkgman: line 332: list: command not found
    touch: cannot touch `/bin/.pkgman.registered': Permission denied
    /usr/bin/pkgman: line 332: list: command not found
    /usr/bin/pkgman: line 332: list: command not found
    /usr/bin/pkgman: line 332: list: command not found
    /usr/bin/pkgman: line 332: list: command not found
    /usr/bin/pkgman: line 332: list: command not found
    /usr/bin/pkgman: line 337: msg: command not found
    curl: option --output: requires parameter
    curl: try 'curl --help' or 'curl --manual' for more information
    ^C/usr/bin/pkgman: line 209: cleanoutput: command not found
    /usr/bin/pkgman: line 209: cleanoutput: command not found
    (I terminated with ctrl-c).
    EDIT: errors resolved by correcting the path $HOME/apps/skripte/archscripts/pkgman/share/pkgman to /usr/share/pkgman in the pkgman itself.
    Last edited by bender02 (2008-05-23 01:28:58)

  • [solved]make error when using svn in PKGBUILD

    Hi, all
    I want to install the development package of R software using PKGBUILD. My PKGBUILD file is like this:
    pkgname=r
    _svnmod=r
    pkgver=0.0.0
    pkgrel=1
    pkgdesc="R is a language and environment for statistical computing and graphics"
    arch=('i686' 'x86_64')
    license=('GPL')
    url=('http://www.r-project.org/')
    depends=('blas' 'lapack' 'bzip2' 'libpng' 'libjpeg' 'libtiff'
    'ncurses' 'pcre' 'readline' 'zlib' 'perl' 'gcc-libs'
    'tk' 'libxt' 'libxmu' 'pango')
    #makedepends=('subversion' 'openjdk6' 'gcc-fortran')
    makedepends=('subversion' 'jre7-openjdk')
    options=('!makeflags')
    conflicts=('r')
    provides=('r')
    source=('r::svn+https://svn.r-project.org/R/trunk/')
    md5sums=('SKIP')
    pkgver() {
    cd "$SRCDEST/$_svnmod"
    svnversion
    build() {
    cd "$srcdir/$_svnmod"
    ./configure --prefix=/usr \
    --libdir=/usr/lib \
    --datarootdir=/usr/share \
    rsharedir=/usr/share/R/ \
    rincludedir=/usr/include/R/ \
    rdocdir=/usr/share/R/docs/ \
    --enable-memory-profiling \
    --with-readline \
    --with-x \
    --with-system-zlib \
    --with-system-bzlib \
    --with-system-pcre \
    --enable-R-shlib \
    --with-lapack \
    --with-blas \
    --without-recommended-packages \
    F77=gfortran \
    LIBnn=lib
    make
    package() {
    cd "$srcdir/$_svnmod"
    make -j1 DESTDIR=${pkgdir} install
    # Fixup R wrapper scripts.
    sed -i "s|${pkgdir} ||" ${pkgdir}/usr/bin/R
    rm ${pkgdir}/usr/lib/R/bin/R
    cd ${pkgdir}/usr/lib/R/bin
    ln -s ../../../bin/R
    But i encounter a make error like this:
    ERROR: not an svn checkout
    make: *** [svnonly] ERROR 1
    Did anyone give me some advices? Thanks a lot!
    PS. I was noticed that in wiki page "VCS PKGBUILD Guidelines", "The copy in $srcdir is made using svn export which does not create working copies. Any svn related command has to be used in the local repo in $SRCDEST." So when I change the cd line in build() and package() function into
    cd "$SRCDEST/$_svnmod"
    the error message vanished. But the local repo are changed when configure and make the project.
    Last edited by januslian (2013-05-06 08:50:09)

    Scimmia wrote:This will be fixed in pacman 4.1.1. For now, just copy the ".svn" dir yourself. cp -r "$SRCDEST/$_svnmod/.svn" "$srcdir/$_svnmod"
    Great, it works. Thanks.

  • First PKGBUILD: 'cannot stat' error for source file

    I'm attempting my first PKGBUILD and I've run into some trouble.
    PKGBUILD:
    # Maintainer: Simon Wydooghe <hyperbaton at gmail dot com>
    pkgname=vpcs
    pkgver=0.21a
    pkgrel=1
    pkgdesc="Simulates up to 9 computers for ping/traceroute purposes."
    arch=('i686' 'x86_64')
    url="http://vpcs.sourceforge.net/"
    license=('GPL')
    makedepends=('p7zip')
    source=('${pkgname}_${pkgver}.7z::http://downloads.sourceforge.net/project/${pkgname}/binary/${pkgver}/${pkgname}_${pkgver}.7z')
    noextract=('${pkgname}_${pkgver}.7z')
    md5sums=('dac71bdf9d04a3b7e69fe25b15f1ee5c')
    package() {
    local vpcsdir="opt/vpcs"
    local binary="vpcs32"
    cd "${srcdir}"
    mv ${pkgname}_${pkgver}.7z.part ${pkgname}_${pkgver}.7z
    7z e -o"${pkgname}-${pkgver}" "${pkgname}_${pkgver}.7z"
    cd "${pkgname}-{$pkgver}"
    mv startup.vpc readme.txt ${pkgdir}/${vpcsdir}
    if [ $CARCH = "x86_64" ]; then
    binary="vpcs64"
    fi
    mv ${binary} ${pkgdir}/${vpcsdir}/vpcs
    chmod +x ${pkgdir}/${vpcsdir}/vpcs
    Error when running makepkg:
    [hb@hb-desktop vpcs]$ makepkg
    ==> Making package: vpcs 0.21a-1 (Mon Apr 4 15:48:07 CEST 2011)
    ==> Checking runtime dependencies...
    ==> Checking buildtime dependencies...
    ==> Retrieving Sources...
    -> Downloading ${pkgname}_${pkgver}.7z...
    --2011-04-04 15:48:07-- http://downloads.sourceforge.net/project/vpcs/binary/0.21a/vpcs_0.21a.7z
    Resolving downloads.sourceforge.net... 216.34.181.59
    Connecting to downloads.sourceforge.net|216.34.181.59|:80... connected.
    HTTP request sent, awaiting response... 302 Found
    Location: http://switch.dl.sourceforge.net/project/vpcs/binary/0.21a/vpcs_0.21a.7z [following]
    --2011-04-04 15:48:07-- http://switch.dl.sourceforge.net/project/vpcs/binary/0.21a/vpcs_0.21a.7z
    Resolving switch.dl.sourceforge.net... 130.59.138.21, 2001:620:0:1b::21
    Connecting to switch.dl.sourceforge.net|130.59.138.21|:80... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 1168714 (1.1M) [application/x-7z-compressed]
    Saving to: “vpcs_0.21a.7z.part”
    100%[======================================================================================================================================>] 1,168,714 1.10M/s in 1.0s
    2011-04-04 15:48:08 (1.10 MB/s) - “vpcs_0.21a.7z.part” saved [1168714/1168714]
    mv: cannot stat `/home/hb/abs/vpcs/${pkgname}_${pkgver}.7z.part': No such file or directory
    ==> ERROR: Failure while downloading ${pkgname}_${pkgver}.7z
    Aborting...
    So it seems that '.part' is being added to the source filename when being downloaded by makepkg. I added '${pkgname}_${pkgver}.7z::' in front of the source url to rename the file (I believe that's correct, no?).
    This is the PKGBUILD directory after running makepkg:
    [hb@hb-desktop vpcs]$ ls -l
    total 1152
    -rw-r--r-- 1 hb hb 884 Apr 4 15:47 PKGBUILD
    drwxr-xr-x 2 hb hb 4096 Apr 4 16:01 src
    -rw-r--r-- 1 hb hb 1168714 Mar 8 04:18 vpcs_0.21a.7z.part
    I can stat the file in question:
    [hb@hb-desktop vpcs]$ stat vpcs_0.21a.7z.part
    File: `vpcs_0.21a.7z.part'
    Size: 1168714 Blocks: 2288 IO Block: 4096 regular file
    Device: 805h/2053d Inode: 1046825 Links: 1
    Access: (0644/-rw-r--r--) Uid: ( 1000/ hb) Gid: ( 1000/ hb)
    Access: 2011-04-04 16:01:22.000000000 +0200
    Modify: 2011-03-08 04:18:48.000000000 +0100
    Change: 2011-04-04 16:01:22.477037824 +0200
    Birth: -
    So can someone tell me which moronic error I've made this time? :-)

    Excellent, thanks, that did the trick!
    While I've opened this topic anyway, I have another question. The application in question uses a configuration file which it only looks for in the directory the executable resides in (unless a specific command line argument is given). For this reason, it seems most logical to place the application under /opt. But /opt is not in $PATH by default. What is the best way to add the directory /opt/vpcs to $PATH but to also remove it from $PATH when the application is removed?
    Last edited by HyperBaton (2011-04-04 14:33:45)

  • [SOLVED] .SRCINFO file and multiarch PKGBUILD/package

    Is it a bad practice to have one PKGBUILD/package for x86 and x86_64 when they have not the same source?
    Exemple:
    # Maintainer: Tanguy ALEXIS <[email protected]>
    # Contributer: Shaun Hammill <[email protected]>
    # Contributer: Travis Lyons <[email protected]>
    pkgname=magicassistant-gtk
    pkgver=1.4.2.001
    pkgrel=1
    pkgdesc="Card Browser, Library Organizer, Deck Builder and Tournament Manager for Magic the Gathering Card Game"
    arch=(i686 x86_64)
    url="http://sourceforge.net/projects/mtgbrowser/"
    license=('EPL')
    depends=(gtk2 'java-runtime>=8' unzip libwebkit)
    source=('source')
    md5sums=('md5sums')
    if test "$CARCH" == "x86_64"; then
    source=(http://downloads.sourceforge.net/project/mtgbrowser/Magic_Assistant/${pkgver}/magicassistant-${pkgver}-linux.gtk.x86_64.zip magicassistant.desktop)
    md5sums=('ae780a748d2d245b2f3220694cec5986'
    '37f143dbb28032d4fcc7a0a6e4e7f239')
    fi
    if test "$CARCH" == "i686"; then
    source=(http://downloads.sourceforge.net/project/mtgbrowser/Magic_Assistant/${pkgver}/magicassistant-${pkgver}-linux.gtk.x86.zip magicassistant.desktop)
    md5sums=('cb0e8e8fb8bf3f37326432302954fecf'
    '37f143dbb28032d4fcc7a0a6e4e7f239')
    fi
    package() {
    msg "Installing..."
    install -d "$pkgdir"/{/usr/bin,/opt,/usr/share/applications}
    install -m644 $srcdir/magicassistant.desktop $pkgdir/usr/share/applications/magicassistant.desktop
    mv $srcdir/MagicAssistant $pkgdir/opt
    msg "Link to bin..."
    ln -s /opt/MagicAssistant/magicassistant $pkgdir/usr/bin/magicassistant
    msg2 "Done!"
    This work but not with mksrcinfo even if I skip the integrity check, because it will check for a "source" file instead of the actual source.
    So, is there any way to deal with this or I just have to split this in two package? Sorry if this has been answered before, can't find it.
    Last edited by Nyutag (2015-06-17 07:55:24)

    Read 'man PKGBUILD', particularly the section about the source array and how you can specify architecture-specific sources. Look into the corresponding *sum arrays too. Lose the bash conditionals outside the build/package functions.

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

  • First PKGBUILD - looking for review

    Hello all,
    I have created my first PKGBUILD for some new scientific computing libraries and corresponding examples related to my field. I am looking for input before submitting this to the authors for inclusion on their site (and possibly to the AUR if there ends up being more interest).
    Anyway, here is what I have so far, which seems to work on my system:
    PKGBUILD:
    pkgname=ismrmrd-git
    pkgver=20121030
    pkgrel=1
    pkgdesc="Libraries and examples for the proposed ISMRM Raw Data format"
    url="http://ismrmrd.sourceforge.net"
    arch=('any')
    license=('unknown')
    depends=('hdf5-fortran-cxx'
    'boost-libs'
    'xsd'
    'xerces-c')
    optdepends=('fftw: used to compile example programs'
    'doxygen: only needed if you want to produce your own copy of the documentation')
    makedepends=('unzip'
    'git'
    'cmake')
    # install="${pkgname}.install"
    # source=("http://www.syntax-on.com/static/$pkgname/$pkgname-$pkgver.tar.gz")
    # source=("http://downloads.sourceforge.net/project/ismrmrd/src/${pkgname}_${pkgver}.zip")
    source=("cmakelists.diff")
    noextract=("${pkgname}_${pkgver}.zip")
    md5sums=("9ec7ed899e488961826fa41da7109a84")
    _gitroot="git://git.code.sf.net/p/ismrmrd/code"
    _gitname="ismrmrd"
    build() {
    cd "${srcdir}"
    # unzip ${pkgname}_${pkgver}.zip -d ${pkgname}-${pkgver}
    msg "Connecting to GIT server..."
    if [ -d $_gitname ] ; then
    cd $_gitname && git pull origin
    msg "Local files have been updated"
    else
    git clone $_gitroot "${srcdir}/$_gitname"
    fi
    msg "Received code from GIT or server timed out"
    # stop CMakeLists.txt appending an unwanted dir to the CMAKE_INSTALL_PREFIX
    # also prevent install of /usr/cmake/FindIsmrmrd.cmake
    msg "Patching CMakeLists.txt to comply with Arch Packaging Standards..."
    cd "${srcdir}/${_gitname}"
    patch < ${startdir}/cmakelists.diff --forward
    # start the build
    mkdir "${srcdir}/${_gitname}/build" -p
    cd "${srcdir}/${_gitname}/build"
    msg "Starting cmake..."
    cmake -DCMAKE_INSTALL_PREFIX=/usr ../
    msg "Starting make..."
    make
    package() {
    cd "${srcdir}/${_gitname}/build"
    make DESTDIR="${pkgdir}/" install
    cmakelists.diff
    --- src/ismrmrd-latest/CMakeLists.txt 2012-10-30 11:48:03.332945241 -0500
    +++ src/ismrmrd-latest/CMakeLists_mod.txt 2012-10-30 11:48:27.619612710 -0500
    @@ -10,7 +10,7 @@
    endif (WIN32)
    -set(CMAKE_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX}/ismrmrd)
    +# set(CMAKE_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX}/ismrmrd)
    list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
    find_package(XSD REQUIRED)
    @@ -69,7 +69,7 @@
    INSTALL(FILES ismrmrd.h ${XSDS_SOURCES} ismrmrd_hdf5.h ismrmrd_hdf5_datatypes.h ismrmrd_export.h DESTINATION include)
    INSTALL(FILES schema/ismrmrd.xsd DESTINATION schema)
    -INSTALL(FILES cmake/FindIsmrmrd.cmake DESTINATION cmake)
    +# INSTALL(FILES cmake/FindIsmrmrd.cmake DESTINATION cmake)
    INSTALL(TARGETS ismrmrd DESTINATION lib)
    INSTALL(TARGETS ismrmrd_xsd DESTINATION lib)
    I'm not using any .install file, is this something big I am missing? Again, this is my first time writing a PKGBUILD, so I appreciate any feedback. Thanks!

    Thanks - I will take note for future packages, or if I end up using a non-git version. makepkg seemed to not be able to handle the zip file itself, though. If I re-hosted the source myself in a tarball it worked, but on the authors' site I could only find it as a zip.
    My main question is still about installation location, though. This typically installs itself in:
    /usr/local/ismrmrd/bin
    /usr/local/ismrmrd/lib
    /usr/local/ismrmrd/include
    /usr/local/ismrmrd/schema
    /usr/local/ismrmrd/cmake
    I was able to change this to:
    /usr/bin
    /usr/lib
    /usr/include
    /usr/schema
    Obviously this prevents cmake/FindIsmrmrd.cmake from being installed at all (not sure this is OK or desirable), It also creates the /usr/schema directory, which I don't think is really standard. Where should I put such files? Should I instead install the whole package into /usr/opt/ismrmrd? It doesn't seem big enough to warrant that, but I don't know where else to put the schema and cmake directories and the associated files. Maybe in /usr/share?
    Last edited by aganders3 (2012-11-07 20:20:40)

Maybe you are looking for