[SOLVED] PKGBUILD for a perl application (gscan2pdf)

Hello, I'm the maintainer of the package gscan2pdf and I have some problems to update the PKGBUILD
for the version 1.2.0. I'm a beginner, so perhaps I missed something that is well-known. The build() function contains
the following:
perl Makefile.PL
make
make DESTDIR=${pkgdir} install
But unfortunately it doesn't work. I get the following error when I run makepkg:
ln: target ‘usr/bin/’ is not a directory: No such file or directory
==> ERROR: A failure occurred in build().
Aborting...
By the way, the PKGBUILD is:
# Maintainer: Tristelune <tristelune1 at gmail dot com>
# Contributor: LeCrayonVert <greenarrow at archlinux dot us>
# Contributor: yugrotavele <yugrotavele at archlinux dot us>
# Contributor: Sven Salzwedel <[email protected]>
# Contributor: Olaf Leidinger <[email protected]>
pkgname=gscan2pdf
pkgver=1.2.0
pkgrel=1
pkgdesc='A GUI to produce a multipage PDF from a scan'
arch=('i686' 'x86_64')
url='http://gscan2pdf.sourceforge.net/'
license=('GPL')
depends=('xsane' 'gtk2-perl' 'perl-locale-gettext' 'libtiff' 'sane'
'perl-gtk2-ex-simple-list' 'imagemagick' 'perl-config-general>=2.40'
'perl-pdf-api2' 'perl-goo-canvas' 'perl-gtk2-imageview' 'perl-sane'
'perl-test-critic' 'perl-set-intspan' 'perl-proc-processtable' 'perl-log-log4perl' 'perl-html-parser' 'perl-try-tiny' 'unpaper' )
optdepends=('djvulibre' 'gocr' 'ocropus' 'xdg-utils' 'tesseract' 'cuneiform' )
source=(http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz)
sha512sums=('98546936ff2b178c8047f46e6b38d0e9244e51cecbbfa69bf3f08d9f71cbbab261e47f8f5514558a892d5e7a178eb67c1cb3db50eb75b5d6a0a08cadb0095a17')
build() {
cd ${srcdir}/${pkgname}-${pkgver}
perl Makefile.PL
make
make DESTDIR=${pkgdir} install
# Create symlinks to /usr/bin/site_perl/* in /usr/bin/
cd ${pkgdir}
ln -sf site_perl/gscan2pdf usr/bin/
ln -sf site_perl/scanadf-perl usr/bin/
ln -sf site_perl/scanimage-perl usr/bin/
# Standard perl cleaning
/usr/bin/find ${pkgdir} -name '.packlist' -o -name 'perllocal.pod' -delete
package() {
# Create symlinks to /usr/bin/site_perl/* in /usr/bin/
cd ${pkgdir}
ln -sf site_perl/gscan2pdf usr/bin/
ln -sf site_perl/scanadf-perl usr/bin/
ln -sf site_perl/scanimage-perl usr/bin/
After searching what is wrong, I saw some files are installed in the HOME directory of the user, what I don't want to. I was told, I should rather change
perl Makefile.PL
make
make DESTDIR=${pkgdir} install
to
perl Makefile.PL INSTALL_BASE=${pkgdir}
make
make install
But I still have the problem. This time, it's the following:
$ makepkg
msgfmt -c po/gscan2pdf-ab.po -o /usr/share/locale/ab/LC_MESSAGES/gscan2pdf.mo
msgfmt -c po/gscan2pdf-bg.po -o /usr/share/locale/bg/LC_MESSAGES/gscan2pdf.mo
msgfmt -c po/gscan2pdf-ca.po -o /usr/share/locale/ca/LC_MESSAGES/gscan2pdf.mo
po/gscan2pdf-ab.po:7: warning: header field 'Language' missing in header
msgfmt: error while opening "/usr/share/locale/ab/LC_MESSAGES/gscan2pdf.mo" for writing: Permission denied
Makefile:1036: recipe for target '/usr/share/locale/ab/LC_MESSAGES/gscan2pdf.mo' failed
make: *** [/usr/share/locale/ab/LC_MESSAGES/gscan2pdf.mo] Error 1
make: *** Waiting for unfinished jobs....
po/gscan2pdf-be.po:7: warning: header field 'Language' missing in header
msgfmt: error while opening "/usr/share/locale/be/LC_MESSAGES/gscan2pdf.mo" for writing: Permission denied
Makefile:1036: recipe for target '/usr/share/locale/be/LC_MESSAGES/gscan2pdf.mo' failed
make: *** [/usr/share/locale/be/LC_MESSAGES/gscan2pdf.mo] Error 1
po/gscan2pdf-bg.po:7: warning: header field 'Language' missing in header
msgfmt: error while opening "/usr/share/locale/bg/LC_MESSAGES/gscan2pdf.mo" for writing: Permission denied
Makefile:1036: recipe for target '/usr/share/locale/bg/LC_MESSAGES/gscan2pdf.mo' failed
make: *** [/usr/share/locale/bg/LC_MESSAGES/gscan2pdf.mo] Error 1
po/gscan2pdf-ca.po:7: warning: header field 'Language' missing in header
msgfmt: error while opening "/usr/share/locale/ca/LC_MESSAGES/gscan2pdf.mo" for writing: Permission denied
Makefile:1036: recipe for target '/usr/share/locale/ca/LC_MESSAGES/gscan2pdf.mo' failed
make: *** [/usr/share/locale/ca/LC_MESSAGES/gscan2pdf.mo] Error 1
==> ERROR: A failure occurred in build().
Aborting...
It's because during the creation of the PKGBUILD, some files are installed in /usr/share/ rather than usr/share.
I had a look at the  Makefile.PL and it seems I can specify the location of usr/share with the variables SHAREINSTDIR and
SHAREDIR. But it's unclear for me If I have to set both. And perhaps the most important question: did I miss some perl Tool or am I going
in the right direction ?
Thank you!
Last edited by Tristelune (2013-12-06 11:52:05)

I have found the problem. I had the following in my .zshrc:
export PERL_LOCAL_LIB_ROOT="/home/user/perl5:$PERL_LOCAL_LIB_ROOT";
export PERL_MB_OPT="--install_base "/home/user/perl5"";
export PERL_MM_OPT="INSTALL_BASE=/home/user/perl5";
export PERL5LIB="/home/user/perl5/lib/perl5:$PERL5LIB";
Without those variables, nothing is installed in my HOME.
So the package can be updated now!

Similar Messages

  • [SOLVED] PKGBUILD for a font - xset fails when X not running

    I am working on my second PKGBUILD -- this time for a simple raster font I use.  The PKGBUILD uses a post_install() which does an "xset -fp rehash" after installing the font files, because it seemed like otherwise the font wouldn't show up in X.  Then in tests I found that the install died with errors when I installed my package without X running.  How is this situation normally handled?
    Last edited by scottfial (2010-07-09 08:04:21)

    xset will fail if X isn't running.  Font packages generally have an install file like this:
    # arg 1: the new package version
    post_install() {
    echo -n "Updating font cache... "
    fc-cache -f > /dev/null
    mkfontscale /usr/share/fonts/local
    mkfontdir /usr/share/fonts/local
    echo "done."
    # # arg 1: the new package version
    # # arg 2: the old package version
    post_upgrade() {
    post_install $1
    # # arg 1: the old package version
    post_remove() {
    post_install $1
    The user can then either run xset manually or logout/login after installation.

  • [Solved] PKGBUILD for a Wine driven program - read&write permissions

    Hello everybody,
    I have stumbled upon a tricky problem when following these guidelines: https://wiki.archlinux.org/index.php/Wi … bin_script My problem is: The program needs to read a big folder which should stay in /opt and ist linked to ~/. Copying instead of linking is not an option due to big file size. However, the big folder has a small subfolder which should have write access for the user. Any hints on how to manage this?
    Thanks for any hints,
    PhotonX
    edit: Problem solved by creating the big directory in ~/, then linking all subdirectories with read access only and copying all subdirectories with read&write access.
    Last edited by PhotonX (2014-07-09 07:08:26)

    In system preferences on both macbook's , you need to go to file sharing and making sure it's on for both ,click on options and enable smb for windows. follow instructions. I am assuming that the external drive has windows formate on it.

  • [SOLVED] (PKGBUILD) problem with makepkg for go-openoffice

    [SOLVED]: In the PKGBUILD, there's a function before build(), named mksource() and a comment "source PKGBUILD && mksource".
    Just run it first, then copy the "/tmp/go-openoffice-source/go-openoffice-ooo320-m12.tar.xz", run "makepkg -s" as usual.
    Thanks :D
    Hi, I tried to makepkg for extra/go-openoffice (from abs) by using "makepkg -s" on my x86_64 laptop, and get the following error (before the build begin):
    ==> ERROR: go-openoffice-ooo320-m12.tar.xz was not found in the build directory and is not a URL.
    I understand that this comes from
    pkgname=go-openoffice
    _ootag=ooo320-m12 # m12 = OOo 3.2.0 RC5
    source=(${_mirror}/${_go_tree}/ooo-build-${_GOver}.tar.gz
        ArchLinux.patch
        ${pkgname}-${_ootag}.tar.xz
    But, I don't know where to find this "go-openoffice-ooo320-m12.tar.xz". Can you please help me to figure out where to find it? Thank you!
    Following is the PKGBUILD for extra/go-openoffice (from abs)
    # $Id: PKGBUILD 74152 2010-03-30 17:02:00Z andyrtr $
    # Maintainer: AndyRTR <[email protected]>
    pkgname=go-openoffice
    _GOver=3.2.0.9 # = post OOo 3.2.0 final bugfix
    pkgver=${_GOver}
    pkgrel=1
    pkgdesc="OpenOffice.org - go-oo.org enhanced version of SUN's office suite"
    arch=('i686' 'x86_64')
    _go_tree="OOO320"
    _ootag=ooo320-m12 # m12 = OOo 3.2.0 RC5
    license=('LGPL3')
    url="http://go-oo.org/"
    install=${pkgname}.install
    depends=("curl>=7.19.6" "hunspell>=1.2.8" "python>=2.6.4" 'libwpd' 'redland>=1.0.10'
    'libxaw' "neon>=0.28.6" "icu>=4.2.1" 'hsqldb-java' 'libxslt' 'libxtst' 'lpsolve'
    'beanshell' 'saxon' 'vigra' 'hyphen' 'libmspack' 'libldap' 'gtk2' 'lucene'
    'hicolor-icon-theme' 'shared-mime-info' 'desktop-file-utils') # 'libmythes' 'libgraphite'
    optdepends=('java-runtime: adds java support'
    'libcups: adds printing support'
    'gconf: adds additional gnome support'
    'nss: adds support for signed files/macros'
    'pstoedit: translates PostScript and PDF graphics into other vector formats'
    'poppler: for the pdfimport extension'
    'mesa: for the OGLTrans extension'
    'mono: allows UNO automation with Mono'
    'gstreamer0.10-base: + some gstr-plugins to support multimedia content, e.g. in impress'
    'kdelibs: for kde integration')
    makedepends=('automake' 'autoconf' 'wget' 'bison' 'findutils' 'flex' 'gawk' 'gcc-libs' 'libart-lgpl'
    'pam' 'sane' 'perl-archive-zip' 'pkgconfig' 'unzip' 'zip' "xulrunner>=1.9.2-4" 'apache-ant' 'cairo'
    'gperf' 'libcups' 'pstoedit' 'gconf' "openjdk6>=1.5.2" 'unixodbc' 'mesa>=7.5' 'poppler>=0.10.7'
    'gstreamer0.10-base>=0.10.26' 'mono>=2.6.1' 'kdelibs>=4.4.0' 'libjpeg' 'boost' 'git' 'rsync')
    backup=(usr/lib/go-openoffice/program/sofficerc)
    provides=('openoffice-base')
    conflicts=('openoffice-base')
    _mirror="http://download.go-oo.org/"
    source=(${_mirror}/${_go_tree}/ooo-build-${_GOver}.tar.gz
    ArchLinux.patch
    ${pkgname}-${_ootag}.tar.xz
    http://download.go-oo.org//DEV300/ooo-cli-prebuilt-3.2.tar.bz2
    http://cairographics.org/releases//cairo-1.4.10.tar.gz
    http://download.go-oo.org//SRC680/mdbtools-0.6pre1.tar.gz
    http://download.go-oo.org//SRC680/extras-3.tar.bz2
    http://download.go-oo.org//SRC680/biblio.tar.bz2
    http://tools.openoffice.org/unowinreg_prebuild/680//unowinreg.dll
    http://download.go-oo.org//DEV300/scsolver.2008-10-30.tar.bz2
    http://download.go-oo.org//libwpd/libwpd-0.8.14.tar.gz
    http://download.go-oo.org//SRC680/libwps-0.1.2.tar.gz
    http://download.go-oo.org//SRC680/libwpg-0.1.3.tar.gz
    http://download.go-oo.org//DEV300/ooo_oxygen_images-2009-06-17.tar.gz
    http://download.go-oo.org/src//seamonkey-1.1.14.source.tar.gz
    http://archive.apache.org/dist/ant/binaries/apache-ant-1.7.0-bin.tar.gz
    buildfix_64bit_system_libjpeg.diff
    system-redland.patch
    localize-ooo.diff)
    #options=('!distcc' '!ccache' '!makeflags')
    options=('!makeflags')
    noextract=(ooo-cli-prebuilt-3.2.tar.bz2 cairo-1.4.10.tar.gz mdbtools-0.6pre1.tar.gz extras-3.tar.bz2 biblio.tar.bz2 unowinreg.dll
    scsolver.2008-10-30.tar.bz2 libwpd-0.8.14.tar.gz libwps-0.1.2.tar.gz libwpg-0.1.3.tar.gz ooo_oxygen_images-2009-06-17.tar.gz)
    # source PKGBUILD && mksource
    mksource() {
    mkdir /tmp/$pkgname-source
    pushd /tmp/$pkgname-source
    wget ${_mirror}/${_go_tree}/ooo-build-${_GOver}.tar.gz
    tar -xvf ooo-build-${_GOver}.tar.gz
    cd ooo-build-${_GOver}
    ./configure --quiet --with-distro=ArchLinux
    ./download --all
    pushd src; tar -cvJf ../../${pkgname}-${_ootag}.tar.xz clone; popd
    popd
    build() {
    unset J2REDIR; unset J2SDKDIR; unset JAVA_HOME; unset CLASSPATH
    [ -z "${JAVA_HOME}" ] && . /etc/profile.d/openjdk6.sh
    [ -z "${MOZ_PLUGIN_PATH}" ] && . /etc/profile.d/mozilla-common.sh
    [ -z "${ANT_HOME}" ] && . /etc/profile.d/apache-ant.sh
    cd ${srcdir}/ooo-build-${_GOver}
    # our ArchLinux distribution patch until we go upstream
    patch -Np0 -i ${srcdir}/ArchLinux.patch || return 1
    # buildfix for broken language settings in build
    patch -Np0 -i ${srcdir}/localize-ooo.diff || return 1
    # fix bugs with recent system redland
    patch -Np1 -i ${srcdir}/system-redland.patch || return 1
    # hotfixes not yet upstream
    # cp ${srcdir}/*.diff ${srcdir}/ooo-build-${_GOver}/patches/hotfixes/
    cp ${srcdir}/buildfix_64bit_system_libjpeg.diff ${srcdir}/ooo-build-${_GOver}/patches/hotfixes/
    # export C(XX)FLAGS
    # http://www.openoffice.org/issues/show_bug.cgi?id=103205
    unset CFLAGS
    unset CXXFLAGS
    # export ARCH_FLAGS="$CFLAGS"
    if [ "$CARCH" = "x86_64" ]; then
    EXTRAOPTS="--without-stlport"
    else EXTRAOPTS="--with-stlport"
    fi
    # autoreconf
    ./configure --with-distro=ArchLinux \
    --with-build-version="${_GOver} ArchLinux build-${pkgrel} (${_ootag})"\
    --with-srcdir=${srcdir} \
    --with-max-jobs=${MAKEFLAGS/-j/} \
    --with-installed-ooo-dirname="${pkgname}" \
    --prefix=/usr --exec-prefix=/usr --sysconfdir=/etc \
    --with-docdir=/usr/share/doc/packages/"${pkgname}" \
    --mandir=/usr/share/man \
    --with-lang="" \
    --with-dict=ALL\
    --with-binsuffix=no \
    --disable-ldap \
    --enable-cairo\
    --disable-kde\
    --enable-kde4\
    --enable-lockdown\
    --with-system-boost\
    --with-system-cairo\
    --enable-crashdump\
    --without-gpc\
    --enable-opengl \
    --enable-minimizer \
    --enable-presenter-console \
    --enable-pdfimport \
    --enable-wiki-publisher \
    --enable-ogltrans \
    --with-ant-home="/usr/share/java/apache-ant"\
    --with-system-saxon\
    --with-saxon-jar=/usr/share/java/saxon/saxon9he.jar\
    --with-system-lucene\
    --with-lucene-core-jar=/usr/share/java/lucene-core.jar\
    --with-lucene-analyzers-jar=/usr/share/java/lucene-analyzers.jar\
    --with-system-beanshell\
    --with-system-vigra\
    --with-system-altlinuxhyph\
    --with-system-lpsolve\
    $EXTRAOPTS || return 1
    # --with-system-mythes\
    # --with-system-graphite\
    # --with-tag=${_ootag}
    # --enable-report-builder \
    # --with-additional-sections="OOXMLExport"
    unset MAKEFLAGS
    # ./download
    LD_PRELOAD="" make || return 1
    package() {
    cd ${srcdir}/ooo-build-${_GOver}
    LD_PRELOAD="" make DESTDIR=${pkgdir} install || return 1
    # install all built dictionaries from source tree
    pushd ${srcdir}/ooo-build-${_GOver}/build/${_ootag}/dictionaries/unxlng?6.pro/bin/
    for i in `ls -1 dict-??.oxt`; do
    install -D -m644 $i ${pkgdir}/usr/lib/"${pkgname}"/share/extension/install/$i || return 1
    done
    popd
    # install all other built extensions
    pushd ${srcdir}/ooo-build-${_GOver}/build/${_ootag}/solver/320/unxlng?6.pro/bin/
    install -m644 pdfimport/pdfimport.oxt ${pkgdir}/usr/lib/"${pkgname}"/share/extension/install/pdfimport.oxt || return 1
    install -m644 swext/wiki-publisher.oxt ${pkgdir}/usr/lib/"${pkgname}"/share/extension/install/wiki-publisher.oxt || return 1
    install -m644 minimizer/sun-presentation-minimizer.oxt ${pkgdir}/usr/lib/"${pkgname}"/share/extension/install/sun-presentation-minimizer.oxt || return 1
    install -m644 presenter/presenter-screen.oxt ${pkgdir}/usr/lib/"${pkgname}"/share/extension/install/presenter-screen.oxt || return 1
    popd
    # fix unopkg call for mktemp, #15410
    sed -i "s:\/bin\/mktemp:\/usr\/bin\/mktemp:" ${pkgdir}/usr/lib/go-openoffice/program/unopkg || return 1
    #fix http://bugs.archlinux.org/task/17656
    find ${pkgdir} -perm 444 -exec ls -lh {} \;
    find ${pkgdir} -perm 444 -exec chmod 644 {} \;
    find ${pkgdir} -perm 555 -exec ls -lh {} \;
    find ${pkgdir} -perm 555 -exec chmod 755 {} \;
    Last edited by timefairy (2010-04-08 10:41:35)

    jryarch wrote:Thanks for your response, how do I actually run it automated? I'm doing it manual right now, but I suppose that's not the idea.
    I suppose that the function can be run as $1, I don't know (I mean `bash PKGBUILD mksource`). Nevertheless, you know what to do now
    Last edited by flamelab (2010-04-07 11:44:58)

  • [SOLVED] PKGBUILD equivalents for other distros

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

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

  • [Solved] PKGBUILD Update for powerpanel

    This is the third of five packages I'm looking at, per the original post.
    The third package is aur/powerpanel (1.2.3-3). This one was a little curious; it claimed to install a binary under /usr/sbin, but the end package would have no non-'meta' files in it at all (and thus would install nothing). I believe this is due to the use of $startdir in the original PKGBUILD, though I can't be certain.
    Flagged as before, but no inspection of the source as this fetches a pre-built binary from the vendor. No issues so far at my end (and hopefully none for anyone else). Of course, this means that once again, the only affected file was the PKGBUILD, for which I include updates below.
    PKGBUILD.diff (to make a new PKGBUILD) -- In addition to correcting the install path, this fixes an error and several warnings noted by namcap, and also several warnings by makepkg.
    Edited 09 June 2013 per Scimmia [#1285083]
    --- PKGBUILD 2013-02-14 19:26:52.000000000 +1100
    +++ PKGBUILD 2013-06-09 14:30:24.034932202 +1000
    @@ -2,68 +2,70 @@
    pkgname=powerpanel
    pkgver=1.2.3
    pkgrel=3
    -pkgdesc="PowerPanel for Linux software can be used with most CyberPower UPS products."
    -arch=("x86_64" "i686")
    -url="http://www.cyberpowersystems.com"
    +pkgdesc="This Linux package can be used with most CyberPower UPS products."
    +arch=('x86_64' 'i686')
    +url="http://www.cyberpowersystems.com/"
    license=("custom:CyberPower")
    -depends=('libusb')
    -source=(http://www.cyberpowersystems.com/software/powerpanel_123_x86_64.tar.gz pwrstatd.service)
    +depends=('bash')
    +source=(pwrstatd.service)
    backup=(etc/powerpanel/pwrstatd-{powerfail,lowbatt,email}.sh
    etc/pwrstatd.conf)
    if [ $CARCH = 'x86_64' ]; then
    - md5sums=('0226b17e9470b93cd1e4fd2f149c5d05'
    - '1d92c092af4bbb55add35d30c6b37252')
    +source+=("http://www.cyberpowersystems.com/software/powerpanel_123_x86_64.tar.gz")
    +md5sums=('1d92c092af4bbb55add35d30c6b37252'
    + '0226b17e9470b93cd1e4fd2f149c5d05')
    fi
    if [ $CARCH = 'i686' ]; then
    -source=(http://www.cyberpowersystems.com/software/powerpanel_123_i386.tar.gz)
    - md5sums=('79d1b60f5146b5286c786c93b90e6c87'
    - '1d92c092af4bbb55add35d30c6b37252')
    +source+=("http://www.cyberpowersystems.com/software/powerpanel_123_i386.tar.gz")
    +md5sums=('1d92c092af4bbb55add35d30c6b37252'
    + '79d1b60f5146b5286c786c93b90e6c87')
    fi
    -build() {
    - cd $startdir/src/$pkgname-$pkgver-0
    -# copy files
    +package() {
    +
    +# File install operations.
    # PowerPanel for Linux client program
    -install -Dm755 bin/pwrstat $startdir/pkg/usr/bin/pwrstat
    +install -Dm755 "$srcdir/$pkgname-$pkgver-0/bin/pwrstat" "$pkgdir/usr/bin/pwrstat"
    # PowerPanel for Linux daemon program
    -install -Dm755 bin/pwrstatd $startdir/pkg/usr/sbin/pwrstatd
    +install -Dm755 "$srcdir/$pkgname-$pkgver-0/bin/pwrstatd" "$pkgdir/usr/bin/pwrstatd"
    # PowerPanel for Linux daemon configuration
    -install -Dm600 conf/pwrstatd.conf $startdir/pkg/etc/pwrstatd.conf
    -sed -e 's#/etc#/etc/powerpanel#' -i $startdir/pkg/etc/pwrstatd.conf
    +install -Dm644 "$srcdir/$pkgname-$pkgver-0/conf/pwrstatd.conf" "$pkgdir/etc/pwrstatd.conf"
    +sed -e 's#/etc#/etc/powerpanel#' -i "$pkgdir/etc/pwrstatd.conf"
    # Script command for event of power failure
    -install -Dm755 script/pwrstatd-powerfail.sh $startdir/pkg/etc/powerpanel/pwrstatd-powerfail.sh
    +install -Dm755 "$srcdir/$pkgname-$pkgver-0/script/pwrstatd-powerfail.sh" "$pkgdir/etc/powerpanel/pwrstatd-powerfail.sh"
    # Script command for event of battery low
    -install -Dm755 script/pwrstatd-lowbatt.sh $startdir/pkg/etc/powerpanel/pwrstatd-lowbatt.sh
    +install -Dm755 "$srcdir/$pkgname-$pkgver-0/script/pwrstatd-lowbatt.sh" "$pkgdir/etc/powerpanel/pwrstatd-lowbatt.sh"
    # Script command for e-mail notification
    -install -Dm755 script/pwrstatd-email.sh $startdir/pkg/etc/powerpanel/pwrstatd-email.sh
    +install -Dm755 "$srcdir/$pkgname-$pkgver-0/script/pwrstatd-email.sh" "$pkgdir/etc/powerpanel/pwrstatd-email.sh"
    # Script command for Daemon startup control
    -install -Dm755 script/arch_pwrstatd $startdir/pkg/etc/rc.d/pwrstatd
    +install -Dm755 "$srcdir/$pkgname-$pkgver-0/script/arch_pwrstatd" "$pkgdir/etc/rc.d/pwrstatd"
    # Systemd unit
    -install -Dm644 ../pwrstatd.service $startdir/pkg/usr/lib/systemd/system/pwrstatd.service
    +install -Dm644 pwrstatd.service "$pkgdir/usr/lib/systemd/system/pwrstatd.service"
    # PowerPanel for Linux client man-page
    -install -Dm644 doc/pwrstat.8 $startdir/pkg/usr/share/man/man8/pwrstat.8
    +install -Dm644 "$srcdir/$pkgname-$pkgver-0/doc/pwrstat.8" "$pkgdir/usr/share/man/man8/pwrstat.8"
    # PowerPanel for Linux daemon man-page
    -install -Dm644 doc/pwrstatd.8 $startdir/pkg/usr/share/man/man8/pwrstatd.8
    +install -Dm644 "$srcdir/$pkgname-$pkgver-0/doc/pwrstatd.8" "$pkgdir/usr/share/man/man8/pwrstatd.8"
    -# compress the man page file
    -gzip -9 $startdir/pkg/usr/share/man/man8/pwrstat.8
    -gzip -9 $startdir/pkg/usr/share/man/man8/pwrstatd.8
    +# PowerPanel license file
    +install -Dm644 "$srcdir/$pkgname-$pkgver-0/doc/LICENSE" "$pkgdir/usr/share/licenses/powerpanel/LICENSE"
    +# PowerPanel additional documentation
    +install -Dm644 "$srcdir/$pkgname-$pkgver-0/doc/README" "$pkgdir/usr/share/doc/powerpanel/README"
    +install -Dm644 "$srcdir/$pkgname-$pkgver-0/doc/deploy-guide" "$pkgdir/usr/share/doc/powerpanel/deploy-guide"
    +install -Dm644 "$srcdir/$pkgname-$pkgver-0/doc/install-guide" "$pkgdir/usr/share/doc/powerpanel/install-guide"
    +install -Dm644 "$srcdir/$pkgname-$pkgver-0/doc/user-manual" "$pkgdir/usr/share/doc/powerpanel/user-manual"
    +}
    A fair number of changes, but mostly straightforwards, and I did otherwise try and make as few changes as possible to the original PKGBUILD. Again, any (constructive) feedback is welcome. I will of course add a comment to the package page in AUR noting this topic.
    Last edited by aexoxea (2013-06-10 04:42:08)

    Scimmia wrote:
    "md5sums+=" works, too.
    I would try to include $pkgver in the source array, something like ${pkgver//./} to get rid of the dots. That way you only have to update the pkgver at the top on an update.
    [#1285717]
    Good point about the md5sums= and also about using variables in the source= (which I note a number of packages indeed do).
    As it is, the maintainer has yesterday updated the PKGBUILD (using only some of the changes from the above), so I'm going to mark this thread as 'solved', but will take note of everything above for future PKGBUILDs that I write or modify (I'm sure this one won't be the last).

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

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

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

  • [Solved] PKGBUILD Update for ufs-tools

    This is the second of five packages I'm looking at, per the original post.
    This time, the package is aur/ufs-tools (0.1-1), which installs a binary under /sbin. Flagged as before, no apparent hard-coded paths in the source, and it seems to be operable from /usr/bin, so once again, only a build issue. The only affected file here is the PKGBUILD, for which I include updates below.
    PKGBUILD.diff (to make a new PKGBUILD) -- In addition to correcting the install path, this fixes an error and several warnings noted by namcap, and also a warning by makepkg about the lack of a package() function.
    Edited 09 June 2013 per Scimmia [#1285088]
    --- PKGBUILD 2011-07-12 01:10:50.000000000 +1000
    +++ PKGBUILD 2013-06-09 13:48:15.088487843 +1000
    @@ -4,13 +4,11 @@
    pkgver=0.1
    pkgrel=1
    pkgdesc="Utility for creating UFS 1 & 2 filesystems on Linux"
    -arch=(i686 x86_64)
    -# http://downloads.sourceforge.net/project/ufs-linux/ufs-tools/0.1/ufs-tools-0.1.tar.bz2?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fufs-linux%2F&ts=1309898303&use_mirror=voxel
    +arch=('i686' 'x86_64')
    url="http://ufs-linux.sourceforge.net/"
    license=('GPL')
    -depends=(gcc libbsd)
    -#install=
    -source=(http://downloads.sourceforge.net/project/ufs-linux/ufs-tools/0.1/$pkgname-$pkgver.tar.bz2
    +depends=('libbsd')
    +source=("http://downloads.sourceforge.net/project/ufs-linux/ufs-tools/0.1/$pkgname-$pkgver.tar.bz2"
    ufs-tools.patch)
    md5sums=('c4a78473c8b5267b2799b53c878edaad'
    @@ -18,15 +16,19 @@
    build() {
    cd "$srcdir/$pkgname-$pkgver"
    +
    patch -p1 < ../ufs-tools.patch
    +
    cd libufs
    - make || return 1
    + make
    +
    cd ..
    - make # DESTDIR="$pkgdir/" install
    - mkdir -p $pkgdir/sbin
    - mkdir -p $pkgdir/usr/lib
    - cp $srcdir/$pkgname-$pkgver/libufs/libufs.so.1.0 $pkgdir/usr/lib/.
    - ln -s $pkgdir/usr/lib/libufs.so.1.0 $pkgdir/usr/lib/libufs.so.1
    - cp $srcdir/$pkgname-$pkgver/mkufs $pkgdir/sbin/.
    + make
    +}
    +
    +package() {
    + install -D "$srcdir/$pkgname-$pkgver/libufs/libufs.so.1.0" "$pkgdir/usr/lib/libufs.so.1.0"
    + ln -rs "$pkgdir/usr/lib/libufs.so.1.0" "$pkgdir/usr/lib/libufs.so.1"
    +
    + install -D "$srcdir/$pkgname-$pkgver/mkufs" "$pkgdir/usr/bin/mkufs"
    If you wanted a 'mkfs.ufs' similar to the other tools, you could also include this line in the new PKGBUILD as the last instruction before the closing brace of package(); I could not determine for certain if this would conflict with a file in any other package, but I do not believe it should (unless there is a different package providing UFS tools). I didn't include it above however to avoid the risk, and also as it was not in the original PKGBUILD:
    ln -rs "$pkgdir/usr/bin/mkufs" "$pkgdir/usr/bin/mkfs.ufs"
    Any (constructive) feedback is welcome; I tried to make as few changes as possible to the original PKGBUILD, so apologies if I missed correcting/adjusting other things that should have been changed as well. I will of course add a comment to the package page in AUR noting this topic.
    Last edited by aexoxea (2015-05-13 13:36:21)

    Scimmia wrote:
    Get rid of "|| return 1", it's no longer needed.
    Don't just cp a file. Use install if it's individual files or cp -a if it's an entire dir structure. Install will also make the dest dirs for you with the -D option, so get rid of the mkdir commands as well.
    Quote all paths which include variables.
    [#1285088]
    Changes made (and now reflected in the OP), and these points noted for future work. The feedback is much appreciated .

  • PKGBUILD for custom kernel issue

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

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

  • Making pkgbuild for keytouch

    I'm trying to make a pkgbuild for keytouch
    But as it's my first pkgbuild, I have some problems:
    1) the docs say you need the following packages to be installed:
    - GTK 2
    - gksu
    - X11 and Xlib
    gtk2 and gksu are in pacman, but what do I have to add for X11 and Xlib?
    2) running makepkg runs into an error:
    mkdir /home/tom/download/PKGbuilds/keytouch/test1/pkg/usr/bin
    /bin/install -c keytouchd /home/tom/download/PKGbuilds/keytouch/test1/pkg/usr/bin/keytouchd
    XSESSION_KEYTOUCHD_LINE="keytouchd &";
    XSESSION_DIR="/etc/X11/Xsession.d";
    if [ -d $XSESSION_DIR ]; then
    echo "$XSESSION_KEYTOUCHD_LINE" > $XSESSION_DIR/40keytouchd;
    chmod +x $XSESSION_DIR/40keytouchd;
    else
    XSESSION_FILE="/etc/X11/Xsession";
    if [ "`grep "$XSESSION_KEYTOUCHD_LINE" "$XSESSION_FILE" -m 1 -h`" != "$XSESSION_KEYTOUCHD_LINE" ]; then
    XSESSION_TMP=`cat "$XSESSION_FILE"`;
    echo "$XSESSION_KEYTOUCHD_LINE" > $XSESSION_FILE;
    echo "$XSESSION_TMP" >> $XSESSION_FILE;
    fi
    fi
    /bin/sh: /etc/X11/Xsession.d/40keytouchd: Permission denied
    chmod: cannot access `/etc/X11/Xsession.d/40keytouchd': No such file or directory
    make[2]: *** [install-data-local] Error 1
    make[2]: Leaving directory `/home/tom/download/PKGbuilds/keytouch/test1/src/keytouch-2.0/keytouchd'
    make[1]: *** [install-am] Error 2
    make[1]: Leaving directory `/home/tom/download/PKGbuilds/keytouch/test1/src/keytouch-2.0/keytouchd'
    make: *** [install-recursive] Error 1
    ==> ERROR: Build Failed. Aborting...
    It produces this error on the make install, and I thinks it's because the src/keytouch-2.0/keytouchd/Makefile.am contains the following:
    install-data-local:
    @$(NORMAL_INSTALL)
    XSESSION_KEYTOUCHD_LINE="keytouchd &";
    XSESSION_DIR="$(DESTDIR)/etc/X11/Xsession.d";
    if [ -d $$XSESSION_DIR ]; then
    echo "$$XSESSION_KEYTOUCHD_LINE" > $$XSESSION_DIR/40keytouchd;
    chmod +x $$XSESSION_DIR/40keytouchd;
    else
    XSESSION_FILE="/etc/X11/Xsession";
    if [ "`grep "$$XSESSION_KEYTOUCHD_LINE" "$$XSESSION_FILE" -m 1 -h`" != "$$XSESSION_KEYTOUCHD_LINE" ]; then
    XSESSION_TMP=`cat "$$XSESSION_FILE"`;
    echo "$$XSESSION_KEYTOUCHD_LINE" > $$XSESSION_FILE;
    echo "$$XSESSION_TMP" >> $$XSESSION_FILE;
    fi
    fi
    The make install tries to write directly to /etc/X11/Xsession, which is not allowed while make the pkg.
    How do I solve this problem?
    The pkgbuild so far:
    # $Id: PKGBUILD,v 1.0 2005/21/11 $
    # Maintainer: mouse256
    pkgname=keytouch
    pkgver=2.0.0
    pkgrel=1
    pkgdesc="A program which allows you to easily configure the extra function keys of your keyboard"
    depends=('gtk2' 'gksu')
    source=(http://dl.sourceforge.net/sourceforge/keytouch/$pkgname-$pkgver.tar.gz)
    url="http://keytouch.sourceforge.net/"
    md5sums=('a7a22320707b887b1c5dedb77d2cf3e6')
    build() {
    cd $startdir/src/$pkgname-2.0
    ./configure --prefix=/usr
    make || return 1
    make prefix=$startdir/pkg/usr install

    thanks, it dit help somewhat, but I still had some errors.  Now they're all solved, but I don't know whether my pkgbuild is according the arch rules:
    pkgbuild;
    # $Id: PKGBUILD,v 1.0 2005/21/11 $
    # Maintainer: mouse256
    pkgname=keytouch
    pkgver=2.0.0
    pkgrel=1
    pkgdesc="A program which allows you to easily configure the extra function keys of your keyboard"
    depends=('gtk2' 'gksu')
    source=(http://dl.sourceforge.net/sourceforge/keytouch/$pkgname-$pkgver.tar.gz)
    url="http://keytouch.sourceforge.net/"
    md5sums=('a7a22320707b887b1c5dedb77d2cf3e6')
    build() {
    cd $startdir/src/$pkgname-2.0
    ./configure --prefix=/usr
    make || return 1
    #script checkt if Xsession directory exists, so create it
    mkdir $startdir/pkg/etc
    mkdir $startdir/pkg/etc/X11
    mkdir $startdir/pkg/etc/X11/Xsession.d
    mkdir $startdir/pkg/etc/rc.d
    make DESTDIR=$startdir/pkg install
    cd $startdir/src/$pkgname-2.0/keytouch-config
    ./configure --prefix=/usr
    make || return 1
    make DESTDIR=$startdir/pkg install
    cd $startdir/src/$pkgname-2.0/keytouch-keyboard
    ./configure --prefix=/usr
    make || return 1
    make DESTDIR=$startdir/pkg install
    mkdir -p $startdir/pkg/usr/share/applications
    echo "Categories=Application;Accessoires;" >> $startdir/pkg/usr/share/keytouch/desktop/keytouch.desktop
    mv $startdir/pkg/usr/share/keytouch/desktop/keytouch.desktop $startdir/pkg/usr/share/applications
    The biggest problem I think is it creates a file in /etc/rc.d
    FILELIST:
    .FILELIST
    .PKGINFO
    etc/
    etc/X11/
    etc/X11/Xsession.d/
    etc/X11/Xsession.d/40keytouchd
    etc/rc.d/
    etc/rc.d/keytouch-init.sh
    usr/
    usr/bin/
    usr/bin/keytouch
    usr/bin/keytouch-init
    usr/bin/keytouch-keyboard
    usr/bin/keytouch-keyboard-bin
    usr/bin/keytouchd
    usr/etc/
    usr/etc/keytouch/
    usr/share/
    usr/share/keytouch-keyboard-bin/
    usr/share/keytouch-keyboard-bin/pixmaps/
    usr/share/keytouch-keyboard-bin/pixmaps/icon.png
    usr/share/keytouch/
    usr/share/keytouch/doc/
    usr/share/keytouch/doc/html/
    usr/share/keytouch/doc/html/WARNINGS
    usr/share/keytouch/doc/html/images.aux
    usr/share/keytouch/doc/html/images.log
    usr/share/keytouch/doc/html/images.out
    usr/share/keytouch/doc/html/images.pl
    usr/share/keytouch/doc/html/images.tex
    usr/share/keytouch/doc/html/img1.png
    usr/share/keytouch/doc/html/img2.png
    usr/share/keytouch/doc/html/img3.png
    usr/share/keytouch/doc/html/img4.png
    usr/share/keytouch/doc/html/index.html
    usr/share/keytouch/doc/html/internals.pl
    usr/share/keytouch/doc/html/labels.pl
    usr/share/keytouch/doc/html/node1.html
    usr/share/keytouch/doc/html/node10.html
    usr/share/keytouch/doc/html/node11.html
    usr/share/keytouch/doc/html/node12.html
    usr/share/keytouch/doc/html/node13.html
    usr/share/keytouch/doc/html/node14.html
    usr/share/keytouch/doc/html/node15.html
    usr/share/keytouch/doc/html/node16.html
    usr/share/keytouch/doc/html/node17.html
    usr/share/keytouch/doc/html/node18.html
    usr/share/keytouch/doc/html/node2.html
    usr/share/keytouch/doc/html/node3.html
    usr/share/keytouch/doc/html/node4.html
    usr/share/keytouch/doc/html/node5.html
    usr/share/keytouch/doc/html/node6.html
    usr/share/keytouch/doc/html/node7.html
    usr/share/keytouch/doc/html/node8.html
    usr/share/keytouch/doc/html/node9.html
    usr/share/keytouch/doc/html/user_manual.css
    usr/share/keytouch/doc/html/user_manual.html
    usr/share/keytouch/keyboards/
    usr/share/keytouch/keyboards/Aspire 1300.Acer
    usr/share/keytouch/keyboards/Aspire 1350.Acer
    usr/share/keytouch/keyboards/Cordless Desktop Pro.Logitech
    usr/share/keytouch/keyboards/D47K.Promedion
    usr/share/keytouch/keyboards/Easy Access Keyboard (8 keys).Compaq
    usr/share/keytouch/keyboards/Internet Navigator.Logitech
    usr/share/keytouch/keyboards/Latitude D505.Dell
    usr/share/keytouch/keyboards/MultiMedia Keyboard 1.0.Microsoft
    usr/share/keytouch/keyboards/TravelMate 4100.Acer
    usr/share/keytouch/keyboards/Versa P550.Nec
    usr/share/keytouch/keyboards/Y-RK49.Logitech
    usr/share/keytouch/pixmaps/
    usr/share/keytouch/pixmaps/icon.png
    usr/share/keytouch/pixmaps/internet.png
    usr/share/keytouch/pixmaps/key.png
    usr/share/keytouch/pixmaps/key2.png
    usr/share/keytouch/pixmaps/keyboard.png
    usr/share/keytouch/pixmaps/keytouch.png
    usr/share/keytouch/plugins/
    usr/share/keytouch/plugins/amarok.so
    usr/share/keytouch/plugins/aumix.so
    usr/share/keytouch/plugins/browser.so
    usr/share/keytouch/plugins/chat.so
    usr/share/keytouch/plugins/common_actions.so
    usr/share/keytouch/plugins/email.so
    usr/share/keytouch/plugins/filemanager.so
    usr/share/keytouch/plugins/lock_screen.so
    usr/share/keytouch/plugins/xmms.so
    the file etc/rc.d/keytouch-init.sh contains:
    /usr/bin/keytouch-init
    So this won't work on arch.  Should the file be removed from the pkg?  And should it be replaced by another deamon file that does work?

  • One instance for two different application

    Hello,
    I have to solve following problem..
    need have one instance of object for two different application..fist is standard SE application and second is EE (web)..
    SE application is a server..listen on and accepting connection from mobile phone..and EE application need to show list of connected devices and should say to SE application that new device was connected..
    I would like to do this without database..only server and web app..
    I have thought about RMI..but hope there is more simple solution..
    Thanks a lot for your ideas.
    Dmitrij

    I would like to do this without database..only server and web app..You have your reasons for wanting this to be the case. If you are sure you don't want a DB, then pass the state of the object between the two ends using XML as the transport form. As someone said, you can use JMS or you can write an HTTP POST or probably other transport mechanisms other people will suggest to actually get it over the wire from one side to the other.
    As to your question of how to sync state, just make the object you're sharing final after it's been created (on the side that creates it) and make the reference that receives it and holds it final also, after you've reconstructed it from the XML you received.

  • Trying to modify Vultureseye PKGBUILD for Vulturesclaw

    Ok I've got the PKGBUILD for Vultureseye now I've modified it, now I confess the work is not mine. But I presumed by changing references to nethack to slashem and vultureseye to vulturesclaw, this would work as the PKGBUILD is getting both.
    But it seems I'm missing something could someone please point me in the right direction as I'm really not sure what is going on.
    pkgname=vulturesclaw
    pkgver=2.1.0
    pkgrel=1
    pkgdesc="An isometric graphics interface to NetHack."
    arch=('i686' 'x86_64')
    url="http://www.darkarts.co.za/projects/vultures/"
    license=('custom')
    depends=('sdl_mixer' 'sdl_ttf' 'sdl_image' 'libpng' 'flex' 'bison')
    source=(http://usrsrc.org/svn/vultures/releases/$pkgver/vultures-$pkgver-full.tar.bz2)
    md5sums=('f448f4fa74f07178683640a3f7985944')
    build() {
    mkdir -p $startdir/pkg/usr/bin
    mkdir -p $startdir/pkg/usr/share/applications
    mkdir -p $startdir/pkg/usr/share/icons/hicolor/48x48/apps
    mkdir -p $startdir/pkg/usr/share/licenses/custom/$pkgname
    mkdir -p $startdir/pkg/usr/share/$pkgname
    cd $startdir/src
    # tar -jxf vultures-$pkgver-full.tar.bz2?format=raw
    cd $startdir/src/vultures-$pkgver/slashem/sys/unix
    sh setup.sh
    cd $startdir/src/vultures-$pkgver/slashem/include
    sed -e '/define HACKDIR/ s|/usr/games/lib/nethackdir|/usr/share/vulturesclaw|' \
    -e '/^#define COMPRESS\s/ s|/usr/bin/compress|/bin/gzip|' \
    -e '/^#define COMPRESS_EXTENSION/ s|".Z"|".gz"|' \
    -e 's|^/\* \(#define DLB\) \*/|\1|' -i config.h
    sed -e 's|^/\* \(#define LINUX\) \*/|\1|' \
    -e 's|^/\* \(#define TIMED_DELAY\) \*/|\1|' -i unixconf.h
    cd $startdir/src/vultures-$pkgver/slashem
    sed -e '/^GAMEDIR\s*=/ s|/games/.*$|/share/$(GAME)|' \
    -e '/^GAMEUID\s*=/ s|games|root|' \
    -e '/^GAMEGRP\s*=/ s|bin|root|' \
    -e '/^SHELLDIR\s*=/ s|/games|/bin|' -i Makefile
    make || return 1
    make PREFIX=$startdir/pkg/usr install
    cd $startdir/pkg/usr/bin
    sed 's|HACKDIR=/.*/pkg/usr/share/vulturesclaw|HACKDIR=/usr/share/vulturesclaw|' -i vulturesclaw
    install -Dm644 $startdir/src/vultures-$pkgver/slashem/dat/license $startdir/pkg/usr/share/licenses/$pkgname/license
    install -Dm644 $startdir/src/vultures-$pkgver/dist/linux/vulturesclaw.desktop $startdir/pkg/usr/share/applications/vulturesclaw.desktop
    install -Dm644 $startdir/pkg/usr/share/$pkgname/vulturesclaw.png $startdir/pkg/usr/share/icons/hicolor/48x48/apps/vulturesclaw.png
    This seems to be bailing out on the 1st or second sed the error I'm getting is
    sed: can't read vulturesclaw: No such file or directory
    I have to admit the few package builds I've done have been a lot simpler in comparison so I suspect the error is between the chair and the keyboard.
    Last edited by FeatherMonkey (2007-11-17 17:46:04)

    The error is probably from the last sed command :
    sed 's|HACKDIR=/.*/pkg/usr/share/vulturesclaw|HACKDIR=/usr/share/vulturesclaw|' -i vulturesclaw
    For vultureseye the file that starts the program is called vultureseye , vulturesclaw/slashem may use a different start script.
    Check the files in pkg/usr/bin to find the correct name for the start script.
    Sidenote :
    this line in my vultureseye PKGBUILD is incorrect :
    mkdir -p $startdir/pkg/usr/share/licenses/custom/$pkgname
    it should be mkdir -p $startdir/pkg/usr/share/licenses/$pkgname

  • ABS PKGBUILD for openoffice-base fails

    The PKGBUILD for openoffice-base from the ABS tree is failing on my x86_64 system.  The compilation finishes successfully, but I start getting errors beginning at the "# install binaries" stage.  Here's the first part of the errors that I get.  ((NOTE:  I've replaced my username in the paths with 'userdir', for paranoia's sake ))
    cp: cannot stat `instsetoo_native/unxlngx6.pro/OpenOffice/native/install/en-US/linux-2.6-x86_64/buildroot/*': No such file or directory
    PKGBUILD: line 240: cd: /home/userdir/abs/local/openoffice-base/pkg/opt: No such file or directory
    mv: cannot stat `openoffice.org2.4': No such file or directory
    cp: cannot stat `/home/userdir/abs/local/openoffice-base/pkg/opt/openoffice/share/xdg/*.desktop': No such file or directory
    sed: can't read *.desktop: No such file or directory
    sed: can't read printeradmin.desktop: No such file or directory
    sed: can't read base.desktop: No such file or directory
    sed: can't read calc.desktop: No such file or directory
    sed: can't read draw.desktop: No such file or directory
    sed: can't read impress.desktop: No such file or directory
    sed: can't read math.desktop: No such file or directory
    sed: can't read writer.desktop: No such file or directory
    sed: can't read *.desktop: No such file or directory
    The PKGBUILD then moves through the "# install icons" step without problems.  After that, the next round of errors begin:
    sed: can't read /home/userdir/abs/local/openoffice-base/pkg/usr/share/applications/calc.desktop: No such file or directory
    touch: cannot touch `/home/userdir/abs/local/openoffice-base/pkg/opt/openoffice/share/dict/ooo/.directory': No such file or directory
    touch: cannot touch `/home/userdir/abs/local/openoffice-base/pkg/opt/openoffice/presets/template/.directory': No such file or directory
    touch: cannot touch `/home/userdir/abs/local/openoffice-base/pkg/opt/openoffice/share/extension/install/.directory': No such file or directory
    `./libnpsoplugin.so' -> `/opt/openoffice/program/libnpsoplugin.so'
    PKGBUILD: line 308: cd: /home/userdir/abs/local/openoffice-base/pkg/opt/openoffice/program/: No such file or directory
    can't find file to patch at input line 3
    Perhaps you used the wrong -p or --strip option?
    The text leading up to this was:
    |*** soffice.orig 2007-10-27 16:40:34.000000000 +0200
    |--- soffice 2007-10-27 16:41:14.000000000 +0200
    File to patch:
    The PKGBUILD stops at this point.  I have to Ctrl^C out of it.
    When I look in the directories, I see that instsetoo_native/unxlngx6.pro/OpenOffice/native/install/en-US/linux-2.6-x86_64/buildroot/ does not exist.  Instead, that path ends at instsetoo_native/unxlngx6.pro/OpenOffice/native/install/en-US/linux-2.6-x86_64/ , where I find a set of 25 openoffice.org-*.deb files.  Removing the 'buildroot' part of the path might fix part of the problem, but I'm guessing something else may be going on here besides that.
    Any ideas?

    the mirrors with old packages are listed here:
    http://wiki.archlinux.org/index.php/Downgrade_packages
    for example on http://ftp.parrswood.manchester.sch.uk/ … linux.org/ there is OO 2.2

  • Remote enabled FM for the Portal application

    Dear all,
    I need to develop a Remote enabled FM for the Portal application. The requirement is to pass the output( few fileds) of MC.1 Transaction to the portal.The issue is whether to write our own logic in the function module or is there any alternative way.
    The input is same as for the std tarnsaction MC.1
    Thanks
    Kumar

    Yes you will have to create a Z function module.
    Instead of declaring the function module as normal function module in the attributes tab, mention it as remote function module.
    Also when giving import and export parameters select the pass value check box.
    This might solve your query.
    Thanks & Regards,
    Lalit Mohan Gupta.

  • Help with PKGBUILD for nvidia driver cards

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

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

Maybe you are looking for

  • Unable to Play E61 Video

    Hi, My E61 cant play video with resolution 640×480 which is recorded with Nokia 6280. Also it cant play the streaming video from internet, like BBC and liputan6 (indonesian tv) Anybody can help? Thank you in advance ZaMessage Edited by ajak on 08-Feb

  • Dunning Letters SAP 8.81

    Hello, I'm just setting up Dunning Letters in our system. Our customers terms are 30 Days from End of Month. I have finished designing the letters and they are fine. I have 3 dunning levels. Level 1 - 7 days late Level 2 - 14 Days late Level 3 - 21 d

  • Clean install won't install Yosemite

    I'm attempting to install Yosemite on a clean slate. I've followed the instructions here: http://osxdaily.com/2014/10/18/clean-install-os-x-yosemite/ I'm at the point where I've got Yosemite on a thumb drive, I've held down option and I've erased the

  • Accounting entires for a manual event

    Hi How can i determine the accounting entries at various stages.. i.e Revenue generation , invoice creation , interface to AR for a manual event. Thanks

  • Appearing for Abap Certification

    Haii All, i am appearing for the Certification Exam ""SAP Consultant Certification Development Consultant SAP NetWeaver 2004 – Application Development Focus ABAP"" next month. If anyone has already appeared for this exam, please help me regarding thi