KScope PKGBUILD uploaded to AUR

Hi,
I wanted a source navigation tool to browse through the source code.
I really found kscope very easy to use.
As the pkg is not in AUR, so I made a PKGBUILD and built the package for myself.
Just thought why not give back something to the wonderful arch community.
I have uploaded the PKGBUILD to AUR
http://aur.archlinux.org/packages.php?d … =1&ID=2949
Please do check this package and post you comments.
Regards,
Abhay

Hi,
I wanted a source navigation tool to browse through the source code.
I really found kscope very easy to use.
As the pkg is not in AUR, so I made a PKGBUILD and built the package for myself.
Just thought why not give back something to the wonderful arch community.
I have uploaded the PKGBUILD to AUR
http://aur.archlinux.org/packages.php?d … =1&ID=2949
Please do check this package and post you comments.
Regards,
Abhay

Similar Messages

  • What can be included in the *tar.gz that will be uploaded to AUR?

    Hi all,
    I read, that binaries shouldn't been uploaded to AUR, but what about other files like a tar.gz file?
    I came to this question because I'm maintaining the splashy package. The "arch" theme can't be hosted further on the place, where it is now and I have no possability to host it. So my question is whether I can include it in the *tar.gz file, that I upload to AUR ?
    thanks, dongiovanni

    ezzetabi wrote:@muchnert
    It's mucknert! Damn you!
    ezzetabi wrote:Nice points, still it is imprecise and I think the wiki message need to be written better, and this is why that message is here.
    After all you still need a text editor to `human read' a text file, maybe not a text editor but at least a file system driver you can't seriously watch directly the hard disk, it is not so different from a image editor to read a picture.
    Yeah, that might be the case. But that does not add anything to the argument. Of course everything on a computer is stored in binary. That does not mean that everything is executable machine-code. This is where the argument is actually taking us: compiled, executable machine code. An image isn't and neither is a plain text file.
    ezzetabi wrote:About interpreting and executing the difference is even more subtle, a C source file is a text, its compilated form is not, but I can use the C source file with an interpreter and have the same result...
    How is that difference subtle? The C file is encoded according to some character encoding (e.g. ASCII) and therefore, it is a plain text file. If you compile it you get a whole new, different file that bears no resemblance to the source-file. It is a stream of bits and bytes that manipulate certain registers and other parts of the hardware according to the specifications of said hardware. It is executable. A library has exactly the same basic layout: it is a stream of bits and bytes that, when laid on the registers and the functional units of the hardware, invoke a certain behavior, much like a key does in a lock (only more complex). The blueprint of the key (the C source) could not do that. The key itself (the executable file) does. The only difference of a library to an executable is that it can't execute itself by e.g. calling it's name from a shell because it lacks the syscalls to initiate a standalone start.
    And when you feed a C file to an interpreter, it compiles the file on the fly and feeds it to the hardware. It's not rocket science. The C file itself is not executable, the interpreter OTOH is because it is machine code. The interpreter takes the C file, interprets it and puts the bits and bytes on the register himself.
    Don't get me wrong but I think you lack the basic understaning of how a Computer actually works.
    As for the question why executable files and libraries should not be uploaded to the AUR: I can find one simple solution. Security. You can look at PKGBUILDs and see what they do. You can't do that with libs and executables. At least not easily. Case closed.

  • AUR for LibreOffice GIT (can't upload to AUR?)

    I have created a PKGBUILD for LibreOffice that builds from the GIT master branch, but the AUR won't allow me to upload it, so I'm putting it here.
    Source package: http://8bitboobs.com/stuff/libreoffice- … src.tar.gz
    PKGBUILD:
    # Maintainer: Maxwell Pray a.k.a. Synthead <[email protected]>
    # Contributor: AndyRTR <[email protected]>
    pkgbase='libreoffice-git'
    pkgname=(
    'libreoffice-common-git'
    'libreoffice-base-git'
    'libreoffice-calc-git'
    'libreoffice-draw-git'
    'libreoffice-gnome-git'
    'libreoffice-impress-git'
    'libreoffice-kde4-git'
    'libreoffice-math-git'
    'libreoffice-sdk-git'
    'libreoffice-sdk-doc-git'
    'libreoffice-writer-git'
    'libreoffice-en-US-git'
    'libreoffice-postgresql-connector-git'
    'libreoffice-extension-pdfimport-git'
    'libreoffice-extension-presenter-screen-git'
    'libreoffice-extension-presentation-minimizer-git'
    'libreoffice-extension-report-builder-git'
    'libreoffice-scripting-beanshell-git'
    'libreoffice-scripting-javascript-git'
    'libreoffice-extension-scripting-python-git'
    'libreoffice-extension-wiki-publisher-git'
    'libreoffice-extension-nlpsolver-git'
    pkgver=20121008
    pkgrel=1
    arch=(
    'i686'
    'x86_64'
    license=('LGPL3')
    url="http://www.libreoffice.org/"
    makedepends=(
    'apache-ant'
    'beanshell'
    'bluez'
    'cppunit'
    'doxygen'
    'gconf'
    'gperf'
    'gstreamer0.10-base'
    'hsqldb-java'
    'imagemagick'
    'java-environment'
    'junit'
    'kdelibs'
    'libmythes'
    'libwpg'
    'mesa'
    'perl-archive-zip'
    'postgresql-libs'
    'sane'
    'unixodbc'
    'unzip'
    'vigra'
    'zip'
    depends=(
    'curl>=7.20.0'
    'dbus-glib'
    'desktop-file-utils'
    'gcc-libs'
    'graphite'
    'gtk2'
    'hicolor-icon-theme'
    'hunspell>=1.2.8'
    'hyphen'
    'icu>=49.1'
    'lcms2'
    'libgl'
    'libjpeg'
    'librsvg'
    'libtextcat'
    'libwpd>=0.9.2'
    'libxaw'
    'libxrandr'
    'libxslt'
    'lpsolve'
    'neon>=0.28.6'
    'nspr'
    'orbit2'
    'pango'
    'python2>=2.7'
    'redland'
    'sh'
    'shared-mime-info'
    'translate-toolkit'
    'ttf-dejavu'
    'xdg-utils'
    _gitroot=(
    'git://anongit.freedesktop.org/libreoffice/core'
    'git://anongit.freedesktop.org/libreoffice/help'
    'git://anongit.freedesktop.org/libreoffice/translations'
    _gitname=(
    'libreoffice-core'
    'libreoffice-help'
    'libreoffice-translations'
    _additional_source_url="http://dev-www.libreoffice.org/src"
    _additional_source_url2="http://dev-www.libreoffice.org/extern"
    source=(
    "$_additional_source_url/0168229624cfac409e766913506961a8-ucpp-1.3.2.tar.gz"
    "$_additional_source_url/18f577b374d60b3c760a3a3350407632-STLport-4.5.tar.gz"
    "$_additional_source_url/1f24ab1d39f4a51faf22244c94a6203f-xmlsec1-1.2.14.tar.gz"
    "$_additional_source_url/2a177023f9ea8ec8bd00837605c5df1b-jakarta-tomcat-5.0.30-src.tar.gz"
    "$_additional_source_url/2ae988b339daec234019a7066f96733e-commons-lang-2.3-src.tar.gz"
    "$_additional_source_url/2c9b0f83ed5890af02c0df1c1776f39b-commons-httpclient-3.1-src.tar.gz"
    "$_additional_source_url/3404ab6b1792ae5f16bbd603bd1e1d03-libformula-1.1.7.zip"
    "$_additional_source_url/35c94d2df8893241173de1d16b6034c0-swingExSrc.zip"
    "$_additional_source_url/39bb3fcea1514f1369fcfc87542390fd-sacjava-1.3.zip"
    "$_additional_source_url/3bdf40c0d199af31923e900d082ca2dd-libfonts-1.1.6.zip"
    "$_additional_source_url/3c219630e4302863a9a83d0efde889db-commons-logging-1.1.1-src.tar.gz"
    "$_additional_source_url/46d9f4cf8b145c21ce1056e116d2ce71-liborcus_0.1.0.tar.bz2"
    "$_additional_source_url/48d647fbd8ef8889e5a7f422c1bfda94-clucene-core-2.3.3.4.tar.gz"
    "$_additional_source_url/599dc4cc65a07ee868cf92a667a913d2-xpdf-3.02.tar.gz"
    "$_additional_source_url/6097739c841f671cb21332b9cc593ae7-libexttextcat-3.3.1.tar.bz2"
    "$_additional_source_url/798b2ffdc8bcfe7bca2cf92b62caf685-rhino1_5R5.zip"
    "$_additional_source_url/8ce2fcd72becf06c41f7201d15373ed9-librepository-1.1.6.zip"
    "$_additional_source_url/94e7f271e38c976462558b4278590178-libvisio-0.0.19.tar.bz2"
    "$_additional_source_url/97b2d4dba862397f446b217e2b623e71-libloader-1.1.6.zip"
    "$_additional_source_url/9f9e15966b5624834157fe3d748312bc-mdds_0.6.1.tar.bz2"
    "$_additional_source_url/a7983f859eafb2677d7ff386a023bc40-xsltml_2.1.2.zip"
    "$_additional_source_url/ace6ab49184e329db254e454a010f56d-libxml-1.1.7.zip"
    "$_additional_source_url/ada24d37d8d638b3d8a9985e80bc2978-source-9.0.0.7-bj.zip"
    "$_additional_source_url/af3c3acf618de6108d65fcdc92b492e1-commons-codec-1.3-src.tar.gz"
    "$_additional_source_url/b2371dc7cf4811c9d32146eec913d296-libcmis-0.3.0.tar.gz"
    "$_additional_source_url/b2db54b6e96287ac995d7ed654ace4fc-libmspub-0.0.3.tar.bz2"
    "$_additional_source_url/ba2930200c9f019c2d93a8c88c651a0f-flow-engine-0.9.4.zip"
    "$_additional_source_url/3c0037fb07dea2f0bbae8386fa7c6a9a-libcdr-0.0.9.tar.bz2"
    "$_additional_source_url/d197bd6211669a2fa4ca648faf04bcb1-libwps-0.2.7.tar.bz2"
    "$_additional_source_url/d8bd5eed178db6e2b18eeed243f85aa8-flute-1.1.6.zip"
    "$_additional_source_url/db60e4fde8dd6d6807523deb71ee34dc-liblayout-0.2.10.zip"
    "$_additional_source_url/eeb2c7ddf0d302fba4bfc6e97eac9624-libbase-1.1.6.zip"
    "$_additional_source_url/f02578f5218f217a9f20e9c30e119c6a-boost_1_44_0.tar.bz2"
    "$_additional_source_url/f94d9870737518e3b597f9265f4e9803-libserializer-1.1.6.zip"
    "$_additional_source_url/fa6a2f85bd28baab035b2c95e722713f-liblangtag-0.2.tar.bz2"
    "$_additional_source_url/fdb27bfe2dbe2e7b57ae194d9bf36bab-SampleICC-1.3.2.tar.gz"
    "$_additional_source_url2/185d60944ea767075d27247c3162b3bc-unowinreg.dll"
    'improve-vml-path-parsing-to-handle-repeated-commands.patch::https://gerrit.libreoffice.org/gitweb?p=core.git;a=patch;h=9cc362d8b210bfa06ad40e15dd3c8b37b10fa702'
    'vml-import-only-apply-width-percent-attribute-if-non-zero.patch::https://gerrit.libreoffice.org/gitweb?p=core.git;a=patch;h=4dd8bb09dc4ac1a499a159a4c647475230170d71'
    noextract=(
    '0168229624cfac409e766913506961a8-ucpp-1.3.2.tar.gz'
    '185d60944ea767075d27247c3162b3bc-unowinreg.dll'
    '18f577b374d60b3c760a3a3350407632-STLport-4.5.tar.gz'
    '1f24ab1d39f4a51faf22244c94a6203f-xmlsec1-1.2.14.tar.gz'
    '2a177023f9ea8ec8bd00837605c5df1b-jakarta-tomcat-5.0.30-src.tar.gz'
    '2ae988b339daec234019a7066f96733e-commons-lang-2.3-src.tar.gz'
    '2c9b0f83ed5890af02c0df1c1776f39b-commons-httpclient-3.1-src.tar.gz'
    '3404ab6b1792ae5f16bbd603bd1e1d03-libformula-1.1.7.zip'
    '35c94d2df8893241173de1d16b6034c0-swingExSrc.zip'
    '39bb3fcea1514f1369fcfc87542390fd-sacjava-1.3.zip'
    '3bdf40c0d199af31923e900d082ca2dd-libfonts-1.1.6.zip'
    '3c219630e4302863a9a83d0efde889db-commons-logging-1.1.1-src.tar.gz'
    '46d9f4cf8b145c21ce1056e116d2ce71-liborcus_0.1.0.tar.bz2'
    '48d647fbd8ef8889e5a7f422c1bfda94-clucene-core-2.3.3.4.tar.gz'
    '599dc4cc65a07ee868cf92a667a913d2-xpdf-3.02.tar.gz'
    '6097739c841f671cb21332b9cc593ae7-libexttextcat-3.3.1.tar.bz2'
    '798b2ffdc8bcfe7bca2cf92b62caf685-rhino1_5R5.zip'
    '8ce2fcd72becf06c41f7201d15373ed9-librepository-1.1.6.zip'
    '94e7f271e38c976462558b4278590178-libvisio-0.0.19.tar.bz2'
    '97b2d4dba862397f446b217e2b623e71-libloader-1.1.6.zip'
    '9f9e15966b5624834157fe3d748312bc-mdds_0.6.1.tar.bz2'
    'a7983f859eafb2677d7ff386a023bc40-xsltml_2.1.2.zip'
    'ace6ab49184e329db254e454a010f56d-libxml-1.1.7.zip'
    'ada24d37d8d638b3d8a9985e80bc2978-source-9.0.0.7-bj.zip'
    'af3c3acf618de6108d65fcdc92b492e1-commons-codec-1.3-src.tar.gz'
    'b2371dc7cf4811c9d32146eec913d296-libcmis-0.3.0.tar.gz'
    'b2db54b6e96287ac995d7ed654ace4fc-libmspub-0.0.3.tar.bz2'
    'ba2930200c9f019c2d93a8c88c651a0f-flow-engine-0.9.4.zip'
    '3c0037fb07dea2f0bbae8386fa7c6a9a-libcdr-0.0.9.tar.bz2'
    'd197bd6211669a2fa4ca648faf04bcb1-libwps-0.2.7.tar.bz2'
    'd8bd5eed178db6e2b18eeed243f85aa8-flute-1.1.6.zip'
    'db60e4fde8dd6d6807523deb71ee34dc-liblayout-0.2.10.zip'
    'eeb2c7ddf0d302fba4bfc6e97eac9624-libbase-1.1.6.zip'
    'f02578f5218f217a9f20e9c30e119c6a-boost_1_44_0.tar.bz2'
    'f94d9870737518e3b597f9265f4e9803-libserializer-1.1.6.zip'
    'fa6a2f85bd28baab035b2c95e722713f-liblangtag-0.2.tar.bz2'
    'fdb27bfe2dbe2e7b57ae194d9bf36bab-SampleICC-1.3.2.tar.gz'
    md5sums=(
    '0168229624cfac409e766913506961a8'
    '18f577b374d60b3c760a3a3350407632'
    '1f24ab1d39f4a51faf22244c94a6203f'
    '2a177023f9ea8ec8bd00837605c5df1b'
    '2ae988b339daec234019a7066f96733e'
    '2c9b0f83ed5890af02c0df1c1776f39b'
    '3404ab6b1792ae5f16bbd603bd1e1d03'
    '35c94d2df8893241173de1d16b6034c0'
    '39bb3fcea1514f1369fcfc87542390fd'
    '3bdf40c0d199af31923e900d082ca2dd'
    '3c219630e4302863a9a83d0efde889db'
    '46d9f4cf8b145c21ce1056e116d2ce71'
    '48d647fbd8ef8889e5a7f422c1bfda94'
    '599dc4cc65a07ee868cf92a667a913d2'
    '6097739c841f671cb21332b9cc593ae7'
    '798b2ffdc8bcfe7bca2cf92b62caf685'
    '8ce2fcd72becf06c41f7201d15373ed9'
    '94e7f271e38c976462558b4278590178'
    '97b2d4dba862397f446b217e2b623e71'
    '9f9e15966b5624834157fe3d748312bc'
    'a7983f859eafb2677d7ff386a023bc40'
    'ace6ab49184e329db254e454a010f56d'
    'ada24d37d8d638b3d8a9985e80bc2978'
    'af3c3acf618de6108d65fcdc92b492e1'
    'b2371dc7cf4811c9d32146eec913d296'
    'b2db54b6e96287ac995d7ed654ace4fc'
    'ba2930200c9f019c2d93a8c88c651a0f'
    '3c0037fb07dea2f0bbae8386fa7c6a9a'
    'd197bd6211669a2fa4ca648faf04bcb1'
    'd8bd5eed178db6e2b18eeed243f85aa8'
    'db60e4fde8dd6d6807523deb71ee34dc'
    'eeb2c7ddf0d302fba4bfc6e97eac9624'
    'f02578f5218f217a9f20e9c30e119c6a'
    'f94d9870737518e3b597f9265f4e9803'
    'fa6a2f85bd28baab035b2c95e722713f'
    'fdb27bfe2dbe2e7b57ae194d9bf36bab'
    '185d60944ea767075d27247c3162b3bc'
    '82893e891aca9c2f04df6347253c1d04'
    'c3f2473294124bd83e49328761c362ac'
    install_from_list() {
    # Create directories from .txt file.
    for directory in $(grep '^%dir' "$srcdir/libreoffice-core-build/file-lists/$1_list.txt"); do
    install -dm 755 "$pkgdir/${directory/\%dir}"
    done
    # Install files into pkg from the fakeinstall dir.
    for file in $(grep -v '^%dir' "$srcdir/libreoffice-core-build/file-lists/$1_list.txt"); do
    dirname="$(dirname "$file")"
    # Check if directory has been already been created.
    [[ -d "$pkgdir/$dirname" ]] || install -dm 755 "$pkgdir/$dirname"
    # Move file from fakeinstall to $pkgdir.
    mv "$srcdir/fakeinstall$file" "$pkgdir$file"
    done
    unzip_extension() {
    # Unzip this extension to $pkgdir.
    install -dm 755 "$pkgdir/usr/lib/libreoffice/share/extensions"
    unzip -q "$srcdir/libreoffice-core-build/solver/unxlng"*"/bin/$1.oxt" -d "$pkgdir/usr/lib/libreoffice/share/extensions/$1"
    build() {
    # Manage the three GIT repositories.
    cd "$srcdir"
    for i in {0..2}; do
    msg "Connecting to GIT server for ${_gitname[i]}..."
    if [[ -d "$srcdir/${_gitname[i]}" ]]; then
    msg2 "Updating local GIT repository..."
    cd "$srcdir/${_gitname[i]}" && git pull origin
    else
    msg2 "Downloading GIT repository..."
    git clone "${_gitroot[i]}" "$srcdir/${_gitname[i]}"
    fi
    msg2 "Cloning for build..."
    rm -rf "$srcdir/${_gitname[i]}-build"
    git clone "$srcdir/${_gitname[i]}" "$srcdir/${_gitname[i]}-build"
    done
    msg "Starting build..."
    cd "$srcdir/${_gitname[0]}-build"
    # Patches for better support for "inked" documents.
    patch -p1 < "$srcdir/improve-vml-path-parsing-to-handle-repeated-commands.patch"
    patch -p1 < "$srcdir/vml-import-only-apply-width-percent-attribute-if-non-zero.patch"
    # Correctly set environment variables.
    unset J2REDIR J2SDKDIR JAVA_HOME CLASSPATH EXTRAOPTS
    . /etc/profile.d/jdk.sh || . /etc/profile.d/openjdk6.sh
    [[ ! $ANT_HOME ]] && . /etc/profile.d/apache-ant.sh
    # Create symlinks for external sources.
    [[ -d "$srcdir/ext_sources" ]] && rm -r "$srcdir/ext_sources"
    mkdir "$srcdir/ext_sources"
    for source in "${noextract[@]}"; do
    ln -s "$srcdir/$source" "$srcdir/ext_sources"
    done
    # Create symlinks for the "help" and "translations" repositories.
    ln -s ../libreoffice-help-build/helpcontent2 "$srcdir/${_gitname[0]}-build"
    ln -s ../libreoffice-translations-build/translations "$srcdir/${_gitname[0]}-build"
    # Use the CFLAGS, but remove the LibO overridden ones.
    for i in $CFLAGS; do
    case "$i" in
    -O?|-pipe|-Wall|-g|-fexceptions) continue ;;
    esac
    ARCH_FLAGS="$ARCH_FLAGS $i"
    done
    # Fix for python2.
    export PYTHON=python2
    # Configure LibreOffice with a Swiss Army knife of options!
    ./autogen.sh \
    --disable-ext-mysql-connector \
    --disable-fetch-external \
    --disable-gnome-vfs \
    --disable-kde \
    --disable-mozilla \
    --disable-verbose \
    --enable-crashdump \
    --enable-dbus \
    --enable-evolution2 \
    --enable-ext-nlpsolver \
    --enable-ext-scripting-beanshell \
    --enable-ext-scripting-javascript \
    --enable-ext-wiki-publisher \
    --enable-gio \
    --enable-gtk3 \
    --enable-kde4 \
    --enable-librsvg=system \
    --enable-lockdown \
    --enable-mergelibs \
    --enable-odk \
    --enable-opengl \
    --enable-split-app-modules \
    --exec-prefix=/usr \
    --libdir=/usr/lib \
    --mandir=/usr/share/man \
    --prefix=/usr \
    --sysconfdir=/etc \
    --with-alloc=system \
    --with-ant-home="/usr/share/apache-ant" \
    --with-build-version="GIT-$pkgver ArchLinux build-$pkgrel" \
    --with-external-dict-dir=/usr/share/hunspell \
    --with-external-hyph-dir=/usr/share/hyphen \
    --with-external-tar="${srcdir}/ext_sources" \
    --with-external-thes-dir=/usr/share/mythes \
    --with-java-target-version=1.5 \
    --with-lang="" \
    --with-max-jobs=${MAKEFLAGS/-j/} \
    --with-num-cpus=${MAKEFLAGS/-j/} \
    --with-system-beanshell \
    --with-system-cairo \
    --with-system-cppunit \
    --with-system-dicts \
    --with-system-graphite \
    --with-system-headers \
    --with-system-hsqldb \
    --with-system-libs \
    --with-system-libwpg \
    --with-system-mysql \
    --with-system-mythes \
    --with-system-redland \
    --with-unix-wrapper="libreoffice" \
    --with-vendor="ArchLinux" \
    --without-afms \
    --without-fonts \
    --without-myspell-dicts \
    --without-ppds \
    --without-system-apache-commons \
    --without-system-boost \
    --without-system-clucene \
    --without-system-jfreereport \
    --without-system-libcdr \
    --without-system-libcmis \
    --without-system-libexttextcat \
    --without-system-liblangtag \
    --without-system-libmspub \
    --without-system-libvisio \
    --without-system-libwps \
    --without-system-mdds \
    --without-system-mozilla \
    --without-system-mozilla-headers \
    --without-system-orcus \
    --without-system-poppler \
    --without-system-saxon \
    --without-system-servlet-api \
    $EXTRAOPTS
    # Tell LibreOffice that the sources are already downloaded.
    touch src.downloaded
    # Build LibreOffice.
    make
    # Create fake installation directory to create split file lists.
    mkdir "$srcdir/fakeinstall"
    # Install LibreOffice to the fake installation directory.
    make DESTDIR="$srcdir/fakeinstall" distro-pack-install
    package_libreoffice-common-git() {
    pkgdesc="Common files for LibreOffice, a productivity suite that is compatible with other major office suites."
    depends=(
    'libreoffice-langpack'
    'hunspell>=1.2.8'
    'python2>=2.7'
    'neon>=0.28.6'
    'nspr'
    'libsm'
    'redland'
    'hyphen'
    'graphite'
    'icu>=49.1'
    'lcms2'
    'hicolor-icon-theme'
    'desktop-file-utils'
    'shared-mime-info'
    'xdg-utils'
    'orbit2'
    optdepends=(
    'libreoffice-langpack: Additional language support.'
    '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.'
    'libmythes: For use in thesaurus.'
    'beanshell: Interactive java; good for prototyping and macros.'
    'vigra: C++ computer vision library, usable in Basebmp.'
    'libmspack: Library for Microsoft compression formats for use in FontOOo.'
    'libwpg: Library for importing and converting Corel WordPerfect(tm) Graphics images.'
    'sane: For scanner access.'
    'unixodbc: Adds ODBC database support.'
    'gstreamer0.10-base: Some gstr-plugins to support multimedia content, e.g. in impress.'
    'gtk2: For browser plugin.'
    backup=(
    'etc/libreoffice/sofficerc'
    'etc/libreoffice/bootstraprc'
    'etc/libreoffice/psprint.conf'
    groups=('libreoffice')
    provides=(
    'go-openoffice'
    'libreoffice-common'
    conflicts=(
    'go-openoffice'
    'libreoffice-common'
    replaces=(
    'go-openoffice'
    'libreoffice'
    'openoffice-base'
    install='libreoffice-common.install'
    install_from_list common
    # Configuration files.
    install -dm 755 "$pkgdir/etc/libreoffice"
    install -m 644 "$pkgdir/usr/lib/libreoffice/program/"{bootstraprc,sofficerc} "$pkgdir/etc/libreoffice"
    install -m 644 "$pkgdir/usr/lib/libreoffice/share/psprint/psprint.conf" "$pkgdir/etc/libreoffice"
    # Install dummy links.
    cd "$pkgdir/usr/lib/libreoffice/program"
    ln -sf /etc/libreoffice/{bootstraprc,sofficerc} .
    cd "$pkgdir/usr/lib/libreoffice/share/psprint"
    ln -sf /etc/libreoffice/psprint.conf .
    # Move bash-completion files.
    install -dm755 "$pkgdir/usr/share/bash-completion/completions"
    mv "$pkgdir/etc/bash_completion.d/libreoffice.sh" "$pkgdir/usr/share/bash-completion/completions/libreoffice.sh"
    rm -rf "$pkgdir/etc/bash_completion.d"
    # Prevent conflicts.
    rm -f "$pkgdir/usr/lib/libreoffice/program/classes/ScriptProviderForJavaScript.jar"
    rm -f "$pkgdir/usr/lib/libreoffice/program/classes/js.jar"
    rm -f "$pkgdir/usr/lib/libreoffice/program/services/scriptproviderforjavascript.rdb"
    package_libreoffice-base-git() {
    pkgdesc="GUI database front-end for LibreOffice. Allows creation and management of databases through a GUI."
    depends=(
    'libreoffice-common'
    'hsqldb-java'
    optdepends=('libreoffice-postgresql-connector')
    provides=('libreoffice-base')
    conflicts=(
    'go-openoffice'
    'libreoffice-base'
    'libreoffice-common'
    groups=('libreoffice')
    replaces=('libreoffice')
    install='update-desktop-database.install'
    install_from_list base
    package_libreoffice-postgresql-connector-git() {
    pkgdesc="A PostgreSQL connector for LibreOffice."
    depends=(
    'libreoffice-base'
    'postgresql-libs'
    groups=('libreoffice')
    replaces=('libreoffice')
    provides=('libreoffice-postgresql-connector')
    conflicts=('libreoffice-postgresql-connector')
    # No file list for this package.
    install -dm 755 "$pkgdir/usr/lib/libreoffice/program/services"
    install -m 644 "$srcdir/fakeinstall/usr/lib/libreoffice/program/postgresql-sdbc.uno.so" "$pkgdir/usr/lib/libreoffice/program"
    install -m 644 "$srcdir/fakeinstall/usr/lib/libreoffice/program/postgresql-sdbc-impl.uno.so" "$pkgdir/usr/lib/libreoffice/program"
    install -m 644 "$srcdir/fakeinstall/usr/lib/libreoffice/program/postgresql-sdbc.ini" "$pkgdir/usr/lib/libreoffice/program"
    install -m 644 "$srcdir/fakeinstall/usr/lib/libreoffice/program/services/postgresql-sdbc.rdb" "$pkgdir/usr/lib/libreoffice/program/services"
    install -dm 755 "$pkgdir/usr/lib/libreoffice/share/registry"
    install -m 644 "$srcdir/fakeinstall/usr/lib/libreoffice/share/registry/postgresqlsdbc.xcd" "$pkgdir/usr/lib/libreoffice/share/registry"
    package_libreoffice-calc-git() {
    pkgdesc="Spreadsheet application for LibreOffice."
    depends=(
    'libreoffice-common'
    'lpsolve'
    groups=('libreoffice')
    replaces=('libreoffice')
    provides=('libreoffice-calc')
    conflicts=('libreoffice-calc')
    install='update-desktop-database.install'
    install_from_list calc
    package_libreoffice-draw-git() {
    pkgdesc="Drawing application for LibreOffice."
    arch=('any')
    depends=('libreoffice-common')
    groups=('libreoffice')
    replaces=('libreoffice')
    provides=('libreoffice-draw')
    conflicts=('libreoffice-draw')
    install='update-desktop-database.install'
    install_from_list draw
    package_libreoffice-gnome-git() {
    pkgdesc="Plug-in for LibreOffice that enables integration of Gnome and other GTK-based desktop environments."
    depends=(
    'gtk2'
    'gtk3'
    'libreoffice-common'
    groups=('libreoffice')
    provides=('libreoffice-gnome')
    conflicts=('libreoffice-gnome')
    install_from_list gnome
    package_libreoffice-impress-git() {
    pkgdesc="Presentation Application for LibreOffice."
    depends=('libreoffice-common')
    optdepends=('mesa: For the OGLTrans extension.')
    groups=('libreoffice')
    replaces=('libreoffice')
    provides=('libreoffice-impress')
    conflicts=('libreoffice-impress')
    install='update-desktop-database.install'
    install_from_list impress
    package_libreoffice-kde4-git() {
    pkgdesc="Plug-in for LibreOffice that enables integration into the KDE4 desktop environment."
    depends=(
    'libreoffice-common'
    'kdelibs'
    groups=('libreoffice')
    provides=('libreoffice-kde4')
    conflicts=('libreoffice-kde4')
    install_from_list kde4
    package_libreoffice-math-git() {
    pkgdesc="Equation editor for LibreOffice."
    depends=('libreoffice-common')
    groups=('libreoffice')
    replaces=('libreoffice')
    provides=('libreoffice-math')
    conflicts=('libreoffice-math')
    install_from_list math
    package_libreoffice-sdk-git() {
    pkgdesc="Software Development Kit for LibreOffice."
    depends=(
    'gcc'
    'gcc-libs'
    'java-environment'
    'libreoffice-common'
    'make'
    'sh'
    'zip'
    groups=('libreoffice')
    provides=('libreoffice-sdk')
    conflicts=('libreoffice-sdk')
    install_from_list sdk
    # Fix environment path for compatibility with openjdk6 and openjdk7.
    sed -ie 's:\/usr\/lib\/jvm\/java-7-openjdk:$J2SDKDIR:' "$pkgdir/usr/lib/libreoffice/sdk/setsdkenv_unix."{sh,csh}
    package_libreoffice-sdk-doc-git() {
    pkgdesc="Software Development Kit documentation for LibreOffice."
    arch=('any')
    depends=(
    'libreoffice-common'
    'libreoffice-sdk'
    groups=('libreoffice')
    provides=('libreoffice-sdk-doc')
    conflicts=('libreoffice-sdk-doc')
    install_from_list sdk_doc
    # Fix permissions.
    find "$pkgdir/usr/lib/libreoffice/sdk/examples" -type f -exec chmod -x {} \;
    package_libreoffice-writer-git() {
    pkgdesc="Word Processor Application for LibreOffice."
    depends=(
    'libreoffice-common'
    'libwpd>=0.9.2'
    'libxml2'
    optdepends=('libwpg: Library for importing and converting Corel WordPerfect(tm) Graphics images.')
    groups=('libreoffice')
    replaces=('libreoffice')
    provides=('libreoffice-writer')
    conflicts=('libreoffice-writer')
    install='update-desktop-database.install'
    install_from_list writer
    package_libreoffice-en-US-git() {
    pkgdesc="English (US) language pack for LibreOffice."
    arch=('any')
    provides=(
    'openoffice-en-US'
    'libreoffice-en-US'
    'libreoffice-langpack'
    replaces=('openoffice-en-US')
    conflicts=(
    'openoffice-en-US'
    'libreoffice-en-US'
    install_from_list lang_en_US
    package_libreoffice-extension-pdfimport-git() {
    pkgdesc="LibreOffice extension to import and modify PDF documents."
    arch=('any')
    depends=('libreoffice-common')
    groups=('libreoffice-extensions')
    provides=('libreoffice-extension-pdfimport')
    conflicts=('libreoffice-extension-pdfimport')
    unzip_extension pdfimport
    package_libreoffice-extension-presenter-screen-git() {
    pkgdesc="LibreOffice extension to provide more control over slide show presentations."
    depends=(
    'libreoffice-common'
    'java-environment'
    groups=('libreoffice-extensions')
    provides=('libreoffice-extension-presenter-screen')
    conflicts=('libreoffice-extension-presenter-screen')
    unzip_extension presenter-screen
    package_libreoffice-extension-presentation-minimizer-git() {
    pkgdesc="LibreOffice extension to reduce the file size of presentations."
    depends=(
    'libreoffice-common'
    'gcc-libs'
    groups=('libreoffice-extensions')
    provides=('libreoffice-extension-presentation-minimizer')
    conflicts=('libreoffice-extension-presentation-minimizer')
    unzip_extension presentation-minimizer
    package_libreoffice-extension-report-builder-git() {
    pkgdesc="LibreOffice extension to create database reports."
    arch=('any')
    depends=(
    'libreoffice-common'
    'java-environment'
    groups=('libreoffice-extensions')
    provides=('libreoffice-extension-report-builder')
    conflicts=('libreoffice-extension-report-builder')
    unzip_extension report-builder
    package_libreoffice-extension-scripting-python-git() {
    pkgdesc="LibreOffice extension to enable support for Python."
    arch=('any')
    depends=(
    'libreoffice-common'
    'python2'
    groups=('libreoffice-extensions')
    provides=('libreoffice-extension-scripting-python')
    conflicts=('libreoffice-extension-scripting-python')
    unzip_extension script-provider-for-python
    package_libreoffice-extension-wiki-publisher-git() {
    pkgdesc="LibreOffice extension to create Wiki articles on MediaWiki servers."
    arch=('any')
    depends=(
    'libreoffice-common'
    'java-environment'
    groups=('libreoffice-extensions')
    provides=('libreoffice-extension-wiki-publisher')
    conflicts=('libreoffice-extension-wiki-publisher')
    unzip_extension wiki-publisher
    package_libreoffice-extension-nlpsolver-git() {
    pkgdesc="LibreOffice extension for Calc: additional Solver engines for optimizing nonlinear programming models."
    arch=('any')
    depends=(
    'libreoffice-common'
    'java-environment'
    groups=('libreoffice-extensions')
    provides=('libreoffice-extension-nlpsolver')
    conflicts=('libreoffice-extension-nlpsolver')
    unzip_extension nlpsolver
    package_libreoffice-scripting-beanshell-git() {
    pkgdesc="LibreOffice extension for BeanShell script support."
    arch=('any')
    depends=(
    'libreoffice-common'
    'java-environment'
    groups=('libreoffice-extensions')
    provides=('libreoffice-scripting-beanshell')
    conflicts=('libreoffice-scripting-beanshell')
    install -dm 755 "$pkgdir/usr/lib/libreoffice/program/"{classes,services}
    mv "$srcdir/fakeinstall/usr/lib/libreoffice/program/classes/ScriptProviderForBeanShell.jar" "$pkgdir/usr/lib/libreoffice/program/classes"
    mv "$srcdir/fakeinstall/usr/lib/libreoffice/program/services/scriptproviderforbeanshell.rdb" "$pkgdir/usr/lib/libreoffice/program/services"
    package_libreoffice-scripting-javascript-git() {
    pkgdesc="LibreOffice extension to enable support for JavaScript."
    arch=('any')
    depends=(
    'libreoffice-common'
    'java-environment'
    groups=('libreoffice-extensions')
    provides=('libreoffice-scripting-javascript')
    conflicts=('libreoffice-scripting-javascript')
    install -dm 755 "$pkgdir/usr/lib/libreoffice/program/"{classes,services}
    mv "$srcdir/libreoffice-core-build/solver/unxlngx6.pro/bin/"{js.jar,ScriptProviderForJavaScript.jar} "$pkgdir/usr/lib/libreoffice/program/classes"
    mv "$srcdir/libreoffice-core-build/solver/unxlngx6.pro/xml/scriptproviderforjavascript.rdb" "$pkgdir/usr/lib/libreoffice/program/services"
    update-desktop-database.install
    post_install() {
    update-desktop-database -q
    post_upgrade() {
    post_install
    post_remove() {
    post_install
    libreoffice-common.install
    post_upgrade() {
    xdg-icon-resource forceupdate --theme hicolor
    update-desktop-database -q
    update-mime-database usr/share/mime > /dev/null 2>&1
    post_install() {
    post_upgrade
    printf '%s\n' \
    'LibreOffice is split into several packages:' \
    '- libreoffice-common' \
    '- libreoffice-{base,calc,draw,impress,math,writer}: Frontend applications.' \
    '- libreoffice-{gnome,kde4}: Desktop integration plugins.' \
    '- libreoffice-{sdk,sdk-doc}: SDK and documentation for the LibreOffice API and extensions (UNO components).' \
    'In addition:' \
    '- At least one libreoffice-langpack needs to be installed.' \
    '- Install {hunspell,mythes,hyphen}-xx for spell checking.'
    post_remove() {
    post_upgrade
    Last edited by synthead (2012-10-08 19:40:13)

    synthead wrote:
    This is based off an official package: https://projects.archlinux.org/svntogit … ibreoffice
    Also, splitting it into multiple files means that the (large) GIT repo would need to be downloaded and compiled per PKGBUILD (yeech).
    Oh well, that was my opinion, but I can't say anything against the core team I thought this was a reasonable split, since there were three git repos. If you need all for one build, forget what I said.
    PS: To upload a split-package to AUR create a meaningful global package description that mentions splitting, and use the mentioned workaround:
    pkgname="AUR-name"
    true && pkgname=(...) # the array
    Last edited by progandy (2012-10-08 19:03:37)

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

  • Elog PKGBUILD for review (AUR)

    I would appreciate feedback on this PKGBUILD before I submit it to the AUR. It includes boot and install scripts, new user and group ID's, and other things I have not done before. I used other Arch examples as models, but I might not have fully understood what I was trying to emulate.
    elog uses the filesystem as a database to log/timestamp and serve back information submitted via http. I think it is a great program, carefully designed, stable, and actively supported. I would recommend it to anyone who needs to log/timestamp information and either: a) wants the information to remain accessible to scripts and not disappear into a large binary blob, or b) doesn't want to install and maintain a normal database.
    # Contributor: David Scholl <djscholl>
    pkgname=elog
    pkgver=2.6.3.1
    pkgrel=1
    pkgdesc="Electronic logbook w/ attached file support, doesn't use a database."
    url="http://midas.psi.ch/elog/"
    license="GPL"
    arch=(i686)
    depends=('glibc')
    install=elog.install
    backup=etc/elog/elogd.cfg
    source=(http://midas.psi.ch/elog/download/tar/elog-2.6.3-1.tar.gz elogd)
    md5sums=('935f19692a05c2cb289d45bac14f1088' '746fc2d7ea204473ef95136b99fc7bb0')
    build() {
    cd $startdir/src/$pkgname-2.6.3
    # make things more Arch-friendly
    sed -i '/^ELOGDIR/s/$(PREFIX)/elog//etc/elog/' Makefile
    sed -i '/^BINOWNER/s/bin/root/' Makefile
    sed -i '/^BINGROUP/s/bin/root/' Makefile
    # make and install
    make PREFIX=/usr || return 1
    make PREFIX=/usr ROOT=$startdir/pkg install
    # substitute an Arch-friendly init script in place of the default
    cp ../../elogd $startdir/pkg/etc/rc.d/
    rm -Rf $startdir/pkg/etc/rc.d/init.d
    # move data to standard Arch locations
    mkdir -p $startdir/pkg/usr/share/elog
    mv $startdir/pkg/etc/elog/resources $startdir/pkg/usr/share/elog
    mv $startdir/pkg/etc/elog/scripts $startdir/pkg/usr/share/elog
    mv $startdir/pkg/etc/elog/themes $startdir/pkg/usr/share/elog
    mkdir -p $startdir/pkg/home/elog
    mv $startdir/pkg/etc/elog/logbooks $startdir/pkg/home/elog
    # tell elogd about the new locations
    sed -i '/[global]/s/$/nLogbook dir = /home/elog/logbooks/'
    $startdir/pkg/etc/elog/elogd.cfg
    sed -i '/[global]/s/$/nResource dir = /usr/share/elog/'
    $startdir/pkg/etc/elog/elogd.cfg
    elog.install
    # arg 1: the new package version
    post_install() {
    getent group elog >/dev/null || usr/sbin/groupadd elog
    getent passwd elog >/dev/null || usr/sbin/useradd -c "elog Server"
    -g elog -d /home/elog -s /bin/false elog
    usr/bin/passwd -l elog &>/dev/null
    chown -R elog:elog /etc/elog
    chown -R elog:elog /home/elog
    echo ">>> Add elogd to the DAEMONS array in /etc/rc.conf if you want"
    echo ">>> the server to start at system boot-up."
    # arg 1: the new package version
    # arg 2: the old package version
    post_upgrade() {
    post_install $1
    # arg 1: the old package version
    pre_remove() {
    usr/sbin/userdel elog &>/dev/null
    usr/sbin/groupdel elog &>/dev/null
    echo ">>> Post-install logbook entries remain after package removal."
    op=$1
    shift
    $op $*
    elogd
    #!/bin/bash
    . /etc/rc.conf
    . /etc/rc.d/functions
    PID=`pidof -o %PPID /usr/sbin/elogd`
    case "$1" in
    start)
    stat_busy "Starting elogd"
    [ -z "$PID" ] && /usr/sbin/elogd -D -c /etc/elog/elogd.cfg
    > /dev/null 2>&1
    if [ $? -gt 0 ]; then
    stat_fail
    else
    add_daemon elogd
    stat_done
    fi
    stop)
    stat_busy "Stopping elogd"
    [ ! -z "$PID" ] && kill $PID &> /dev/null
    if [ $? -gt 0 ]; then
    stat_fail
    else
    rm_daemon elogd
    stat_done
    fi
    restart)
    $0 stop
    sleep 1
    $0 start
    echo "usage: $0 {start|stop|restart}"
    esac
    exit 0

    I would appreciate feedback on this PKGBUILD before I submit it to the AUR. It includes boot and install scripts, new user and group ID's, and other things I have not done before. I used other Arch examples as models, but I might not have fully understood what I was trying to emulate.
    elog uses the filesystem as a database to log/timestamp and serve back information submitted via http. I think it is a great program, carefully designed, stable, and actively supported. I would recommend it to anyone who needs to log/timestamp information and either: a) wants the information to remain accessible to scripts and not disappear into a large binary blob, or b) doesn't want to install and maintain a normal database.
    # Contributor: David Scholl <djscholl>
    pkgname=elog
    pkgver=2.6.3.1
    pkgrel=1
    pkgdesc="Electronic logbook w/ attached file support, doesn't use a database."
    url="http://midas.psi.ch/elog/"
    license="GPL"
    arch=(i686)
    depends=('glibc')
    install=elog.install
    backup=etc/elog/elogd.cfg
    source=(http://midas.psi.ch/elog/download/tar/elog-2.6.3-1.tar.gz elogd)
    md5sums=('935f19692a05c2cb289d45bac14f1088' '746fc2d7ea204473ef95136b99fc7bb0')
    build() {
    cd $startdir/src/$pkgname-2.6.3
    # make things more Arch-friendly
    sed -i '/^ELOGDIR/s/$(PREFIX)/elog//etc/elog/' Makefile
    sed -i '/^BINOWNER/s/bin/root/' Makefile
    sed -i '/^BINGROUP/s/bin/root/' Makefile
    # make and install
    make PREFIX=/usr || return 1
    make PREFIX=/usr ROOT=$startdir/pkg install
    # substitute an Arch-friendly init script in place of the default
    cp ../../elogd $startdir/pkg/etc/rc.d/
    rm -Rf $startdir/pkg/etc/rc.d/init.d
    # move data to standard Arch locations
    mkdir -p $startdir/pkg/usr/share/elog
    mv $startdir/pkg/etc/elog/resources $startdir/pkg/usr/share/elog
    mv $startdir/pkg/etc/elog/scripts $startdir/pkg/usr/share/elog
    mv $startdir/pkg/etc/elog/themes $startdir/pkg/usr/share/elog
    mkdir -p $startdir/pkg/home/elog
    mv $startdir/pkg/etc/elog/logbooks $startdir/pkg/home/elog
    # tell elogd about the new locations
    sed -i '/[global]/s/$/nLogbook dir = /home/elog/logbooks/'
    $startdir/pkg/etc/elog/elogd.cfg
    sed -i '/[global]/s/$/nResource dir = /usr/share/elog/'
    $startdir/pkg/etc/elog/elogd.cfg
    elog.install
    # arg 1: the new package version
    post_install() {
    getent group elog >/dev/null || usr/sbin/groupadd elog
    getent passwd elog >/dev/null || usr/sbin/useradd -c "elog Server"
    -g elog -d /home/elog -s /bin/false elog
    usr/bin/passwd -l elog &>/dev/null
    chown -R elog:elog /etc/elog
    chown -R elog:elog /home/elog
    echo ">>> Add elogd to the DAEMONS array in /etc/rc.conf if you want"
    echo ">>> the server to start at system boot-up."
    # arg 1: the new package version
    # arg 2: the old package version
    post_upgrade() {
    post_install $1
    # arg 1: the old package version
    pre_remove() {
    usr/sbin/userdel elog &>/dev/null
    usr/sbin/groupdel elog &>/dev/null
    echo ">>> Post-install logbook entries remain after package removal."
    op=$1
    shift
    $op $*
    elogd
    #!/bin/bash
    . /etc/rc.conf
    . /etc/rc.d/functions
    PID=`pidof -o %PPID /usr/sbin/elogd`
    case "$1" in
    start)
    stat_busy "Starting elogd"
    [ -z "$PID" ] && /usr/sbin/elogd -D -c /etc/elog/elogd.cfg
    > /dev/null 2>&1
    if [ $? -gt 0 ]; then
    stat_fail
    else
    add_daemon elogd
    stat_done
    fi
    stop)
    stat_busy "Stopping elogd"
    [ ! -z "$PID" ] && kill $PID &> /dev/null
    if [ $? -gt 0 ]; then
    stat_fail
    else
    rm_daemon elogd
    stat_done
    fi
    restart)
    $0 stop
    sleep 1
    $0 start
    echo "usage: $0 {start|stop|restart}"
    esac
    exit 0

  • Error in PKGBUILD directfb from AUR

    helo
    I add in PKGBUILD: dependency linux-fusion +  --enable-multi
    but I have this error during compilation:
    /bin/sh ../../libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I../.. -I../../include -I../../lib -I../../include -I../../lib -DDATADIR=\"/usr/share/directfb-1.0.1\" -DMODULEDIR=\"/usr/lib/directfb-1.0-0\" -D_REENTRANT -mtune=powerpc -O2 -pipe -mpowerpc-gfxopt -MT ppcasm_memcpy_cachable.lo -MD -MP -MF .deps/ppcasm_memcpy_cachable.Tpo -c -o ppcasm_memcpy_cachable.lo ppcasm_memcpy_cachable.S
    gcc -DHAVE_CONFIG_H -I. -I../.. -I../../include -I../../lib -I../../include -I../../lib -DDATADIR=\"/usr/share/directfb-1.0.1\" -DMODULEDIR=\"/usr/lib/directfb-1.0-0\" -D_REENTRANT -mtune=powerpc -O2 -pipe -mpowerpc-gfxopt -MT ppcasm_memcpy_cachable.lo -MD -MP -MF .deps/ppcasm_memcpy_cachable.Tpo -c ppcasm_memcpy_cachable.S -fPIC -DPIC -o .libs/ppcasm_memcpy_cachable.o
    ppcasm_memcpy_cachable.S:37:26: error: linux/config.h: No such file or directory
    make[3]: *** [ppcasm_memcpy_cachable.lo] Error 1
    make[3]: Leaving directory `/home/sacarde/pkg/directfb/src/DirectFB-1.0.1/lib/direct'
    make[2]: *** [all-recursive] Error 1
    make[2]: Leaving directory `/home/sacarde/pkg/directfb/src/DirectFB-1.0.1/lib'
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory `/home/sacarde/pkg/directfb/src/DirectFB-1.0.1'
    make: *** [all] Error 2
    can you help me ?
    thankyou

    thanks to voidnull for the patch in ppc system
    --- lib/direct/system.c    2007-08-07 21:43:00.000000000 +0200
    +++ lib/direct/system.c    2007-12-30 19:22:30.000000000 +0100
    @@ -34,6 +34,17 @@
    #include <direct/build.h>
    #include <direct/system.h>
    +#include <asm/page.h>
    +
    +#define PAGE_SIZE       (1UL << PAGE_SHIFT)
    +#define PAGE_MASK       (~(PAGE_SIZE-1))
    +#define LARGE_PAGE_MASK (~(LARGE_PAGE_SIZE-1))
    +#define LARGE_PAGE_SIZE (1UL << PMD_SHIFT)
    +
    +#define PAGE_SHIFT      12
    +#define PAGE_SIZE       (1UL << PAGE_SHIFT)
    +
    +
    #if HAVE_ASM_PAGE_H
    #include <asm/page.h>
    #else
    --- src/core/system.c    2007-08-19 23:52:06.000000000 +0200
    +++ src/core/system.c    2007-12-30 19:22:22.000000000 +0100
    @@ -51,6 +51,16 @@
    #include <direct/messages.h>
    #include <direct/modules.h>
    +#include <asm/page.h>
    +#define PAGE_SIZE       (1UL << PAGE_SHIFT)
    +#define PAGE_MASK       (~(PAGE_SIZE-1))
    +#define LARGE_PAGE_MASK (~(LARGE_PAGE_SIZE-1))
    +#define LARGE_PAGE_SIZE (1UL << PMD_SHIFT)
    +
    +#define PAGE_SHIFT      12
    +#define PAGE_SIZE       (1UL << PAGE_SHIFT)
    +
    +
    DEFINE_MODULE_DIRECTORY( dfb_core_systems, "systems",
                              DFB_CORE_SYSTEM_ABI_VERSION );

  • Craete AUR package with no url in PKGBUILD ?

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

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

  • AUR and license in PKGBUILDs

    Hi, inspired by http://archlinux.org/pipermail/aur-gene … 08980.html i wanted to raise a different kind of discussion.
    Are the PKGBUILDs submitted to AUR subject to any license by default? AFAIK they arent.
    Lately i noticed that most of the scripts i have submitted to the AUR, and later dropped, were picked up by others who have conviniently scratched my personal data from the script and added theirs. Thats totally uneceptable. Even if you see PKGBUILDs in official repos they carry contributor data from way back in 2002.
    Should we start adding licenses to the scripts too?
    The most convinient way would be to have a license for anything that gets submitted to the AUR, instead of adding lines inside PKGBUILDs.

    dolby wrote:Are the PKGBUILDs submitted to AUR subject to any license by default? AFAIK they arent.
    Not that I have seen.  That probably is something that should be looked into.
    dolby wrote:Lately i noticed that most of the scripts i have submitted to the AUR, and later dropped, were picked up by others who have conviniently scratched my personal data from the script and added theirs. Thats totally uneceptable.
    Agreed.  There is nothing wrong with having multiple contributor lines so people should use them.  It is very poor form to take credit for other peoples work.

  • First PKGBUILD: Chirp

    Since it's my first time, I figured I'd post here for comments before uploading to AUR
    PKGBUILD
    # Maintainer: Nicholas Tryon (KC2YTG) <dhraak at gmail dot com>
    pkgname=chirp
    pkgver=0.2.2
    pkgrel=1
    pkgdesc="GUI tool for programming ham radios; supports a large number of makes and models"
    arch=('any')
    url="http://chirp.danplanet.com/"
    license=('GPL')
    depends=('python2-lxml' 'python2-pyserial' 'desktop-file-utils')
    options=(!emptydirs)
    install=$pkgname.install
    source=("http://chirp.danplanet.com/download/$pkgver/$pkgname-$pkgver.tar.gz")
    md5sums=('0ffcdac065a4471de70b4a0daf90f65c')
    package() {
    cd "$srcdir/$pkgname-$pkgver"
    python2 setup.py install --root="$pkgdir/" --optimize=1
    # vim:set ts=2 sw=2 et:
    chirp.install
    post_install() {
    update-desktop-database -q
    post_remove() {
    update-desktop-database -q
    # vim:set ts=2 sw=2 et:
    I got rid of all the namcap errors and such, but I'd still like to make sure I got everything right and proper.
    (and if I hadn't loaned out my radio's programming cable, I could actually test out the program itself)

    Looks good. Just FYI, to have $srcdir in 'cd "$srcdir/$pkgname-$pkgver"' is not required anymore. 'cd "$pkgname-$pkgver"' would do just fine.

  • Aur is a friggin mess, I propose either a serious cleanup or a whipe.

    [oh@Alice][~/projects/clean-aur/aur-mirror]% echo * | wc -w
    55989
    [oh@Alice][~/projects/clean-aur/aur-mirror]% grep -lR --include PKGBUILD '_.*root' | wc -l
    6759
    [oh@Alice][~/projects/clean-aur/aur-mirror]% grep -RL --include PKGBUILD 'package()' | wc -l
    19339
    The numbers pretty much speaks for them self. There are thousands of packages using old PKGBUILD syntax in aur. 34.54% of all aur packages will stop working at pacman 4.2 release. If you also count packages that are plain broken, duplications, outdated and so on, I would not be supriced if the total number is close to 50%,
    In my not so humble evil overlord of everything™<insert evil laughter and dramatic music here> opinion something drastic should be done. I propose that we set a time limit, if there have not been a major improvement in the overall quality of aur by that date, the current aur is moved as a backup and aur.archlinux.org is started again with a clean db. Active maintainers of packages can then easily reupload their packages (or perhaps a button on the backup page to move the package over).
    Last edited by Mr.Elendig (2014-01-03 14:33:24)

    sanskritfritz wrote:I'm afraid a wipe would really too drastic, as some valuable information would get lost, especially the comments on packages that worked once, and are just waiting for someone interested to step up and do some work.
    I've lost count of the number of times I've read a comment on the AUR to the effect of "You need to change <setting x> to <value y>, or the package won't build," only to see the maintainer hasn't acted upon that change after a reasonable grace period.  The package isn't marked as orphaned, and may not be flagged out-of-date, but it's effectively both. In my opinion, while an immediate wipe of everything may be a little too drastic, summarily doing away with anything that's been orphaned more than 6 months, resetting all AUR votes to zero, taking stock of things in [community] and making it clear that things will be done away with several months from now (and everything will need to be uploaded again) is reasonable. I'm not going to pretend to have any details in my head about how to proceed, but the sheer number of abandoned packages is staggering; start by just getting rid of them.
    Also, in my totally non-authoritative opinion, there are certain packages in the AUR that the TUs might consider placing on some sort of probationary status, or even getting rid of, because they just don't seem (to me) to need the Arch Build System for any good reason, and so don't seem (to me) to belong in the AUR. I'm talking about toolkit and window manager themes, window manager plugins (think XMonad contrib) and variants (think DWM Sprinkles), Vim plugins and colorschemes, minor EMACS modes, Ruby gems, Python pip/easy_install packages, fonts---PKGBUILDs that are essentially overblown download-and-move-this-file scripts or calls to other operations (e.g. "gem install") rather than source build scripts, or which don't need to be installed to the root filesystem on single-user systems(and most of us probably have single-user systesms).

  • Slurpy - An AUR search/download/update helper in Python

    Some of you guys from IRC already know about slurpy, but I've tagged a release and uploaded a stable PKGBUILD to the AUR.
    AUR packages:
    slurpy - should remain usable, but will not contain latest bug fixes until the next release
    slurpy-git - latest and greatest, but will also contain the latest bugs I've introduced
    (Below is shamelessly ripped from my project page)
    Preamble
    slurpy is another AUR helper script written in Python. I've been an advocate of arson since it's inception but the fact that it's written in Ruby always bugged me. Since I am much more comfortable in Python I decided to write a port. The arson code base changed a lot as I worked on this and I decided to continue the direction I was heading rather than rewriting the port to match. slurpy is where I ended up.
    What it is
        * Faster searching, downloading, retrieving info, and checking for updates for AUR packages.
        * Dependency resolution for packages in the AUR.
        * Written in Python with only one optional dependency - python-cjson (makes processing faster with large result sets).
        * Colorized output based on pacman-color's color.conf. Color is disabled by default and must be enabled with -c|--color.
        * Easy downloading of package source through the ABS for packages in the official repositories. (Very experimental!!)
    What it isn't
        * slurpy is not a way to automate the download-build-install process. It is only a means to manage PKGBUILDS. If you are looking for an automatic installer, check out yaourt.
        * slurpy is not a `prettyfier'. Output is mostly modeled after pacman output to keep a uniform feel across tools.
    Other thoughts
        * I've tested this quite a bit, but I know there are many bugs I've missed. I could use a few testers giving quality feedback. If you've got a minute, check it out and let me know what you think.

    Evanlec and I talked about this issue on IRC.  I know why it breaks, I'm not sure how to handle it.  That cromium package uses a pkgver that is grabbed from the cromium webpage, but the AUR doesn't know how to handle that pkgver.  This causes the AUR to return a version number of -7 (negative $pkgrel).  This is more of an issue with the way the PKGBUILD is written and what the AUR can support, but I'll see if I can implement an elegant work around for this.
    I've run into this before with other packages too.  My conclusion was that the best way to deal with it is to ignore any packages who's verson number returns as negative, or who's version number slurpy doesn't understand.  This would mean that there are possibly packages installed on your system that need to be updated that slurpy isn't showing updates for.  In that case slurpy show a warning message saying that it can't determine the latest version of that package.  Thoughts?
    Last edited by rson451 (2009-09-30 12:27:14)

  • Hc, hcg, and libmapm PKGBUILDs advice/testing

    Hello,
    I am writing a calculator - hc (cli version) and hcg (gui version) which require the MAPM library.
    More information can be found here:
    http://bbs.archlinux.org/viewtopic.php?id=85641
    goran'agar and I wrote PKGBUILDs for these 3:
    # Contributor: Fabio Comolli <[email protected]>
    pkgname=mapm
    pkgver=4.9.5
    pkgrel=1
    pkgdesc="Mike's Arbitrary Precision Math Library"
    url="http://www.tc.umn.edu/~ringx004/mapm-main.html"
    depends=('gcc')
    provides=('mapm')
    source=("http://www.tc.umn.edu/~ringx004/mapm-$pkgver.tar.gz")
    md5sums=('a92ff86b6240f78f882661e0b1c11920')
    license=('freeware')
    arch=('i686' 'x86_64')
    build() {
    cd $startdir/src/mapm_$pkgver
    gcc -c -Wall -O2 -fPIC map*.c || return 1
    gcc -shared -o libmapm.so.0 map*.o || return 1
    mkdir -p $startdir/pkg/usr/lib
    mkdir -p $startdir/pkg/usr/include
    mkdir -p $startdir/pkg/usr/share/mapm
    cp $startdir/src/mapm_$pkgver/libmapm.so.0 $startdir/pkg/usr/lib
    cp $startdir/src/mapm_$pkgver/m_apm*.h $startdir/pkg/usr/include
    cp -a $startdir/src/mapm_$pkgver/DOCS $startdir/pkg/usr/share/mapm
    # Contributor: Fabio Comolli <[email protected]>
    pkgname=hcg
    pkgver=0.4.2
    pkgrel=1
    pkgdesc="HoubySoft Calculator - a calculator with lot of options and abundant functions"
    url="http://hc.houbysoft.com"
    depends=('mapm' 'gtk2' 'glib2')
    provides=('hcg')
    source=("http://houbysoft.com/download/$pkgname-$pkgver-src.tar.gz")
    md5sums=('3c06c0d9e4ffb220a30820c733d55d1d')
    license=('GPL 3')
    arch=('i686' 'x86_64')
    build() {
    cd $startdir/src/$pkgname-$pkgver-src
    gcc -DHCG `pkg-config gtk+-2.0 gthread-2.0 --cflags` -DHCG_E -c main.c || return 1
    gcc -DHCG `pkg-config gtk+-2.0 gthread-2.0 --cflags` -DHCG_E -c utils.c || return 1
    gcc -DHCG_E -c hc_functions.c || return 1
    gcc -DHCG_E -c hc.c || return 1
    gcc `pkg-config gtk+-2.0 gthread-2.0 --cflags --libs` main.o utils.o hc_functions.o hc.o /usr/lib/libmapm.so.0 -o hcg || return 1
    mkdir -p $startdir/pkg/usr/bin
    mkdir -p $startdir/pkg/usr/share/$pkgname
    cp $startdir/src/$pkgname-$pkgver-src/$pkgname $startdir/pkg/usr/bin
    cp -a $startdir/src/$pkgname-$pkgver-src/README $startdir/pkg/usr/share/$pkgname
    cp -a $startdir/src/$pkgname-$pkgver-src/LICENSE $startdir/pkg/usr/share/$pkgname
    # Contributor: Jan Dlabal <dlabaljan at gmail dot com>
    pkgname=hc
    pkgver=0.4.2
    pkgrel=1
    pkgdesc="HoubySoft Calculator - a calculator with lot of options and abundant functions - CLI version"
    url="http://hc.houbysoft.com"
    depends=('mapm')
    provides=('hc')
    source=("http://houbysoft.com/download/$pkgname-$pkgver-src.tar.gz")
    md5sums=('2256ea75ecee8bd41a3d1d02bb189945')
    license=('GPL 3')
    arch=('i686' 'x86_64')
    build() {
    cd $startdir/src/$pkgname-$pkgver-src
    gcc -c main.c || return 1
    gcc -c hc.c || return 1
    gcc -c hc_functions.c || return 1
    gcc main.o hc_functions.o hc.o /usr/lib/libmapm.so.0 -lm -o hc || return 1
    mkdir -p $startdir/pkg/usr/bin
    mkdir -p $startdir/pkg/usr/share/$pkgname
    cp $startdir/src/$pkgname-$pkgver-src/$pkgname $startdir/pkg/usr/bin
    cp -a $startdir/src/$pkgname-$pkgver-src/README $startdir/pkg/usr/share/$pkgname
    cp -a $startdir/src/$pkgname-$pkgver-src/LICENSE $startdir/pkg/usr/share/$pkgname
    So I am just submitting these for review and testing, and further advice as to what to do now, ie is it ready to be uploaded to AUR? Is there anything else that needs to be done? Anything that should be changed in the PKGBUILDs?
    Thanks

    Thanks for your advice. I fixed everything (hopefully) except the Makefile, because all the packages were originally built statically, and so I think it's simpler to just do this.
    Modified PKGBUILD for mapm:
    # Contributor: Fabio Comolli <[email protected]>
    pkgname=mapm
    pkgver=4.9.5
    pkgrel=1
    pkgdesc="Mike's Arbitrary Precision Math Library"
    arch=('i686' 'x86_64')
    url="http://www.tc.umn.edu/~ringx004/mapm-main.html"
    license=('custom')
    source=("http://www.tc.umn.edu/~ringx004/mapm-$pkgver.tar.gz")
    md5sums=('a92ff86b6240f78f882661e0b1c11920')
    build() {
    cd $srcdir/mapm_$pkgver
    gcc -c -Wall -O2 -fPIC map*.c || return 1
    gcc -shared -o libmapm.so.0 map*.o || return 1
    mkdir -p $pkgdir/usr/lib
    mkdir -p $pkgdir/usr/include
    mkdir -p $pkgdir/usr/share/mapm
    cp $srcdir/mapm_$pkgver/libmapm.so.0 $pkgdir/usr/lib
    cp $srcdir/mapm_$pkgver/m_apm*.h $pkgdir/usr/include
    cp -a $srcdir/mapm_$pkgver/DOCS $pkgdir/usr/share/mapm
    install -D -m644 ../../mapm_license.txt $pkgdir/usr/share/licenses/$pkgname/LICENSE || return 1
    mapm_license.txt to be included (the source package does not contain any file specially for the license, so it's probably simpler to cut it from the README and put it in a new file?):
    MAPM
    Version 4.9.5
    December 10, 2007
    Michael C. Ring
    [email protected]
    Latest release will be available at
    http://tc.umn.edu/~ringx004
    * Copyright (C) 1999 - 2007 Michael C. Ring *
    * This software is Freeware. *
    * Permission to use, copy, and distribute this software and its *
    * documentation for any purpose with or without fee is hereby granted, *
    * provided that the above copyright notice appear in all copies and *
    * that both that copyright notice and this permission notice appear *
    * in supporting documentation. *
    * Permission to modify the software is granted. Permission to distribute *
    * the modified code is granted. Modifications are to be distributed by *
    * using the file 'license.txt' as a template to modify the file header. *
    * 'license.txt' is available in the official MAPM distribution. *
    * To distribute modified source code, insert the file 'license.txt' *
    * at the top of all modified source code files and edit accordingly. *
    * This software is provided "as is" without express or implied warranty. *
    Modified hcg PKGBUILD:
    # Contributor: Fabio Comolli <[email protected]>
    pkgname=hcg
    pkgver=0.4.2
    pkgrel=1
    pkgdesc="HoubySoft Calculator - a calculator with lot of options and abundant functions"
    arch=('i686' 'x86_64')
    url="http://hc.houbysoft.com"
    license=('GPL3')
    depends=('mapm' 'gtk2' 'glib2')
    source=("http://houbysoft.com/download/$pkgname-$pkgver-src.tar.gz")
    md5sums=('3c06c0d9e4ffb220a30820c733d55d1d')
    build() {
    cd $srcdir/$pkgname-$pkgver-src
    gcc -DHCG `pkg-config gtk+-2.0 gthread-2.0 --cflags` -DHCG_E -c main.c || return 1
    gcc -DHCG `pkg-config gtk+-2.0 gthread-2.0 --cflags` -DHCG_E -c utils.c || return 1
    gcc -DHCG_E -c hc_functions.c || return 1
    gcc -DHCG_E -c hc.c || return 1
    gcc `pkg-config gtk+-2.0 gthread-2.0 --cflags --libs` main.o utils.o hc_functions.o hc.o /usr/lib/libmapm.so.0 -o hcg || return 1
    mkdir -p $pkgdir/usr/bin
    mkdir -p $pkgdir/usr/share/$pkgname
    cp $srcdir/$pkgname-$pkgver-src/$pkgname $pkgdir/usr/bin
    cp -a $srcdir/$pkgname-$pkgver-src/README $pkgdir/usr/share/$pkgname
    cp -a $srcdir/$pkgname-$pkgver-src/LICENSE $pkgdir/usr/share/$pkgname
    Modified hc PKGBUILD:
    # Contributor: Jan Dlabal <dlabaljan at gmail dot com>
    pkgname=hc
    pkgver=0.4.2
    pkgrel=1
    pkgdesc="HoubySoft Calculator - a calculator with lot of options and abundant functions - CLI version"
    arch=('i686' 'x86_64')
    url="http://hc.houbysoft.com"
    license=('GPL3')
    depends=('mapm')
    source=("http://houbysoft.com/download/$pkgname-$pkgver-src.tar.gz")
    md5sums=('2256ea75ecee8bd41a3d1d02bb189945')
    build() {
    cd $srcdir/$pkgname-$pkgver-src
    gcc -c main.c || return 1
    gcc -c hc.c || return 1
    gcc -c hc_functions.c || return 1
    gcc main.o hc_functions.o hc.o /usr/lib/libmapm.so.0 -lm -o hc || return 1
    mkdir -p $pkgdir/usr/bin
    mkdir -p $pkgdir/usr/share/$pkgname
    cp $srcdir/$pkgname-$pkgver-src/$pkgname $pkgdir/usr/bin
    cp -a $srcdir/$pkgname-$pkgver-src/README $pkgdir/usr/share/$pkgname
    cp -a $srcdir/$pkgname-$pkgver-src/LICENSE $pkgdir/usr/share/$pkgname
    Do you think it's ready for upload now?
    Regards,
    Jan

  • PKGBUILD for Canon Pixma iP1500 Printer

    Hi, I'm not sure if this is the correct place, maybe the forum needs a "AUR Packages release" section? 
    I wrote a PKGBUILD to this printer and I know that it's very difficult to find this driver, and it even can be easily modified to get others similar Canon printers working so I post it here.
    I uploaded to AUR http://aur.archlinux.org/packages/pixma … 0/PKGBUILD

    Glad to help the Arch community the same way you had helped me 
    @ Chris|MD: When I was searching how to get working mine, I read on Gentoo Forums that someone got the iP2000 working with the Canon BJC-7100 foomatic driver (foomatic package it's in extra repository). You can try that and see if works for you.

  • [solved] Multiple hyphens in PKGBUILD source directive

    Moderator: If this is not the correct forum please feel free to move this as appropriate.
    Hello,
    I have been trying my hand at creating PKBUILDS and submitting them to ABS.  This problem has me stumped.
    I have a source file that is named hpgcc-2.0-sp2-linux.tar
    I call the pkg hpgcc, and the version 2.0_sp2.  The architecture I ignore since this is a PKGBUILD for (duh) Linux
    I create the source directive like:
    source=(http://www.hpcalc.org/hp49/pc/programming/$pkgname-${pkgver/_/-}-linux.tar.bz2)
    So far, so good.  makepkg runs and builds a package, pacman -U installs it, no problem.
    Clean the directory, archive it, uploaded to AUR.  Okay.  Download the tarbell to another computer, makepkg and install, no problem.
    The issue is that the AUR page on the website munges the source file name:
    hpgcc 2.0_sp2-2
    http://hpcalc.org
    gcc C Compiler for HP 48,49,50 Calculators
    unsupported :: devel (change category)
    Maintainer: ewaller
    Votes: 0
    License: GPL
    Last Updated: Wed, 25 Aug 2010 05:17:02 +0000
    First Submitted: Mon, 23 Aug 2010 06:21:13 +0000
    Tarball :: Files :: PKGBUILD
    Sources
    http://www.hpcalc.org/hp49/pc/programming/hpgcc-2.0_sp2/_/-}-linux.tar.bz2
    I don't think this is right -- a cursory look at other ABS pages all looked correct.  Am I missing something, is this a bug in the ARCH ABS site? or is this a just don't care?
    Last edited by ewaller (2010-08-25 15:15:15)

    This happens because AUR doesn't source PKGBUILD (for security reasons). You can leave it as it is or hardcode the source url.
    Last edited by Snowman (2010-08-25 07:06:23)

  • Pkgbuild upstream updater

    Hi, here is my first try coding script
    code contribution are welcome.
    Description:
    Script to retrieve the latest upstream PKGBUILD file and if new changes it will build/install/(or upload to AUR) the package or whatever.
    Todo:
    Parse the PKGBUILD to retrieve extra files like $pkgnam.install, patch, ect
    Allow manually adding PKGBUILD address upstream.
    Allow to automatically update a bunch of PKGBUILD with a loop.
    Write the source address PKGBUILD upstream in a separate file into the same folder or in a global file.
    #!/bin/bash
    #update-pkgbuild.sh
    # Todo:
    # Parse the PKGBUILD to retrieve extra files like $pkgnam.install, patch, ect
    # Allow manually adding PKGBUILD address upstream.
    # Allow to automatically update a bunch of PKGBUILD with a loop.
    # Write the source address PKGBUILD upstream in a separate file into the same folder or in a global file.
    set -x
    old_md5="$(md5sum 'PKGBUILD' 2>/dev/null | cut -d ' ' -f 1 )"
    # del old source packages
    if [[ -d "src" ]]; then
    rm -r "src"
    fi
    if [[ -d "pkg" ]]; then
    rm -r "pkg"
    fi
    # check if tmp folder exist. If so then delete
    if [[ -d "tmp" ]]; then
    # Control will enter here if DIRECTORY exists.
    rm -r "tmp"
    fi
    mkdir "tmp"
    cd tmp || { echo 'failed to cd'; exit 1; }
    curl -O https://raw.githubusercontent.com/felixonmars/aur-mirror/master/pamac-aur/PKGBUILD || { echo 'failed to curl'; exit 1; }
    new_md5="$(md5sum 'PKGBUILD' | cut -d ' ' -f 1 )"
    # check if file exist
    if [ -f ../PKGBUILD ]; then
    echo 'check if md5sum are equal'
    # check if md5sum are equal
    if [[ $old_md5 == $new_md5 ]]; then
    # nothing to do
    echo 'No update available'
    else
    # backup the old file
    cp ../PKGBUILD ../PKGBUILD-"$(date +'%Y%m%d-%H%M%S')"
    # replace old
    mv PKGBUILD ../PKGBUILD
    # Todo
    # read the pkgbuild to list available extra files like patchs and then curl that needed files
    # back to previous dir
    cd -
    # Build & Install the package
    # makepkg -i -s -f --noconfirm
    # Build only
    echo 'makepkg -s -f --noconfirm'
    fi
    else
    # move
    mv PKGBUILD ../PKGBUILD
    # Todo
    # read the pkgbuild to list available extra files like patchs and then curl that needed files
    # back to previous dir
    cd -
    # Build & Install the package
    # makepkg -i -s -f --noconfirm
    # Build only
    echo 'makepkg -s -f --noconfirm'
    fi
    Edit: the code can be forked from this link https://gist.github.com/mawekuwe/38befce82878e83ab376
    Updated the description.
    Thanks for reading
    Last edited by zegoti (2015-04-25 00:42:14)

    fukawi2 wrote:
    # del old source packages
    if [[ -d "src" ]]; then
    rm -r "src"
    fi
    if [[ -d "pkg" ]]; then
    rm -r "pkg"
    fi
    You should look in /etc/makepkg.conf (and ~/.makepkg.conf) and take into account $BUILDDIR instead of assuming src/ and pkg/.
    For example, my $BUILDDIR in ~/.makepkg.conf points to a path in /mnt that is a RAID-10 array of SSD's.
    Great suggestion, I will look at it. Thanks

Maybe you are looking for