Path in pkgbuild

How to add patch in pkgbuild? Maybe thisquestion already was, but i didnt find.

take a look at packages in in your ABS directory there are plenty examples of how patches are applied.

Similar Messages

  • "cannot open display" with cron script

    This works fine from the CLI, but when it runs with the cron daemon, the log file shows "xfburn: cannot open display."  How do I go about fixing this?
    #!/usr/bin/perl -w
    `xfburn --version > /home/tim/scripts/blah.log`;

    Hmm I'm not really sure what to do with that.  I'll post the whole thing.  This is my first time writing in perl, so I'm sure it's really inefficient and ugly.
    It's supposed to grab 'svn info' from all my svn packages in /var/local/abs, find my currently installed versions of the svns, and write the results to ~/scripts/svn-updates/outdated.log file.
    It works correctly when I run it from the command line, but when I put it in cron.daily, "@svninfo = `$pkgname --version --display=:0.0`;" doesn't work.
    #!/usr/bin/perl -w
    use strict;
    our (@svns, %local_revs, %latest_revs);
    our $svn_dir = "/var/abs/local";
    our $outdated_log = "/home/tim/scripts/svn-updates/outdated.log";
    # Get list of local svn packages
    sub get_svns {
    my ($name, @svns_results);
    opendir(DIR, $svn_dir) or die "Error opening $svn_dir: $!";
    foreach $name (readdir(DIR)) {
    if($name =~ /(.*)-svn$/) {
    push(@svns_results,$1);
    closedir(DIR);
    return @svns_results;
    # Get latest svn revisions
    sub get_latest_revs {
    my ($pkgname, $svntrunk, $i, @svninfo, %latest_revs_results);
    foreach $pkgname (@_) {
    # Find trunk path in PKGBUILD
    open(INFILE, "$svn_dir/$pkgname-svn/PKGBUILD");
    while(<INFILE>) {
    if(/^_svntrunk="(.*)"/) {
    $svntrunk = $1;
    close(INFILE);
    # Grab svn info on current package
    @svninfo = `svn info $svntrunk`;
    # Add latest revision to hash table
    foreach $i (@svninfo) {
    if($i =~ /^Revision: (\w*)/) {
    $latest_revs_results{$pkgname} = $1;
    return %latest_revs_results;
    # Get local svn revisions
    sub get_local_revs {
    my ($pkgname, $j, @svninfo, %local_revs_results);
    foreach $pkgname (@_) {
    @svninfo = `$pkgname --version --display=:0.0`;
    # Add local revision to hash table
    foreach $j (@svninfo) {
    if($j =~ /^.*svn-(\w*)/) {
    $local_revs_results{$pkgname} = $1;
    return %local_revs_results;
    # Write outdated packages to $outdated_log
    sub write_outdated {
    my $pkg;
    `echo > $outdated_log`;
    foreach $pkg (@_) {
    unless($local_revs{$pkg}==$latest_revs{$pkg}) {
    `echo "$pkg $local_revs{$pkg} ($latest_revs{$pkg})" >> $outdated_log`;
    # Main
    @svns = &get_svns;
    %latest_revs = &get_latest_revs(@svns);
    %local_revs = &get_local_revs(@svns);
    &write_outdated(@svns);

  • [Solved] How do I add a PATH to a PKGBUILD?

    I'm trying to add a binary PATH to a PKGBUILD and am not sure how to do this.  The only experience I've had with PATHs is through my bashrc so I'd like to learn how to do this so that it stay persisitent (i.e. through restarts logoffs and such).  The developers' site says:
    [If t]he java executable isn't on your path. Either add Java's bin directory to your PATH, or set the environment variable JAVA_HOME (this should point to the directory above bin), e.g.:
    export JAVA_HOME=/usr/lib/j2sdk1.6-sun
    From what I know Java is already in my path (i.e. I can run 'java <application>' and it runs fine.
    echo $JAVA_HOME
    /usr/lib/jvm/java-6-openjdk
    The program is supposed to be able to be run just by the command but is giving me:
    GooTool requires Java 1.5 or 1.6. You have Java JAVA
    Trying to run directly from java is giving me:
    java /usr/bin/gootool
    Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=lcd
    Exception in thread "main" java.lang.NoClassDefFoundError: /usr/bin/gootool
    Caused by: java.lang.ClassNotFoundException: .usr.bin.gootool
    at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:323)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:268)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:336)
    Could not find the main class: /usr/bin/gootool. Program will exit.
    So I'm guessing this is a problem with the path???  Or is there something else going on?
    Last edited by Gen2ly (2009-11-11 07:48:12)

    Ah, I tracked this down.  It's an error in the detection script.
    nm

  • Pkgbuild and Evn Path

    when I learn to compile umtsmon, I find some export command in pkgbuild script
      export QTDIR=/opt/qt
      export PATH=/opt/qt/bin:$PATH
    but, when I try "echo $PATH" in terminal I can't find /opt/qt/bin, what's wrong?

    sorry Karol, I really don't understand about it.. and I want to know more..
    # Contributor: János Illés <[email protected]>
    pkgname=umtsmon
    pkgver=0.9
    pkgrel=6
    pkgdesc="A tool to manage your UMTS (3G) card/device (send sms, modify pin, monitor traffic)"
    url="http://umtsmon.sourceforge.net/"
    license="GPL"
    arch=('i686' 'x86_64')
    depends=('qt3' 'ppp' 'libusb')
    optdepends=('gksu: umtsmon will complain if gksu is missing, but works fine after ignoring the error message'
    'usb_modeswitch: devices with ZeroCD functionality may need this to get working'
    'polymer: nice looking QT3 theme without KDE dependencies')
    source=(http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.src.tar.gz)
    md5sums=('2f9260d1fc69b230cf0035efa1a962f0')
    build() {
    export QTDIR=/opt/qt
    export PATH=/opt/qt/bin:$PATH
    cd $srcdir/$pkgname-$pkgver
    sed -i '29i#include <sys/stat.h>\n' src/base/SerialPort.cpp
    qmake || return 1
    make all || return 1
    lupdate umtsmon.pro ||return 1
    lrelease umtsmon.pro ||return 1
    install -m755 -D umtsmon $pkgdir/usr/sbin/umtsmon
    mkdir -p $pkgdir/usr/share/umtsmon/translations/
    cp i18n/*.qm $pkgdir/usr/share/umtsmon/translations/
    install -m644 -D umtsmon.desktop $pkgdir/usr/share/applications/umtsmon.desktop
    install -m644 -D images/128/umtsmon-128x128.png $pkgdir/usr/share/pixmaps/umtsmon-128x128.png
    makepkg -s executing each line in PKGBUILD script, isn't it?
    sorry about my english..

  • PKGBUILD for an application with a hard coded path

    Hello,
    I was about to make a nice AUR package for an application I use (the Elance work tracker) and I had a few details I needed to clear up. This package is pretty easy to install and all of the deps are available in the aur, but I would like a more convenient way.
    Problems:
    It seems to best/only work using the java6 packages in AUR. These install in opt
    It has a hard coded dependency on java being at /usr/bin/java
    I want to become a more active contributor to the AUR as I have a home build directory with a bunch of stuff I compile and use myself and would love to contribute these with PKGBUILDs. I just want to know how this situation is normally handled and make sure I use the proper etiquette.
    Thanks very much for your attention.
    Chris

    lrwxrwxrwx 1 root root         40 Sep 15 10:25 java -> /usr/lib/jvm/java-7-openjdk/jre/bin/java
    /usr/bin/java is a symlink on my system, check if the java6 package changes that symlink .
    If so, the hard coded dependency on /usr/bin/java is no problem.

  • Gcc not working with compiled glibc from PKGBUILD

    hello folks, please excuse my english
    i like to compile certain parts of my system, between them are the kernel, glibc , zsh, etc.
    i had noticed that using a compiled version of glibc from abs results in gcc not working at all ( C compiler cannot create executables logs says). this is weird especially because i hadn't had problems before, i have looked for the error mesagges on Google and a lot of people has had this problem but  nobody has a "generic" solution for this
    this is the config.log file from one failed compile of mpg123
    This file contains any messages produced by compilers while
    running configure, to aid debugging if configure makes a mistake.
    It was created by mpg123 configure 1.12.3, which was
    generated by GNU Autoconf 2.65. Invocation command line was
    $ ./configure --prefix=/usr --with-audio=alsa esd sdl
    ## Platform. ##
    hostname = Soul
    uname -m = x86_64
    uname -r = 2.6.34.1
    uname -s = Linux
    uname -v = #1 SMP PREEMPT Tue Jul 6 23:23:17 CLT 2010
    /usr/bin/uname -p = unknown
    /bin/uname -X = unknown
    /bin/arch = x86_64
    /usr/bin/arch -k = unknown
    /usr/convex/getsysinfo = unknown
    /usr/bin/hostinfo = unknown
    /bin/machine = unknown
    /usr/bin/oslevel = unknown
    /bin/universe = unknown
    PATH: /bin
    PATH: /usr/bin
    PATH: /usr/local/bin
    PATH: /sbin
    PATH: /usr/sbin
    PATH: /usr/local/sbin
    PATH: /usr/share/java/apache-ant/bin
    PATH: /usr/lib/perl5/core_perl/bin
    ## Core tests. ##
    configure:2849: checking build system type
    configure:2863: result: x86_64-unknown-linux-gnu
    configure:2883: checking host system type
    configure:2896: result: x86_64-unknown-linux-gnu
    configure:2933: checking for a BSD-compatible install
    configure:3001: result: /bin/install -c
    configure:3012: checking whether build environment is sane
    configure:3062: result: yes
    configure:3203: checking for a thread-safe mkdir -p
    configure:3242: result: /bin/mkdir -p
    configure:3255: checking for gawk
    configure:3271: found /bin/gawk
    configure:3282: result: gawk
    configure:3293: checking whether make sets $(MAKE)
    configure:3315: result: yes
    configure:3402: checking for -Werror in CFLAGS (It breaks tests)
    configure:3412: result: no
    configure:3423: checking if you are up to something totally static with LDFLAGS/CFLAGS
    configure:3443: result: no
    configure:3463: checking for style of include used by make
    configure:3491: result: GNU
    configure:3561: checking for gcc
    configure:3577: found /usr/bin/gcc
    configure:3588: result: gcc
    configure:3817: checking for C compiler version
    configure:3826: gcc --version >&5
    gcc (GCC) 4.5.1
    Copyright (C) 2010 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions. There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    configure:3837: $? = 0
    configure:3826: gcc -v >&5
    Using built-in specs.
    COLLECT_GCC=gcc
    COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.1/lto-wrapper
    Target: x86_64-unknown-linux-gnu
    Configured with: ../configure --prefix=/usr --enable-languages=c,c++,fortran,objc,obj-c++,ada --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-gnu-unique-object --enable-lto --enable-plugin --disable-multilib --disable-libstdcxx-pch --with-system-zlib --with-ppl --with-cloog --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info
    Thread model: posix
    gcc version 4.5.1 (GCC)
    configure:3837: $? = 0
    configure:3826: gcc -V >&5
    gcc: '-V' option must have argument
    configure:3837: $? = 1
    configure:3826: gcc -qversion >&5
    gcc: unrecognized option '-qversion'
    gcc: no input files
    configure:3837: $? = 1
    configure:3857: checking whether the C compiler works
    configure:3879: gcc -march=amdfam10 -O2 -pipe -Wl,--hash-style=gnu -Wl,--as-needed conftest.c >&5
    /usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.1/../../../../lib/crt1.o: In function `_start':
    (.text+0x12): undefined reference to `__libc_csu_fini'
    /usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.1/../../../../lib/crt1.o: In function `_start':
    (.text+0x19): undefined reference to `__libc_csu_init'
    collect2: ld returned 1 exit status
    configure:3883: $? = 1
    configure:3921: result: no
    configure: failed program was:
    | /* confdefs.h */
    | #define PACKAGE_NAME "mpg123"
    | #define PACKAGE_TARNAME "mpg123"
    | #define PACKAGE_VERSION "1.12.3"
    | #define PACKAGE_STRING "mpg123 1.12.3"
    | #define PACKAGE_BUGREPORT "[email protected]"
    | #define PACKAGE_URL ""
    | #define PACKAGE "mpg123"
    | #define VERSION "1.12.3"
    | /* end confdefs.h. */
    |
    | int
    | main ()
    | {
    |
    | ;
    | return 0;
    | }
    configure:3926: error: in `/var/abs/local/mpg123/src/mpg123-1.12.3':
    configure:3930: error: C compiler cannot create executables
    See `config.log' for more details.
    ## Cache variables. ##
    ac_cv_build=x86_64-unknown-linux-gnu
    ac_cv_env_CCASFLAGS_set=
    ac_cv_env_CCASFLAGS_value=
    ac_cv_env_CCAS_set=
    ac_cv_env_CCAS_value=
    ac_cv_env_CC_set=
    ac_cv_env_CC_value=
    ac_cv_env_CFLAGS_set=set
    ac_cv_env_CFLAGS_value='-march=amdfam10 -O2 -pipe'
    ac_cv_env_CPPFLAGS_set=
    ac_cv_env_CPPFLAGS_value=
    ac_cv_env_CPP_set=
    ac_cv_env_CPP_value=
    ac_cv_env_ESD_CFLAGS_set=
    ac_cv_env_ESD_CFLAGS_value=
    ac_cv_env_ESD_LIBS_set=
    ac_cv_env_ESD_LIBS_value=
    ac_cv_env_JACK_CFLAGS_set=
    ac_cv_env_JACK_CFLAGS_value=
    ac_cv_env_JACK_LIBS_set=
    ac_cv_env_JACK_LIBS_value=
    ac_cv_env_LDFLAGS_set=set
    ac_cv_env_LDFLAGS_value='-Wl,--hash-style=gnu -Wl,--as-needed'
    ac_cv_env_LIBS_set=
    ac_cv_env_LIBS_value=
    ac_cv_env_PKG_CONFIG_set=
    ac_cv_env_PKG_CONFIG_value=
    ac_cv_env_PULSE_CFLAGS_set=
    ac_cv_env_PULSE_CFLAGS_value=
    ac_cv_env_PULSE_LIBS_set=
    ac_cv_env_PULSE_LIBS_value=
    ac_cv_env_SDL_CFLAGS_set=
    ac_cv_env_SDL_CFLAGS_value=
    ac_cv_env_SDL_LIBS_set=
    ac_cv_env_SDL_LIBS_value=
    ac_cv_env_build_alias_set=
    ac_cv_env_build_alias_value=
    ac_cv_env_host_alias_set=
    ac_cv_env_host_alias_value=
    ac_cv_env_target_alias_set=
    ac_cv_env_target_alias_value=
    ac_cv_host=x86_64-unknown-linux-gnu
    ac_cv_path_install='/bin/install -c'
    ac_cv_path_mkdir=/bin/mkdir
    ac_cv_prog_AWK=gawk
    ac_cv_prog_ac_ct_CC=gcc
    ac_cv_prog_make_make_set=yes
    ## Output variables. ##
    ACLOCAL='${SHELL} /var/abs/local/mpg123/src/mpg123-1.12.3/build/missing --run aclocal-1.11'
    AIX_CFLAGS=''
    AIX_LDFLAGS=''
    AIX_LIBS=''
    ALIB_CFLAGS=''
    ALIB_LDFLAGS=''
    ALIB_LIBS=''
    ALSA_CFLAGS=''
    ALSA_LDFLAGS=''
    ALSA_LIBS=''
    AMDEPBACKSLASH='\'
    AMDEP_FALSE='#'
    AMDEP_TRUE=''
    AMTAR='${SHELL} /var/abs/local/mpg123/src/mpg123-1.12.3/build/missing --run tar'
    API_VERSION='25'
    AR=''
    ARTS_CFLAGS=''
    ARTS_LDFLAGS=''
    ARTS_LIBS=''
    AS=''
    AUTOCONF='${SHELL} /var/abs/local/mpg123/src/mpg123-1.12.3/build/missing --run autoconf'
    AUTOHEADER='${SHELL} /var/abs/local/mpg123/src/mpg123-1.12.3/build/missing --run autoheader'
    AUTOMAKE='${SHELL} /var/abs/local/mpg123/src/mpg123-1.12.3/build/missing --run automake-1.11'
    AWK='gawk'
    CC='gcc'
    CCAS=''
    CCASDEPMODE=''
    CCASFLAGS=''
    CCDEPMODE=''
    CFLAGS='-march=amdfam10 -O2 -pipe'
    COREAUDIO_CFLAGS=''
    COREAUDIO_LDFLAGS=''
    COREAUDIO_LIBS=''
    CPP=''
    CPPFLAGS=''
    CYGPATH_W='echo'
    DECODER_LOBJ=''
    DECODER_OBJ=''
    DEFS=''
    DEPDIR='.deps'
    DLLTOOL=''
    DSYMUTIL=''
    DUMMY_CFLAGS=''
    DUMMY_LDFLAGS=''
    DUMMY_LIBS=''
    DUMPBIN=''
    ECHO_C=''
    ECHO_N='-n'
    ECHO_T=''
    EGREP=''
    ESD_CFLAGS=''
    ESD_LDFLAGS=''
    ESD_LIBS=''
    EXEC_LT_LDFLAGS=''
    EXEEXT=''
    FGREP=''
    GREP=''
    HAVE_AIX_FALSE=''
    HAVE_AIX_TRUE=''
    HAVE_ALIB_FALSE=''
    HAVE_ALIB_TRUE=''
    HAVE_ALSA_FALSE=''
    HAVE_ALSA_TRUE=''
    HAVE_ARTS_FALSE=''
    HAVE_ARTS_TRUE=''
    HAVE_COREAUDIO_FALSE=''
    HAVE_COREAUDIO_TRUE=''
    HAVE_DUMMY_FALSE=''
    HAVE_DUMMY_TRUE=''
    HAVE_ESD_FALSE=''
    HAVE_ESD_TRUE=''
    HAVE_HP_FALSE=''
    HAVE_HP_TRUE=''
    HAVE_JACK_FALSE=''
    HAVE_JACK_TRUE=''
    HAVE_MINT_FALSE=''
    HAVE_MINT_TRUE=''
    HAVE_MODULES_FALSE=''
    HAVE_MODULES_TRUE=''
    HAVE_NAS_FALSE=''
    HAVE_NAS_TRUE=''
    HAVE_OPENAL_FALSE=''
    HAVE_OPENAL_TRUE=''
    HAVE_OS2_FALSE=''
    HAVE_OS2_TRUE=''
    HAVE_OSS_FALSE=''
    HAVE_OSS_TRUE=''
    HAVE_PORTAUDIO_FALSE=''
    HAVE_PORTAUDIO_TRUE=''
    HAVE_PULSE_FALSE=''
    HAVE_PULSE_TRUE=''
    HAVE_SDL_FALSE=''
    HAVE_SDL_TRUE=''
    HAVE_SGI_FALSE=''
    HAVE_SGI_TRUE=''
    HAVE_SNDIO_FALSE=''
    HAVE_SNDIO_TRUE=''
    HAVE_SUN_FALSE=''
    HAVE_SUN_TRUE=''
    HAVE_WIN32_FALSE=''
    HAVE_WIN32_TRUE=''
    HP_CFLAGS=''
    HP_LDFLAGS=''
    HP_LIBS=''
    INCLUDE_STDIO_H=''
    INCLUDE_STDLIB_H=''
    INCLUDE_SYS_TYPE_H=''
    INSTALL_DATA='${INSTALL} -m 644'
    INSTALL_PROGRAM='${INSTALL}'
    INSTALL_SCRIPT='${INSTALL}'
    INSTALL_STRIP_PROGRAM='$(install_sh) -c -s'
    JACK_CFLAGS=''
    JACK_LDFLAGS=''
    JACK_LIBS=''
    LD=''
    LDFLAGS='-Wl,--hash-style=gnu -Wl,--as-needed'
    LFS_LOBJ=''
    LIBMPG123_VERSION='25:5:25'
    LIBOBJS=''
    LIBS=''
    LIBTOOL=''
    LIPO=''
    LN_S=''
    LTLIBOBJS=''
    LT_LDFLAGS='-export-dynamic'
    MAKEINFO='${SHELL} /var/abs/local/mpg123/src/mpg123-1.12.3/build/missing --run makeinfo'
    MINT_CFLAGS=''
    MINT_LDFLAGS=''
    MINT_LIBS=''
    MKDIR_P='/bin/mkdir -p'
    MODULE_OBJ=''
    NAS_CFLAGS=''
    NAS_LDFLAGS=''
    NAS_LIBS=''
    NM=''
    NMEDIT=''
    OBJDUMP=''
    OBJEXT=''
    OPENAL_CFLAGS=''
    OPENAL_LDFLAGS=''
    OPENAL_LIBS=''
    OS2_CFLAGS=''
    OS2_LDFLAGS=''
    OS2_LIBS=''
    OSS_CFLAGS=''
    OSS_LDFLAGS=''
    OSS_LIBS=''
    OTOOL64=''
    OTOOL=''
    OUTPUT_CFLAGS=''
    OUTPUT_LDFLAGS=''
    OUTPUT_LIBS=''
    OUTPUT_MOD=''
    OUTPUT_OBJ=''
    PACKAGE='mpg123'
    PACKAGE_BUGREPORT='[email protected]'
    PACKAGE_NAME='mpg123'
    PACKAGE_STRING='mpg123 1.12.3'
    PACKAGE_TARNAME='mpg123'
    PACKAGE_URL=''
    PACKAGE_VERSION='1.12.3'
    PATH_SEPARATOR=':'
    PKG_CONFIG=''
    PORTAUDIO_CFLAGS=''
    PORTAUDIO_LDFLAGS=''
    PORTAUDIO_LIBS=''
    PULSE_CFLAGS=''
    PULSE_LDFLAGS=''
    PULSE_LIBS=''
    RANLIB=''
    SDL_CFLAGS=''
    SDL_LDFLAGS=''
    SDL_LIBS=''
    SED=''
    SET_MAKE=''
    SGI_CFLAGS=''
    SGI_LDFLAGS=''
    SGI_LIBS=''
    SHELL='/bin/sh'
    SNDIO_CFLAGS=''
    SNDIO_LDFLAGS=''
    SNDIO_LIBS=''
    STRIP=''
    SUN_CFLAGS=''
    SUN_LDFLAGS=''
    SUN_LIBS=''
    VERSION='1.12.3'
    WIN32_CFLAGS=''
    WIN32_CODES_FALSE=''
    WIN32_CODES_TRUE=''
    WIN32_LDFLAGS=''
    WIN32_LIBS=''
    ac_ct_CC='gcc'
    ac_ct_DUMPBIN=''
    am__EXEEXT_FALSE=''
    am__EXEEXT_TRUE=''
    am__fastdepCCAS_FALSE=''
    am__fastdepCCAS_TRUE=''
    am__fastdepCC_FALSE=''
    am__fastdepCC_TRUE=''
    am__include='include'
    am__isrc=''
    am__leading_dot='.'
    am__quote=''
    am__tar='${AMTAR} chof - "$$tardir"'
    am__untar='${AMTAR} xf -'
    bindir='${exec_prefix}/bin'
    build='x86_64-unknown-linux-gnu'
    build_alias=''
    build_cpu='x86_64'
    build_os='linux-gnu'
    build_vendor='unknown'
    datadir='${datarootdir}'
    datarootdir='${prefix}/share'
    docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
    dvidir='${docdir}'
    exec_prefix='NONE'
    host='x86_64-unknown-linux-gnu'
    host_alias=''
    host_cpu='x86_64'
    host_os='linux-gnu'
    host_vendor='unknown'
    htmldir='${docdir}'
    includedir='${prefix}/include'
    infodir='${datarootdir}/info'
    install_sh='${SHELL} /var/abs/local/mpg123/src/mpg123-1.12.3/build/install-sh'
    libdir='${exec_prefix}/lib'
    libexecdir='${exec_prefix}/libexec'
    localedir='${datarootdir}/locale'
    localstatedir='${prefix}/var'
    lt_ECHO='echo'
    mandir='${datarootdir}/man'
    mkdir_p='/bin/mkdir -p'
    oldincludedir='/usr/include'
    pdfdir='${docdir}'
    prefix='/usr'
    program_transform_name='s,x,x,'
    psdir='${docdir}'
    sbindir='${exec_prefix}/sbin'
    sharedstatedir='${prefix}/com'
    sysconfdir='${prefix}/etc'
    target_alias=''
    ## confdefs.h. ##
    /* confdefs.h */
    #define PACKAGE_NAME "mpg123"
    #define PACKAGE_TARNAME "mpg123"
    #define PACKAGE_VERSION "1.12.3"
    #define PACKAGE_STRING "mpg123 1.12.3"
    #define PACKAGE_BUGREPORT "[email protected]"
    #define PACKAGE_URL ""
    #define PACKAGE "mpg123"
    #define VERSION "1.12.3"
    configure: exit 77
    the parts i had searched on google are specificaly the
    "/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.1/../../../../lib/crt1.o: In function `_start':
    (.text+0x12): undefined reference to `__libc_csu_fini'
    /usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.1/../../../../lib/crt1.o: In function `_start':
    (.text+0x19): undefined reference to `__libc_csu_init'"
    does anyone have an idea of what could it be?
    notice that this doesn't bother me because if i use the glibc from the repositories everything works fine, this is just for curiosity of why it doesn't work
    thanks in advance

    slacknatcher wrote:
    the parts i had searched on google are specificaly the
    "/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.1/../../../../lib/crt1.o: In function `_start':
    (.text+0x12): undefined reference to `__libc_csu_fini'
    /usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.1/../../../../lib/crt1.o: In function `_start':
    (.text+0x19): undefined reference to `__libc_csu_init'"
    does anyone have an idea of what could it be?
    notice that this doesn't bother me because if i use the glibc from the repositories everything works fine, this is just for curiosity of why it doesn't work
    thanks in advance
    You have stripped glibc too much.  See the Arch PKGBUILD and make sure your makepkg.conf has STRIP_BINARY etc defined.

  • Xcwd, launch a terminal with the same path

    Hi,
    As a i3 user, I do not really use tmux or urxvt-tabbed anymore to manage my tabs.
    But I really miss the fact that tmux open a new shell on the same directory as the previous one.
    To emulate this feature, I wrote a simple C program which print the current working directory of the focused window so you can do things like that:
    urxvt -cd `xcwd`
    There is no proper way to get the working directory of a window, so it uses many tricks and may not give you the path you want on every applications.
    Anyway, it seems to work in most cases unless your terminal contains a tab manager (tmux, screen, urxvt-tabbed).
    Since there is a lot of tiling-wm users here, I think this might interest some of you.
    https://github.com/schischi-a/xcwd

    bladdo wrote:Any chance  you'll make a PKGBUILD / submit to AUR?
    I will do it soon.
    bladdo wrote:
    With -Werror, make fails with the most current version on git.
    http://ix.io/5xY
    This issue is now fixed.

  • [SOLVED] Trouble Building Xorg-Server 1.6.1-1 (Modified PKGBUILD)

    ever since the release of xorg-server 1.5.3, i've been using a modified
    PKGBUILD to build xorg-server sans hal and dbus.  (not gonna try
    justifying it again; that'd just lead to yet another flame war.)
    i've never had a problem until the 1.6.1-1 PKGBUILD, which adds the lines:
    libtoolize --force || return 1
    aclocal || return 1
    autoconf || return 1
    automake --add-missing || return 1
    after applying patches and before running the configure.  these added lines produce:
    libtoolize: putting auxiliary files in `.'.
    libtoolize: linking file `./ltmain.sh'
    libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.ac and
    libtoolize: rerunning libtoolize, to keep the correct libtool macros
    in-tree.
    libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
    hw/dmx/doc/Makefile.am:24: BUILD_LINUXDOC does not appear in AM_CONDITIONAL
    hw/dmx/doc/Makefile.am:27: BUILD_PDFDOC does not appear in AM_CONDITIONAL
    hw/xfree86/doc/sgml/Makefile.am:24: BUILD_LINUXDOC does not appear in
    AM_CONDITIONAL
    hw/xfree86/doc/sgml/Makefile.am:27: BUILD_PDFDOC does not appear in
    AM_CONDITIONAL
    ==> ERROR: Build Failed.
    Aborting...
    my modified PKGBUILD is build.  please note that i *have* tried
    reverting my changes (the commented patches), to no avail.
    as i'm pretty clueless vis-a-vis makefiles and the autoconf system,
    could somehow point me in the direction of a fix?
    many thanks,
    kludge
    # $Id: PKGBUILD 21903 2008-12-17 20:32:54Z jgc $
    # Maintainer: Alexander Baldeck <[email protected]>
    # Contributor: Jan de Groot <[email protected]>
    pkgname=xorg-server
    pkgver=1.6.1
    pkgrel=1
    pkgdesc="X.Org X servers"
    arch=('i686' 'x86_64')
    license=('custom')
    url="http://xorg.freedesktop.org"
    depends=('libgl' 'libxfont>=1.4.0' 'openssl>=0.9.8j' 'libpciaccess>=0.10.5' 'libxv>=1.0.4' 'pixman>=0.14.0' 'xcursor-themes' 'xkeyboard-config>=1.5' 'xorg-server-utils' 'xorg-fonts-misc' 'xbitmaps' 'diffutils')
    makedepends=('libx11>=1.2' 'mesa>=7.4' 'xf86driproto>=2.0.4' 'xtrans>=1.2.3' 'libxkbfile>=1.0.5' 'randrproto>=1.3.0' 'renderproto>=0.9.3' 'xcmiscproto>=1.1.2' 'bigreqsproto>=1.0.2' 'resourceproto>=1.0.2' 'videoproto>=2.2.2' 'compositeproto>=0.4' 'scrnsaverproto>=1.1.0' 'libxinerama>=1.0.3' 'xf86dgaproto>=2.0.3' 'recordproto>=1.13.2' 'libgl>=7.4' 'glproto>=1.4.9')
    #optdepends=( 'xf86-input-evdev: to provide input device hotplugging'
    # 'hal>=0.5.11: to provide input devices for hotplugging' )
    options=('!libtool')
    provides=('x-server' ) # 'xorg-server')
    conflicts=('catalyst-utils<=9.2')
    groups=('xorg')
    install=xorg-server.install
    source=(${url}/releases/individual/xserver/${pkgname}-${pkgver}.tar.bz2
    xorg-redhat-die-ugly-pattern-die-die-die.patch
    hal-wait.patch)
    md5sums=('ed0878bf32a24d4948c3b8a122a39eff'
    '1a336eb22e27cbf443ec5a2ecddfa93c'
    'f16d2caef84e1a9c4075b6c5e145512d')
    build() {
    cd "${srcdir}/${pkgname}-${pkgver}"
    # Get rid of the ugly pattern
    patch -Np3 -i "${srcdir}/xorg-redhat-die-ugly-pattern-die-die-die.patch" || return 1
    # Fix dbus config path - removed b/c no dbus config'd
    # sed -i -e 's/\$(sysconfdir)/\/etc/' config/Makefile.* || return 1
    # Revert waiting for hal, assume hal won't show up when initial connect fails
    # commented out b/c no hal config'd
    # patch -R -Np1 -i "${srcdir}/hal-wait.patch" || return 1
    libtoolize --force || return 1
    aclocal || return 1
    autoconf || return 1
    automake --add-missing || return 1
    # --enable-config-{dbus,hal} switched to --disable
    # to disable hotplugging and dependencies
    ./configure --prefix=/usr \
    --enable-ipv6 \
    --enable-dri \
    --disable-dmx \
    --enable-xvfb \
    --enable-xnest \
    --enable-composite \
    --enable-xcsecurity \
    --enable-xorg \
    --enable-xephyr \
    --enable-glx-tls \
    --enable-kdrive \
    --enable-install-setuid \
    --disable-config-hal \
    --disable-config-dbus \
    --enable-record \
    --disable-xfbdev \
    --disable-xfake \
    --disable-xsdl \
    --disable-static \
    --sysconfdir=/etc/X11 \
    --localstatedir=/var \
    --with-default-font-path=/usr/share/fonts/misc,/usr/share/fonts/100dpi:unscaled,/usr/share/fonts/75dpi:unscaled,/usr/share/fonts/TTF,/usr/share/fonts/Type1 \
    --with-xkb-path=/usr/share/X11/xkb \
    --with-xkb-output=/var/lib/xkb \
    --with-dri-driver-path=/usr/lib/xorg/modules/dri || return 1
    make || return 1
    make DESTDIR="${pkgdir}" install || return 1
    rm -rf "${pkgdir}/var/log" || return 1
    install -m755 -d "${pkgdir}/etc/X11" || return 1
    install -m755 -d "${pkgdir}/var/lib/xkb" || return 1
    # Needed for non-mesa drivers, libgl will restore it
    mv "${pkgdir}/usr/lib/xorg/modules/extensions/libglx.so" \
    "${pkgdir}/usr/lib/xorg/modules/extensions/libglx.xorg" || return 1
    install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
    install -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/" || return 1
    Last edited by kludge (2009-05-01 17:25:39)

    Not any help to your error but have you tried the one in aur with disabled dbus and hal?
    I've been using it for a week or so with no problems and it built fine.
    http://aur.archlinux.org/packages.php?ID=23750

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

  • 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) 1st PKGBUILD & submission to AUR, cant do "makepkg --source"

    I'm trying to add my own Live kernel to AUR
    it is kernel 2.6.35.6 patched with Tuxonice, BFS, BFQ, Aufs2 and squashfs-lzma
    however, when I do  "makepkg --source"
    it fails saying
    PKGBUILD: line 34: syntax error near unexpected token `('
    heres my PKGBUILD; mostly taken from the AUR's kernel26-pf PKGBUILD
    # Original PKGBUILD from kernel26-pf
    # Maintainer: <thepenandpaper at gmail dot com>
    _basekernel=2.6.35
    _pkgname=kernel26-livez
    _pfrel=1
    pkgname=kernel26-livez
    pkgver=${_basekernel}
    pkgrel=${_pfrel}
    _kernelname=-livez
    arch=(i686 x86_64)
    _pkgdesc="Linux kernel and modules with patches (BFS included), tuxonice, BFQ]. Also included: aufs2 and squashfs-lzma."
    pkgdesc=${_pkgdesc}
    license=('GPL2')
    groups=('base')
    backup=(etc/mkinitcpio.d/${_pkgname}.preset)
    depends=('coreutils' 'module-init-tools' 'linux-firmware' 'mkinitcpio>=0.5.20')
    optdepends=('crda: to set the correct wireless channels of your country'
    'pm-utils: utilities and scripts for suspend and hibernate power management'
    'tuxonice-userui: TuxOnIce userspace user interface'
    'hibernate-script: set of scripts for managing TuxOnIce, hibernation and suspend to RAM')
    # pwc, ieee80211 and hostap-driver26 modules are included in kernel26 now
    # nforce package support was abandoned by nvidia, kernel modules should cover everything now.
    # kernel24 support is dropped since glibc24
    replaces=('kernel24' 'kernel24-scsi' 'kernel26-scsi'
    'alsa-driver' 'ieee80211' 'hostap-driver26'
    'pwc' 'nforce' 'squashfs' 'unionfs' 'ivtv'
    'zd1211' 'kvm-modules' 'iwlwifi' 'rt2x00-cvs'
    'gspcav1' 'atl2' 'wlan-ng26' 'aufs' 'rt2500')
    install='kernel26.install'
    source=(http://multidistro.com/downloads/kernel26-livez/linux-2.6.35.6.tar.bz2
    config config.x86_64 # the main kernel config files
    kernel26.preset # standard config files for mkinitcpio ramdisk
    sha256sums=('e25123d1397806015c9b480d9809834461af0aa90179d0404eae87db3598ae5e'
    provides=(${_pkgname}=${_basekernel}) # for $pkgname-optimized
    #provides=('kernel26-headers' 'kernel26=$pkgver') # for when you have no other kernel (which is a bad idea anyway)
    build() {
    KARCH=x86
    cd ${srcdir}/linux-${_basekernel}
    bzip2 -dk ${startdir}/logo_linux_*.bz2
    mv -f ${startdir}/logo_linux_*.p?m drivers/video/logo/
    bzip2 -dc ${srcdir}/${_pfpatchname} | patch -Np1
    patch -Np1 < ${srcdir}/aufs2-sqlzma.patch
    sed -i "s/EXTRAVERSION = -${_pfrel}/EXTRAVERSION = ${_kernelname}/" Makefile
    if [ "$CARCH" = "x86_64" ]; then
    cat ../config.x86_64 >./.config
    else
    cat ../config >./.config
    fi
    _arch=$CARCH
    echo
    echo "==================================================="
    echo "You might be prompted below for some config options"
    echo "==================================================="
    echo
    echo "Do you want to use your running kernel's config? (y/N)"
    echo "(needs IKCONFIG and IKCONFIG_PROC, run 'modprobe configs'"
    echo " as root before hitting <Y>, if uncertain)"
    read answer
    shopt -s nocasematch
    if [[ "$answer" = "y" ]]; then
    if [[ -s /proc/config.gz ]]; then
    echo "Extracting config from /proc/config.gz..."
    modprobe configs
    zcat /proc/config.gz > ./.config
    else
    echo "You kernel was not compiled with IKCONFIG_PROC. Using stock ARCH kernel .config (with BFS and TuxOnIce enabled)"
    fi
    fi
    if [ "${_kernelname}" != "" ]; then
    sed -i "s|CONFIG_LOCALVERSION=.*|CONFIG_LOCALVERSION=\"\"|g" ./.config
    fi
    # Make some good use of MAKEFLAGS
    MAKEFLAGS=`grep -v '#' /etc/makepkg.conf | grep MAKEFLAGS= | sed s/MAKEFLAGS=// | sed s/\"//g`
    # get kernel version
    make ${MAKEFLAGS} prepare
    # uncomment to decrease kernel size and compilation time. However, be prepared to deal with missing modules :P
    # make localmodconfig
    # allows you to edit config
    # make menuconfig && cp -v .config ${startdir}/config && msg "Stopping build"
    # load configuration
    # yes "" | make config
    # This allows building cpu-optimized packages with according package names.
    # Useful for repo maintainers.
    CPU=`egrep "MK8=y|MCORE2=y|MPSC=y|MATOM=y|MPENTIUMII=y|MPENTIUMIII=y|MPENTIUMM=y|MPENTIUM4=y|MK7=y|CONFIG_GENERIC_CPU=y|CONFIG_X86_GENERIC=y" ./.config`
    CPU=`sed -e "s/CONFIG_M\(.*\)=y/\1/" <<<$CPU`
    case $CPU in
    CORE2)
    pkgname="${_pkgname}-core2"
    pkgdesc="${_pkgdesc} Intel Core2 optimized."
    K8)
    pkgname="${_pkgname}-k8"
    pkgdesc="${_pkgdesc} AMD K8 optimized."
    PSC)
    pkgname="${_pkgname}-psc"
    pkgdesc="${_pkgdesc} Intel Pentium4/D/Xeon optimized."
    ATOM)
    pkgname="${_pkgname}-atom"
    pkgdesc="${_pkgdesc} Intel Atom optimized."
    K7)
    pkgname="${_pkgname}-k7"
    pkgdesc="${_pkgdesc} AMD K7 optimized."
    PENTIUMII)
    pkgname="${_pkgname}-p3"
    pkgdesc="${_pkgdesc} Intel Pentium3 optimized."
    PENTIUMIII)
    pkgname="${_pkgname}-p2"
    pkgdesc="${_pkgdesc} Intel Pentium2 optimized."
    PENTIUMM)
    pkgname="${_pkgname}-pm"
    pkgdesc="${_pkgdesc} Intel Pentium-M optimized."
    PENTIUM4)
    pkgname="${_pkgname}-p4"
    pkgdesc="${_pkgdesc} Intel Pentium4 optimized."
    default)
    pkgname="${_pkgname}"
    pkgdesc="Linux kernel and modules with pf-kernel patch [-ck patchset (BFS included), tuxonice, BFQ, IMQ]. Also included: aufs2 and squashfs-lzma."
    esac
    # build!
    _kernver="$(make kernelrelease)"
    make ${MAKEFLAGS} bzImage modules
    ### package_kernel26
    mkdir -p ${pkgdir}/{lib/modules,boot}
    make INSTALL_MOD_PATH=${pkgdir} modules_install
    cp System.map ${pkgdir}/boot/System.map26${_kernelname}
    cp arch/$KARCH/boot/bzImage ${pkgdir}/boot/vmlinuz26${_kernelname}
    # add vmlinux
    # cp vmlinux ${pkgdir}/usr/src/linux-${_kernver}
    install -m644 -D vmlinux ${pkgdir}/usr/src/linux-${_kernver}/vmlinux
    # install fallback mkinitcpio.conf file and preset file for kernel
    install -m644 -D ${srcdir}/kernel26.preset ${pkgdir}/etc/mkinitcpio.d/${_pkgname}.preset
    # set correct depmod command for install
    sed \
    -e "s/KERNEL_NAME=.*/KERNEL_NAME=${_kernelname}/g" \
    -e "s/KERNEL_VERSION=.*/KERNEL_VERSION=${_kernver}/g" \
    -i ${startdir}/kernel26.install
    sed \
    -e "s|source .*|source /etc/mkinitcpio.d/kernel26${_kernelname}.kver|g" \
    -e "s|default_image=.*|default_image=\"/boot/${_pkgname}.img\"|g" \
    -e "s|fallback_image=.*|fallback_image=\"/boot/${_pkgname}-fallback.img\"|g" \
    -i ${pkgdir}/etc/mkinitcpio.d/${_pkgname}.preset
    echo -e "# DO NOT EDIT THIS FILE\nALL_kver='${_kernver}'" > ${pkgdir}/etc/mkinitcpio.d/${_pkgname}.kver
    ### package_kernel26-headers
    install -D -m644 Makefile \
    ${pkgdir}/usr/src/linux-${_kernver}/Makefile
    install -D -m644 kernel/Makefile \
    ${pkgdir}/usr/src/linux-${_kernver}/kernel/Makefile
    install -D -m644 .config \
    ${pkgdir}/usr/src/linux-${_kernver}/.config
    mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/include
    for i in acpi asm-generic config generated linux math-emu media net pcmcia scsi sound trace video; do
    cp -a include/$i ${pkgdir}/usr/src/linux-${_kernver}/include/
    done
    # copy arch includes for external modules
    mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/arch/x86
    cp -a arch/x86/include ${pkgdir}/usr/src/linux-${_kernver}/arch/x86/
    # copy files necessary for later builds, like nvidia and vmware
    cp Module.symvers ${pkgdir}/usr/src/linux-${_kernver}
    cp -a scripts ${pkgdir}/usr/src/linux-${_kernver}
    # fix permissions on scripts dir
    chmod og-w -R ${pkgdir}/usr/src/linux-${_kernver}/scripts
    mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/.tmp_versions
    mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/arch/$KARCH/kernel
    cp arch/$KARCH/Makefile ${pkgdir}/usr/src/linux-${_kernver}/arch/$KARCH/
    if [ "$CARCH" = "i686" ]; then
    cp arch/$KARCH/Makefile_32.cpu ${pkgdir}/usr/src/linux-${_kernver}/arch/$KARCH/
    fi
    cp arch/$KARCH/kernel/asm-offsets.s ${pkgdir}/usr/src/linux-${_kernver}/arch/$KARCH/kernel/
    # add headers for lirc package
    mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/video
    cp drivers/media/video/*.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/video/
    for i in bt8xx cpia2 cx25840 cx88 em28xx et61x251 pwc saa7134 sn9c102 usbvideo zc0301; do
    mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/video/$i
    cp -a drivers/media/video/$i/*.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/video/$i
    done
    # add docbook makefile
    install -D -m644 Documentation/DocBook/Makefile \
    ${pkgdir}/usr/src/linux-${_kernver}/Documentation/DocBook/Makefile
    # add dm headers
    mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/drivers/md
    cp drivers/md/*.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/md
    # add inotify.h
    mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/include/linux
    cp include/linux/inotify.h ${pkgdir}/usr/src/linux-${_kernver}/include/linux/
    # add wireless headers
    mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/net/mac80211/
    cp net/mac80211/*.h ${pkgdir}/usr/src/linux-${_kernver}/net/mac80211/
    # add dvb headers for external modules
    # in reference to:
    # http://bugs.archlinux.org/task/9912
    mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/dvb-core
    cp drivers/media/dvb/dvb-core/*.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/dvb-core/
    # add dvb headers for external modules
    # in reference to:
    # http://bugs.archlinux.org/task/11194
    mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/include/config/dvb/
    [[ -e include/config/dvb/ ]] && cp include/config/dvb/*.h ${pkgdir}/usr/src/linux-${_kernver}/include/config/dvb/
    # add dvb headers for http://mcentral.de/hg/~mrec/em28xx-new
    # in reference to:
    # http://bugs.archlinux.org/task/13146
    mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/frontends/
    cp drivers/media/dvb/frontends/lgdt330x.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/frontends/
    cp drivers/media/video/msp3400-driver.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/frontends/
    # add xfs and shmem for aufs building
    mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/fs/xfs
    mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/mm
    cp fs/xfs/xfs_sb.h ${pkgdir}/usr/src/linux-${_kernver}/fs/xfs/xfs_sb.h
    # add headers for virtualbox
    # in reference to:
    # http://bugs.archlinux.org/task/14568
    cp -a include/drm ${pkgdir}/usr/src/linux-${_kernver}/include/
    # add headers for broadcom wl
    # in reference to:
    # http://bugs.archlinux.org/task/14568
    cp -a include/trace ${pkgdir}/usr/src/linux-${_kernver}/include/
    # copy in Kconfig files
    for i in `find . -name "Kconfig*"`; do
    mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/`echo $i | sed 's|/Kconfig.*||'`
    cp $i ${pkgdir}/usr/src/linux-${_kernver}/$i
    done
    chown -R root.root ${pkgdir}/usr/src/linux-${_kernver}
    find ${pkgdir}/usr/src/linux-${_kernver} -type d -exec chmod 755 {} \;
    cd ${pkgdir}/lib/modules/${_kernver} && \
    (rm -f source build; ln -sf ../../../usr/src/linux-${_kernver} build)
    # remove unneeded architectures
    rm -rf ${pkgdir}/usr/src/linux-${_kernver}/arch/{alpha,arm,arm26,avr32,blackfin,cris,frv,h8300,ia64,m32r,m68k,m68knommu,mips,microblaze,mn10300,parisc,powerpc,ppc,s390,sh,sh64,sparc,sparc64,um,v850,xtensa}
    # remove the firmware
    rm -rf ${pkgdir}/lib/firmware
    # eof
    line #34 is the sha256sum line
    heres the contents of the source folder "kernel26-livez"
    config
    config.x86_64
    kernel26.install
    kernel26.preset
    PKGBUILD
    can anyone tell me whats wrong,etc?
    I reall hate the syntax error issues as no matter how I have edited it, the same error?
    thanks
    Last edited by 72linus (2010-09-30 00:08:28)

    yep
    thanks guys I got it!
    PKGBUILD
    # Original PKGBUILD from kernel26-pf
    # Maintainer: <thepenandpaper at gmail dot com>
    _basekernel=2.6.35
    _pkgname=kernel26-livez
    _pfrel=1
    pkgname=kernel26-livez
    pkgver=${_basekernel}
    pkgrel=${_pfrel}
    _kernelname=-livez
    arch=(i686 x86_64)
    _pkgdesc="Linux kernel and modules with patches (BFS included), tuxonice, BFQ]. Also included: aufs2 and squashfs-lzma."
    pkgdesc=${_pkgdesc}
    license=('GPL2')
    groups=('base')
    backup=(etc/mkinitcpio.d/${_pkgname}.preset)
    depends=('coreutils' 'module-init-tools' 'linux-firmware' 'mkinitcpio>=0.5.20')
    optdepends=('crda: to set the correct wireless channels of your country'
    'pm-utils: utilities and scripts for suspend and hibernate power management'
    'tuxonice-userui: TuxOnIce userspace user interface'
    'hibernate-script: set of scripts for managing TuxOnIce, hibernation and suspend to RAM')
    # pwc, ieee80211 and hostap-driver26 modules are included in kernel26 now
    # nforce package support was abandoned by nvidia, kernel modules should cover everything now.
    # kernel24 support is dropped since glibc24
    replaces=('kernel24' 'kernel24-scsi' 'kernel26-scsi'
    'alsa-driver' 'ieee80211' 'hostap-driver26'
    'pwc' 'nforce' 'squashfs' 'unionfs' 'ivtv'
    'zd1211' 'kvm-modules' 'iwlwifi' 'rt2x00-cvs'
    'gspcav1' 'atl2' 'wlan-ng26' 'aufs' 'rt2500')
    install='kernel26.install'
    source=(http://multidistro.com/downloads/kernel26-livez/linux-2.6.35.6.tar.bz2
    config config.x86_64 # the main kernel config files
    kernel26.preset) # standard config files for mkinitcpio ramdisk
    sha256sums=('e25123d1397806015c9b480d9809834461af0aa90179d0404eae87db3598ae5e')
    provides=(${_pkgname}=${_basekernel}) # for $pkgname-optimized
    #provides=('kernel26-headers' 'kernel26=$pkgver') # for when you have no other kernel (which is a bad idea anyway)
    build() {
    KARCH=x86
    cd ${srcdir}/linux-${_basekernel}
    bzip2 -dk ${startdir}/logo_linux_*.bz2
    mv -f ${startdir}/logo_linux_*.p?m drivers/video/logo/
    bzip2 -dc ${srcdir}/${_pfpatchname} | patch -Np1
    patch -Np1 < ${srcdir}/aufs2-sqlzma.patch
    sed -i "s/EXTRAVERSION = -${_pfrel}/EXTRAVERSION = ${_kernelname}/" Makefile
    if [ "$CARCH" = "x86_64" ]; then
    cat ../config.x86_64 >./.config
    else
    cat ../config >./.config
    fi
    _arch=$CARCH
    echo
    echo "==================================================="
    echo "You might be prompted below for some config options"
    echo "==================================================="
    echo
    echo "Do you want to use your running kernel's config? (y/N)"
    echo "(needs IKCONFIG and IKCONFIG_PROC, run 'modprobe configs'"
    echo " as root before hitting <Y>, if uncertain)"
    read answer
    shopt -s nocasematch
    if [[ "$answer" = "y" ]]; then
    if [[ -s /proc/config.gz ]]; then
    echo "Extracting config from /proc/config.gz..."
    modprobe configs
    zcat /proc/config.gz > ./.config
    else
    echo "You kernel was not compiled with IKCONFIG_PROC. Using stock ARCH kernel .config (with BFS and TuxOnIce enabled)"
    fi
    fi
    if [ "${_kernelname}" != "" ]; then
    sed -i "s|CONFIG_LOCALVERSION=.*|CONFIG_LOCALVERSION=\"\"|g" ./.config
    fi
    # Make some good use of MAKEFLAGS
    MAKEFLAGS=`grep -v '#' /etc/makepkg.conf | grep MAKEFLAGS= | sed s/MAKEFLAGS=// | sed s/\"//g`
    # get kernel version
    make ${MAKEFLAGS} prepare
    # uncomment to decrease kernel size and compilation time. However, be prepared to deal with missing modules :P
    # make localmodconfig
    # allows you to edit config
    # make menuconfig && cp -v .config ${startdir}/config && msg "Stopping build"
    # load configuration
    # yes "" | make config
    # This allows building cpu-optimized packages with according package names.
    # Useful for repo maintainers.
    CPU=`egrep "MK8=y|MCORE2=y|MPSC=y|MATOM=y|MPENTIUMII=y|MPENTIUMIII=y|MPENTIUMM=y|MPENTIUM4=y|MK7=y|CONFIG_GENERIC_CPU=y|CONFIG_X86_GENERIC=y" ./.config`
    CPU=`sed -e "s/CONFIG_M\(.*\)=y/\1/" <<<$CPU`
    case $CPU in
    CORE2)
    pkgname="${_pkgname}-core2"
    pkgdesc="${_pkgdesc} Intel Core2 optimized."
    K8)
    pkgname="${_pkgname}-k8"
    pkgdesc="${_pkgdesc} AMD K8 optimized."
    PSC)
    pkgname="${_pkgname}-psc"
    pkgdesc="${_pkgdesc} Intel Pentium4/D/Xeon optimized."
    ATOM)
    pkgname="${_pkgname}-atom"
    pkgdesc="${_pkgdesc} Intel Atom optimized."
    K7)
    pkgname="${_pkgname}-k7"
    pkgdesc="${_pkgdesc} AMD K7 optimized."
    PENTIUMII)
    pkgname="${_pkgname}-p3"
    pkgdesc="${_pkgdesc} Intel Pentium3 optimized."
    PENTIUMIII)
    pkgname="${_pkgname}-p2"
    pkgdesc="${_pkgdesc} Intel Pentium2 optimized."
    PENTIUMM)
    pkgname="${_pkgname}-pm"
    pkgdesc="${_pkgdesc} Intel Pentium-M optimized."
    PENTIUM4)
    pkgname="${_pkgname}-p4"
    pkgdesc="${_pkgdesc} Intel Pentium4 optimized."
    default)
    pkgname="${_pkgname}"
    pkgdesc="Linux kernel and modules with pf-kernel patch [-ck patchset (BFS included), tuxonice, BFQ, IMQ]. Also included: aufs2 and squashfs-lzma."
    esac
    # build!
    _kernver="$(make kernelrelease)"
    make ${MAKEFLAGS} bzImage modules
    ### package_kernel26
    mkdir -p ${pkgdir}/{lib/modules,boot}
    make INSTALL_MOD_PATH=${pkgdir} modules_install
    cp System.map ${pkgdir}/boot/System.map26${_kernelname}
    cp arch/$KARCH/boot/bzImage ${pkgdir}/boot/vmlinuz26${_kernelname}
    # add vmlinux
    # cp vmlinux ${pkgdir}/usr/src/linux-${_kernver}
    install -m644 -D vmlinux ${pkgdir}/usr/src/linux-${_kernver}/vmlinux
    # install fallback mkinitcpio.conf file and preset file for kernel
    install -m644 -D ${srcdir}/kernel26.preset ${pkgdir}/etc/mkinitcpio.d/${_pkgname}.preset
    # set correct depmod command for install
    sed \
    -e "s/KERNEL_NAME=.*/KERNEL_NAME=${_kernelname}/g" \
    -e "s/KERNEL_VERSION=.*/KERNEL_VERSION=${_kernver}/g" \
    -i ${startdir}/kernel26.install
    sed \
    -e "s|source .*|source /etc/mkinitcpio.d/kernel26${_kernelname}.kver|g" \
    -e "s|default_image=.*|default_image=\"/boot/${_pkgname}.img\"|g" \
    -e "s|fallback_image=.*|fallback_image=\"/boot/${_pkgname}-fallback.img\"|g" \
    -i ${pkgdir}/etc/mkinitcpio.d/${_pkgname}.preset
    echo -e "# DO NOT EDIT THIS FILE\nALL_kver='${_kernver}'" > ${pkgdir}/etc/mkinitcpio.d/${_pkgname}.kver
    ### package_kernel26-headers
    install -D -m644 Makefile \
    ${pkgdir}/usr/src/linux-${_kernver}/Makefile
    install -D -m644 kernel/Makefile \
    ${pkgdir}/usr/src/linux-${_kernver}/kernel/Makefile
    install -D -m644 .config \
    ${pkgdir}/usr/src/linux-${_kernver}/.config
    mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/include
    for i in acpi asm-generic config generated linux math-emu media net pcmcia scsi sound trace video; do
    cp -a include/$i ${pkgdir}/usr/src/linux-${_kernver}/include/
    done
    # copy arch includes for external modules
    mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/arch/x86
    cp -a arch/x86/include ${pkgdir}/usr/src/linux-${_kernver}/arch/x86/
    # copy files necessary for later builds, like nvidia and vmware
    cp Module.symvers ${pkgdir}/usr/src/linux-${_kernver}
    cp -a scripts ${pkgdir}/usr/src/linux-${_kernver}
    # fix permissions on scripts dir
    chmod og-w -R ${pkgdir}/usr/src/linux-${_kernver}/scripts
    mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/.tmp_versions
    mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/arch/$KARCH/kernel
    cp arch/$KARCH/Makefile ${pkgdir}/usr/src/linux-${_kernver}/arch/$KARCH/
    if [ "$CARCH" = "i686" ]; then
    cp arch/$KARCH/Makefile_32.cpu ${pkgdir}/usr/src/linux-${_kernver}/arch/$KARCH/
    fi
    cp arch/$KARCH/kernel/asm-offsets.s ${pkgdir}/usr/src/linux-${_kernver}/arch/$KARCH/kernel/
    # add headers for lirc package
    mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/video
    cp drivers/media/video/*.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/video/
    for i in bt8xx cpia2 cx25840 cx88 em28xx et61x251 pwc saa7134 sn9c102 usbvideo zc0301; do
    mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/video/$i
    cp -a drivers/media/video/$i/*.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/video/$i
    done
    # add docbook makefile
    install -D -m644 Documentation/DocBook/Makefile \
    ${pkgdir}/usr/src/linux-${_kernver}/Documentation/DocBook/Makefile
    # add dm headers
    mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/drivers/md
    cp drivers/md/*.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/md
    # add inotify.h
    mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/include/linux
    cp include/linux/inotify.h ${pkgdir}/usr/src/linux-${_kernver}/include/linux/
    # add wireless headers
    mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/net/mac80211/
    cp net/mac80211/*.h ${pkgdir}/usr/src/linux-${_kernver}/net/mac80211/
    # add dvb headers for external modules
    # in reference to:
    # http://bugs.archlinux.org/task/9912
    mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/dvb-core
    cp drivers/media/dvb/dvb-core/*.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/dvb-core/
    # add dvb headers for external modules
    # in reference to:
    # http://bugs.archlinux.org/task/11194
    mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/include/config/dvb/
    [[ -e include/config/dvb/ ]] && cp include/config/dvb/*.h ${pkgdir}/usr/src/linux-${_kernver}/include/config/dvb/
    # add dvb headers for http://mcentral.de/hg/~mrec/em28xx-new
    # in reference to:
    # http://bugs.archlinux.org/task/13146
    mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/frontends/
    cp drivers/media/dvb/frontends/lgdt330x.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/frontends/
    cp drivers/media/video/msp3400-driver.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/frontends/
    # add xfs and shmem for aufs building
    mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/fs/xfs
    mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/mm
    cp fs/xfs/xfs_sb.h ${pkgdir}/usr/src/linux-${_kernver}/fs/xfs/xfs_sb.h
    # add headers for virtualbox
    # in reference to:
    # http://bugs.archlinux.org/task/14568
    cp -a include/drm ${pkgdir}/usr/src/linux-${_kernver}/include/
    # add headers for broadcom wl
    # in reference to:
    # http://bugs.archlinux.org/task/14568
    cp -a include/trace ${pkgdir}/usr/src/linux-${_kernver}/include/
    # copy in Kconfig files
    for i in `find . -name "Kconfig*"`; do
    mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/`echo $i | sed 's|/Kconfig.*||'`
    cp $i ${pkgdir}/usr/src/linux-${_kernver}/$i
    done
    chown -R root.root ${pkgdir}/usr/src/linux-${_kernver}
    find ${pkgdir}/usr/src/linux-${_kernver} -type d -exec chmod 755 {} \;
    cd ${pkgdir}/lib/modules/${_kernver} && \
    (rm -f source build; ln -sf ../../../usr/src/linux-${_kernver} build)
    # remove unneeded architectures
    rm -rf ${pkgdir}/usr/src/linux-${_kernver}/arch/{alpha,arm,arm26,avr32,blackfin,cris,frv,h8300,ia64,m32r,m68k,m68knommu,mips,microblaze,mn10300,parisc,powerpc,ppc,s390,sh,sh64,sparc,sparc64,um,v850,xtensa}
    # remove the firmware
    rm -rf ${pkgdir}/lib/firmware
    # eof
    kernel26.preset
    # mkinitcpio preset file for kernel26
    # DO NOT EDIT THIS LINE:
    source /etc/mkinitcpio.d/kernel26-livez.kver
    ALL_config="/etc/mkinitcpio.conf"
    PRESETS=('default' 'fallback')
    #default_config="/etc/mkinitcpio.conf"
    default_image="/boot/kernel26-livez.img"
    #default_options=""
    #fallback_config="/etc/mkinitcpio.conf"
    fallback_image="/boot/kernel26-livez-fallback.img"
    fallback_options="-S autodetect"
    kernel26.install
    # arg 1: the new package version
    # arg 2: the old package version
    KERNEL_NAME=-livez
    KERNEL_VERSION=2.6.35-livez
    post_install () {
    # updating module dependencies
    echo ">>> Updating module dependencies. Please wait ..."
    depmod $KERNEL_VERSION
    # generate init ramdisks
    echo ">>> MKINITCPIO SETUP"
    echo ">>> ----------------"
    echo ">>> If you use LVM2, Encrypted root or software RAID,"
    echo ">>> Ensure you enable support in /etc/mkinitcpio.conf ."
    echo ">>> More information about mkinitcpio setup can be found here:"
    echo ">>> http://wiki.archlinux.org/index.php/Mkinitcpio"
    echo ""
    echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..."
    /sbin/mkinitcpio -p kernel26${KERNEL_NAME}
    post_upgrade() {
    pacman -Q grub &>/dev/null
    hasgrub=$?
    pacman -Q grub2 &>/dev/null
    hasgrub2=$?
    pacman -Q lilo &>/dev/null
    haslilo=$?
    # reminder notices
    if [ $haslilo -eq 0 ]; then
    echo ">>>"
    if [ $hasgrub -eq 0 -o $hasgrub2 -eq 0 ]; then
    echo ">>> If you use the LILO bootloader, you should run 'lilo' before rebooting."
    else
    echo ">>> You appear to be using the LILO bootloader. You should run"
    echo ">>> 'lilo' before rebooting."
    fi
    echo ">>>"
    fi
    if grep "^[^#]*/boot" /etc/fstab 2>&1 >/dev/null; then
    if ! grep "/boot" /etc/mtab 2>&1 >/dev/null; then
    echo "WARNING: /boot appears to be a seperate partition but is not mounted"
    echo " This is most likely not what you want. Please mount your /boot"
    echo " partition and reinstall the kernel unless you are sure this is OK"
    fi
    fi
    if [ "`vercmp $2 2.6.13`" -lt 0 ]; then
    # important upgrade notice
    echo ">>>"
    echo ">>> IMPORTANT KERNEL UPGRADE NOTICE"
    echo ">>> -------------------------------"
    echo ">>> As of kernel 2.6.13, DevFS is NO LONGER AVAILABLE!"
    echo ">>> If you still use DevFS, please make the transition to uDev before"
    echo ">>> rebooting. If you really need to stay with DevFS for some reason,"
    echo ">>> then you can manually downgrade to an older version:"
    echo ">>>"
    echo ">>> # pacman -U http://archlinux.org/~judd/kernel/kernel26-scsi-2.6.12.2-1.pkg.tar.gz"
    echo ">>>"
    echo ">>> If you choose to downgrade, don't forget to add kernel26-scsi to your"
    echo ">>> IgnorePkg list in /etc/pacman.conf"
    echo ">>>"
    echo ">>> (NOTE: The following portion applies to uDev users as well!)"
    echo ">>>"
    echo ">>> If you use any DevFS paths in your GRUB menu.lst, then you will not"
    echo ">>> be able to boot! Change your root= parameter to use the classic"
    echo ">>> naming scheme."
    echo ">>>"
    echo ">>> EXAMPLES:"
    echo ">>> - change root=/dev/discs/disc0/part3 to root=/dev/sda3"
    echo ">>> - change root=/dev/md/0 to root=/dev/md0"
    echo ">>>"
    fi
    # generate new init ramdisk
    if [ "`vercmp $2 2.6.18`" -lt 0 ]; then
    echo ">>> --------------------------------------------------------------"
    echo ">>> | WARNING: |"
    echo ">>> |mkinitrd is not supported anymore in kernel >=2.6.18 series!|"
    echo ">>> | Please change to Mkinitcpio setup. |"
    echo ">>> --------------------------------------------------------------"
    echo ">>>"
    fi
    # updating module dependencies
    echo ">>> Updating module dependencies. Please wait ..."
    depmod $KERNEL_VERSION
    echo ">>> MKINITCPIO SETUP"
    echo ">>> ----------------"
    if [ "`vercmp $2 2.6.18`" -lt 0 ]; then
    echo ">>> Please change your bootloader config files:"
    echo ">>> Grub: /boot/grub/menu.lst | Lilo: /etc/lilo.conf"
    echo "------------------------------------------------"
    echo "| - initrd26.img to kernel26${KERNEL_NAME}.img |"
    echo "| - initrd26-full.img to kernel26${KERNEL_NAME}-fallback.img |"
    echo "------------------------------------------------"
    fi
    if [ "`vercmp $2 2.6.19`" -lt 0 ]; then
    echo ""
    echo ">>> New PATA/IDE subsystem - EXPERIMENTAL"
    echo ">>> ----------"
    echo ">>> To use the new pata drivers, change the 'ide' hook "
    echo ">>> to 'pata' in /etc/mkinicpio.conf HOOKS="
    echo ">>> The new system changes: /dev/hd? to /dev/sd?"
    echo ">>> Don't forget to modify GRUB, LILO and fstab to the"
    echo ">>> new naming system. "
    echo ">>> eg: hda3 --> sda3, hdc8 --> sdc8"
    echo ""
    echo ">>> piix/ata_piix (Intel chipsets) - IMPORTANT"
    echo "----------"
    echo ">>> If you have enabled ide/pata/sata HOOKs in /etc/mkinitcpio.conf"
    echo ">>> the 'ata_piix' module will be used."
    echo ">>> This may cause your devices to shift names, eg:"
    echo ">>> - IDE: devices from hd? to sd?"
    echo ">>> - SATA: sda might shift to sdc if you have 2 other disks on a PIIX IDE port."
    echo ">>> To check if this will affect you, check 'mkinitcpio -M' for piix/ata_piix"
    echo ""
    fi
    echo ">>> If you use LVM2, Encrypted root or software RAID,"
    echo ">>> Ensure you enable support in /etc/mkinitcpio.conf ."
    echo ">>> More information about mkinitcpio setup can be found here:"
    echo ">>> http://wiki.archlinux.org/index.php/Mkinitcpio"
    echo ""
    echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..."
    if [ "`vercmp $2 2.6.19`" -lt 0 ]; then
    /sbin/mkinitcpio -p kernel26${KERNEL_NAME} -m "ATTENTION:\nIf you get a kernel panic below
    and are using an Intel chipset, append 'earlymodules=piix' to the
    kernel commandline"
    else
    /sbin/mkinitcpio -p kernel26${KERNEL_NAME}
    fi
    if [ "`vercmp $2 2.6.21`" -lt 0 ]; then
    echo ""
    echo "Important ACPI Information:"
    echo ">>> Since 2.6.20.7 all possible ACPI parts are modularized."
    echo ">>> The modules are located at:"
    echo ">>> /lib/modules/$(uname -r)/kernel/drivers/acpi"
    echo ">>> For more information about ACPI modules check this wiki page:"
    echo ">>> 'http://wiki.archlinux.org/index.php/ACPI_modules'"
    fi
    post_remove() {
    rm -f /boot/kernel26${KERNEL_NAME}.img
    rm -f /boot/kernel26${KERNEL_NAME}-fallback.img
    so, I just tar.gz the kernel26-livez folder which contains
    config
    config.x86_64
    kernel26.install
    kernel26.preset
    PKGBUILD
    and submit to AUR??
    first, I'm going to run it thru the motions on my 32bit and x86_64 arch installs to test it
    as I already have compiled it successfully, and now want to package it,etc
    thanks for all your help!
    PS
    I also have to make a AUR package for the linux-live-6.30_x86 and linux-live-6.3.0x86_64 remaster kits which this kernel is meant for
    and gotta figure out how to do that too...
    Last edited by 72linus (2010-09-27 20:26:04)

  • Dagii PKGBUILD, I need help again... :), problem with libpng

    I'm stumped on what to do to get this to compile. It seems to compile without issue on Gentoo; I didn't see any patches in the ebuild. I receive this error when trying to compile Dagii:
    make[1]: *** No rule to make target `/sw/include/libpng12/png.h', needed by `sshot.o'. Stop.
    make[1]: Leaving directory `/home/arcade/pkgs/dagii/src/dagii-0.4/src'
    make: *** [all] Error 2
    Immediately I see it pointing to /sw/include/libpng12/png.h which is weird. The makefile has the include path as /usr/include/libpng12, so I don't know where this other path is coming from.
    Here's the PKGBUILD, it's an easy one:
    # Contributor: robb_force <[email protected]>
    pkgname=dagii
    pkgver=0.4
    pkgrel=1
    pkgdesc="Dave's AGI Interpreter is a re-implementation of Sierra's Adventure Game Interpreter that allows you to play games such as King's Quest and Space Quest."
    url="http://www.dagii.org/"
    license="GPL"
    arch=('i686')
    depends=('sdl>=1.2.9' 'libpng>=1.2.8')
    makedepends=('zlib')
    source=(http://www.dagii.org/dist/${pkgname}-${pkgver}.tar.gz)
    build() {
    cd ${startdir}/src/${pkgname}-${pkgver}
    ./configure --prefix=/usr
    make || return 1
    make DESTDIR=${startdir}/pkg install
    Has anyone seen this error before?
    Last edited by robb_force (2007-05-18 19:11:59)

    Put this after your configure line, before make.
    sed -i -e 's|/sw/|/usr/|g' src/depend.1
    This will fix your issue but you'll run into another one.
    Last edited by tardo (2007-05-26 17:51:03)

  • First PKGBUILD attempt

    I wanted to create a PKGBUILD for Beyond Compare (diff/merge tool),  A .deb is provided, which simply needs to be converted to a .tar.gz and extracted to the root of the drive.
    The 64-bit package is not really a 64-bit application.  It just allows the application to run happily on a 64-bit OS.
    The PKGBUILD (see bottom) generates the expected packages.
    i686 namcap output:
    beyond-compare W: Referenced library 'libqtc.so.1' is an uninstalled dependency
    beyond-compare W: Dependency included and not needed ('lib32-qt')
    beyond-compare E: Missing custom license directory (usr/share/licenses/beyond-compare)
    x86_64 namcap output:
    beyond-compare W: Referenced library 'libqtc.so.1' is an uninstalled dependency
    beyond-compare W: Dependency included and not needed ('lib32-qt')
    beyond-compare E: ELF file (usr/lib32/beyondcompare/BCompare) outside of a valid path.
    beyond-compare E: ELF file (usr/lib32/beyondcompare/libqtc.so.1) outside of a valid path.
    beyond-compare E: ELF file (usr/lib32/beyondcompare/libqt-mt.so.3) outside of a valid path.
    beyond-compare E: Missing custom license directory (usr/share/licenses/beyond-compare)
    With regard to the warnings:
    'libqtc.so.1' is provided by the package itself (from the .deb).
    If I remove the dependency on 'lib32-qt', namcap complains about missing dependences :)
    'ldd /usr/bin/bcompare' returns "not a dynamic executable".
    I'm happy to contribute this PKGBUILD (see below), but I'd like to make sure I've done things properly before I attempt that.  Any advice anyone could offer would be greatly appreciated.
    # Maintainer: Magician <magician21 ett lycos daht com>
    pkgname=beyond-compare
    pkgver=3.1.11.12238
    pkgrel=1
    pkgdesc="Beyond Compare Diff/Merge Tool"
    arch=('i686' 'x86_64')
    url="http://www.scootersoftware.com"
    license=('custom')
    depends=('lib32-qt' 'lib32-qt3' 'sh')
    makedepends=()
    optdepends=()
    backup=()
    if [ "${CARCH}" = 'x86_64' ]; then
        ARCH='amd64'
        source=("http://www.scootersoftware.com/bcompare-${pkgver}_amd64.deb")
        noextract=("http://www.scootersoftware.com/bcompare-${pkgver}_amd64.deb")
        md5sums=('ac629c7b1ce18bd7a043a81bce2626ef')
    elif [ "${CARCH}" = 'i686' ]; then
        ARCH='i386'
        source=("http://www.scootersoftware.com/bcompare-${pkgver}_i386.deb")
        noextract=("http://www.scootersoftware.com/bcompare-${pkgver}_i386.deb")
        md5sums=('0459b3b905f4e1bf7d4235d4af0a33a8')
    fi
    build() {
      if [ "${CARCH}" = 'x86_64' ]; then
         FILE_BASE_NAME="bcompare-${pkgver}_amd64"
      elif [ "${CARCH}" = 'i686' ]; then
         FILE_BASE_NAME="bcompare-${pkgver}_i386"
      fi
      deb2targz $FILE_BASE_NAME.deb
      tar -zxf $FILE_BASE_NAME.tar.gz
      cp -r usr ${startdir}/pkg

    I wanted to create a PKGBUILD for Beyond Compare (diff/merge tool),  A .deb is provided, which simply needs to be converted to a .tar.gz and extracted to the root of the drive.
    The 64-bit package is not really a 64-bit application.  It just allows the application to run happily on a 64-bit OS.
    The PKGBUILD (see bottom) generates the expected packages.
    i686 namcap output:
    beyond-compare W: Referenced library 'libqtc.so.1' is an uninstalled dependency
    beyond-compare W: Dependency included and not needed ('lib32-qt')
    beyond-compare E: Missing custom license directory (usr/share/licenses/beyond-compare)
    x86_64 namcap output:
    beyond-compare W: Referenced library 'libqtc.so.1' is an uninstalled dependency
    beyond-compare W: Dependency included and not needed ('lib32-qt')
    beyond-compare E: ELF file (usr/lib32/beyondcompare/BCompare) outside of a valid path.
    beyond-compare E: ELF file (usr/lib32/beyondcompare/libqtc.so.1) outside of a valid path.
    beyond-compare E: ELF file (usr/lib32/beyondcompare/libqt-mt.so.3) outside of a valid path.
    beyond-compare E: Missing custom license directory (usr/share/licenses/beyond-compare)
    With regard to the warnings:
    'libqtc.so.1' is provided by the package itself (from the .deb).
    If I remove the dependency on 'lib32-qt', namcap complains about missing dependences :)
    'ldd /usr/bin/bcompare' returns "not a dynamic executable".
    I'm happy to contribute this PKGBUILD (see below), but I'd like to make sure I've done things properly before I attempt that.  Any advice anyone could offer would be greatly appreciated.
    # Maintainer: Magician <magician21 ett lycos daht com>
    pkgname=beyond-compare
    pkgver=3.1.11.12238
    pkgrel=1
    pkgdesc="Beyond Compare Diff/Merge Tool"
    arch=('i686' 'x86_64')
    url="http://www.scootersoftware.com"
    license=('custom')
    depends=('lib32-qt' 'lib32-qt3' 'sh')
    makedepends=()
    optdepends=()
    backup=()
    if [ "${CARCH}" = 'x86_64' ]; then
        ARCH='amd64'
        source=("http://www.scootersoftware.com/bcompare-${pkgver}_amd64.deb")
        noextract=("http://www.scootersoftware.com/bcompare-${pkgver}_amd64.deb")
        md5sums=('ac629c7b1ce18bd7a043a81bce2626ef')
    elif [ "${CARCH}" = 'i686' ]; then
        ARCH='i386'
        source=("http://www.scootersoftware.com/bcompare-${pkgver}_i386.deb")
        noextract=("http://www.scootersoftware.com/bcompare-${pkgver}_i386.deb")
        md5sums=('0459b3b905f4e1bf7d4235d4af0a33a8')
    fi
    build() {
      if [ "${CARCH}" = 'x86_64' ]; then
         FILE_BASE_NAME="bcompare-${pkgver}_amd64"
      elif [ "${CARCH}" = 'i686' ]; then
         FILE_BASE_NAME="bcompare-${pkgver}_i386"
      fi
      deb2targz $FILE_BASE_NAME.deb
      tar -zxf $FILE_BASE_NAME.tar.gz
      cp -r usr ${startdir}/pkg

  • First PKGBUILD, Faulty when Installed by Pacman?

    I'm trying to package this:
    Enigma-dev (git)
    http://enigma-dev.org/
    I'm having a problem with it when it gets installed by pacman, where it tries to compile itself again..
    PKGBUILD:
    pkgname=enigma-dev-git
    pkgver=0.0.0
    pkgrel=1
    pkgdesc="ENIGMA, the Extensible Non-Interpreted Game Maker Augmentation."
    url="http://enigma-dev.org"
    arch=('x86_64' 'i686')
    license=('GPL')
    depends=('alure' 'zlib' 'openal' 'libx11' 'libgl' 'mesa' 'gtk2' 'dumb' 'jre7-openjdk') # gcc in base-devel, not required to be listed.
    optdepends=()
    makedepends=('git' 'python')
    conflicts=('lateralgm')
    provides=('lateralgm')
    replaces=()
    backup=()
    source=('http://enigma-dev.org/docs/wiki/images/4/47/Lateralgmlogo.png') # putting the git url in here causes the python configuration to fail for some reason..
    md5sums=('e6daacba04f0491b256f8a4d2cc9181a')
    build() {
    if [[ -d $pkgname ]]; then
    msg "previous cloned repo detected, removing"
    rm -rf $pkgname
    fi
    msg "Cloning git repo.."
    git clone git://github.com/enigma-dev/enigma-dev.git ${pkgname}
    cd "${srcdir}/${pkgname}"
    msg "Starting python config.."
    python install.py
    cd "${srcdir}/${pkgname}/ENIGMAsystem/SHELL/"
    msg "Starting compile.."
    # make # fix for some errors.. stopped happening, so commenting this out.
    cd "${srcdir}/${pkgname}"
    make
    pkgver () {
    # this doesn't really work because pkgver is executed before build, so there is no local repo. and there is no apparent way to get remote revision numbers if there are no tags..
    # I tried cloning the repo here instead of in build, but that didn't work either.. so basically this only returns anything useful if you try and install it twice.
    cd "${srcdir}/${pkgname}"
    echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
    package() {
    cd "${srcdir}/${pkgname}"
    install -Dm644 ./pluginsource/COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"
    cp -r ./packages/linux/usr/share "${pkgdir}/usr"
    cp -r ./packages/linux/usr/bin "${pkgdir}/usr/bin"
    cp -r "${srcdir}/${pkgname}" "${pkgdir}/usr/share/${pkgname}"
    cd "${pkgdir}/usr/share/applications/"
    cat <<EOF > lateralgm.desktop # a quick hack for a lateralgm.desktop
    [Desktop Entry]
    Type=Application
    Name=LateralGM
    Exec=lateralgm
    Comment=Game Development IDE for Enigma written in java
    Icon=lateralgm
    Terminal=false
    Path=/usr/bin/
    Categories=Application;Development;IDE;
    StartupNotify=false
    MimeType=application;application/x-gm81;application/x-gmk;application/x-gm6;application/x-gmd;application/x-egm;application/x-gm50;application/x-gm51;application/x-gm52;application/x-gm53;application/x-gm60;application/x-gm61;application/x-gm71;application/x-gm80;application/x-gm81;
    EOF
    chmod +x lateralgm.desktop
    chmod +x enigma-dev.desktop
    cd "${pkgdir}/usr/bin/"
    cat <<EOF > lateralgm # and another so lateralgm exists in $PATH
    # excute lateralgm jar file.
    cd /usr/share/$pkgname/ # fix for strange bug, where you have to be in the same directory as lgm12b4.jar.
    java -jar lgm16b4.jar
    EOF
    chmod +x lateralgm
    cd ${pkgdir}
    mkdir -p ./usr/share/icons/hicolor/128x128/apps/
    mkdir -p ./usr/share/icons/hicolor/scalable/apps/
    mv "${startdir}/Lateralgmlogo.png" ${pkgdir}/usr/share/icons/hicolor/128x128/apps/lateralgm.png
    cd "${pkgdir}/usr/share/"
    cp ./pixmaps/enigma-dev.svg "${pkgdir}/usr/share/icons/hicolor/scalable/apps/enigma-dev.svg"
    # remove some extra stuff to help reduce package size; more of this is may be possible.
    rm -rf "${pkgdir}/usr/share/${pkgname}/packages"
    # vim:set ts=2 sw=2 et:
    based of these installation directions:
    http://enigma-dev.org/docs/Wiki/Install:Git
    (which I have followed and work fine)
    For one thing, there doesn't seem to be a install target for make, so I just copied the whole thing into /usr/share/ 
    My main problem is that normally the compilation is handeld by the java lateralgm program the first time it's run, though just running make works fine.
    until pacman installs it, that is.
    It still works after being copied, I can run it in $srcdir/enigma-dev-git/ ,
    but when I try and run it both by just running lateralgm and cd ing to /usr/share/enigma-dev-git/ then java -jar lgm16b4.jar it will try and compile enigma like it never was compiled in the first place (of course, it can't because it doesn't have root permissions)..
    I didn't see any diference in the permissions between $srcdir/enigma-dev-git/ and /usr/share/enigma-dev-git.
    I even tried having it install into ~/ with pacman just to see what happened but same thing..
    However, I can copy the contence of $srcdir to ~/ and it will work..
    Anyone know what might be the issue? (or how to improve anything else?)
    Thanks
    Last edited by gandalf3 (2013-05-23 18:37:36)

    Scimmia wrote:
    Have you tried simply dumping the whole thing to opt and putting a script in /usr/bin to run the necessary command? Just what all are you trying to copy to /usr and /usr/bin, anyway? It could very well be as simple as
    cd /opt/enigma-dev
    java -jar lgm16b4.jar
    Of course as Josh @ Dreamland points out, you need to make sure /opt/enigma-dev is world writable.
    That is exactly what is going into /usr/bin..
    Anyway, I get the same error when trying to run the jarfile directly, so it's  not the /usr/bin script..
    As for /usr, it's just all the icons and stuff that is in $srcdir/enigma-dev/packages/linux/usr/share
    ah.. so do have to change the permissions of /opt/enigma-dev-git..
    I thought that scince it was already compiled it wouldn't have to write anything to /opt/enigma-dev-git.. (I thought that it was lateralgm doing the writing when it compiled enigma, and I didn't have to worry because it already was compiled by then)
    I guess I misunderstood, I'm trying it now with permissions.
    EDIT:
    Seems to work, but is it AUR worthy?
    Here's where everything is now:
    PKBGUILD:
    pkgname=enigma-dev-git
    pkgver=0.0.0
    pkgrel=1
    pkgdesc="ENIGMA, the Extensible Non-Interpreted Game Maker Augmentation."
    url="http://enigma-dev.org"
    arch=('x86_64' 'i686')
    license=('GPL')
    depends=('alure' 'zlib' 'openal' 'libx11' 'libgl' 'mesa' 'gtk2' 'dumb' 'java-runtime') # gcc also a dependency, but in base-devel.
    optdepends=()
    makedepends=('git' 'python')
    conflicts=('lateralgm')
    provides=('lateralgm')
    replaces=()
    backup=()
    install='enigma-dev-git.install'
    source=('lateralgm' 'lateralgm.desktop' 'git://github.com/enigma-dev/enigma-dev.git' 'http://enigma-dev.org/docs/wiki/images/4/47/Lateralgmlogo.png') # putting the git url in here causes the python configuration to fail for some reason..
    md5sums=('c41602b12926d8462fb1cdb4753e4be7' 'd4894261248f2657614a177cd1a94bc3' 'SKIP' 'e6daacba04f0491b256f8a4d2cc9181a')
    build() {
    cd "${srcdir}/enigma-dev"
    msg "Starting python config.."
    python install.py
    cd "${srcdir}/enigma-dev/ENIGMAsystem/SHELL/"
    msg "Starting compile.."
    # make # fix for some errors.. stopped happening, so commenting this out.
    cd "${srcdir}/enigma-dev"
    make
    pkgver () {
    cd "${srcdir}/enigma-dev"
    echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
    package() {
    mkdir "${pkgdir}/opt/"
    install -Dm644 "${srcdir}/enigma-dev/pluginsource/COPYING" "$pkgdir/usr/share/licenses/$pkgname/COPYING"
    cp -r -a "${srcdir}/enigma-dev/packages/linux/usr/share" "${pkgdir}/usr"
    cp -r -a "${srcdir}/enigma-dev/packages/linux/usr/bin" "${pkgdir}/usr/bin"
    cp -r -a "${srcdir}/enigma-dev" "${pkgdir}/opt/${pkgname}"
    cd "${pkgdir}/usr/bin/"
    install -D "${srcdir}/lateralgm" "${pkgdir}/usr/bin/lateralgm"
    chmod +x "${pkgdir}/usr/bin/lateralgm"
    install -D "${srcdir}/lateralgm.desktop" "${pkgdir}/usr/share/applications/lateralgm.desktop"
    install -D "${srcdir}/Lateralgmlogo.png" ${pkgdir}/usr/share/icons/hicolor/128x128/apps/lateralgm.png
    install -D "${pkgdir}/usr/share/pixmaps/enigma-dev.svg" "${pkgdir}/usr/share/icons/hicolor/scalable/apps/enigma-dev.svg"
    # remove some extra stuff to help reduce package size; more of this is may be possible.
    rm -rf "${pkgdir}/usr/share/${pkgname}/packages"
    # vim:set ts=2 sw=2 et:
    enigma-dev-git.install:
    # arg 1: the new package version
    post_install() {
    chmod -R 766 /opt/enigma-dev-git
    # arg 1: the old package version
    pre_remove() {
    chmod -R 744 /opt/enigma-dev-git
    vim:set ts=2 sw=2 et:
    /usr/bin script:
    # excute lateralgm jar file.
    cd /opt/enigma-dev-git/ # fix for strange bug, where you have to be in the same directory as lgm16b4.jar.
    java -jar lgm16b4.jar
    Thanks..
    Last edited by gandalf3 (2013-05-28 21:28:23)

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

Maybe you are looking for