KDE split packages

Hi, i'm about to get a new computer (hopefully) based on 64BIT so i browsed is Gentoo's website and i so that now gentoo has split ebuilds for kde, that means that if you want to install Kopete for example, you don't need to install all of kde's network stuff.
Why in Arch it's not like that?

Here's Kopete and here's the PKGBUILD for you. I've made standalone packages for most every kde app. Just want to test them on a base install with X and kdelibs before uploading them all to user contrib.
If you guys want a specific kde app, lemme know and i'll upload it. Just been busy and got sidetracked.

Similar Messages

  • Splitted packages (KDEmod-like) for docs?

    Sorry for posting another thread about the "stripping-docs" issue.
    I built last week some KDEmod packages from svn to get rid of a bug in kate, and I encountered for the first time the splitted packages concept used in KDEmod.
    In your opinion, is it feasible (and not too time-consuming) to use the same system to split every package in package-bin and package-doc?

    Sorry, I didn't make myself clear.
    I didn't go through the details of how packages are splitted in KDEmod, I just used the following thread:
    http://kdemod.ath.cx/bbs/viewtopic.php?id=592
    They have two different makepkg for splitted and non splitted packages.
    They don't split bin and doc, but independent parts of the package, letting you choose to install only one part.
    An example:
    $ pacman -Ss kdetoys
    extra/kdetoys 3.5.9-1 (kde)
    Toys for KDE.
    kdemod/kdemod-kdeaddons-base 3.5.9-1 (kdemod)
    KDEmod KDEtoys base package
    kdemod/kdemod-kdetoys-amor 3.5.9-1 (kdemod-kdetoys)
    Amusing Misuse Of Resources put's comic figures above your windows
    kdemod/kdemod-kdetoys-base 3.5.9-1 (kdemod-kdetoys)
    KDEmod KDEtoys base package
    kdemod/kdemod-kdetoys-eyesapplet 3.5.9-1 (kdemod-kdetoys)
    A kicker applet similar to XEyes
    kdemod/kdemod-kdetoys-fifteenapplet 3.5.9-1 (kdemod-kdetoys)
    Kicker applet, order 15 pieces in a 4x4 square by moving them
    kdemod/kdemod-kdetoys-kmoon 3.5.9-1 (kdemod-kdetoys)
    System tray applet showing the moon phase
    kdemod/kdemod-kdetoys-kodo 3.5.9-1 (kdemod-kdetoys)
    Mouse movement meter
    kdemod/kdemod-kdetoys-kteatime 3.5.9-1 (kdemod-kdetoys)
    System tray applet that makes sure your tea doesn't get too strong
    kdemod/kdemod-kdetoys-ktux 3.5.9-1 (kdemod-kdetoys)
    Tux-in-a-Spaceship screen saver
    kdemod/kdemod-kdetoys-kweather 3.5.9-1 (kdemod-kdetoys)
    Kicker applet that will display the current weather outside
    kdemod/kdemod-kdetoys-kworldwatch 3.5.9-1 (kdemod-kdetoys)
    Application and kicker applet showing daylight area on the world globe
    As you can see, in standard kde, kdetoys is a single package, while in kdemod you can choose to install separately a single component (let's say amor).
    But there is only one PKGBUILD for kdemod-kdetoys, and it includes instructions to install or uninstall only one component, notably the line
    # LIST OF SPLIT INSTALL FUNCTIONS
    splitinstall=(base_install amor_install eyesapplet_install fifteenapplet_install kmoon_install kodo_install kteatime_install ktux_install kweather_install k
    worldwatch_install)
    Using the same system to split every package in bin and doc was my idea, but I really don't know if it is easy to implement.
    It could be helpful if somebody of the KDEmod team posted in this thread.

  • [makepkg] Question about split packages handling in makepkg

    Hello
    One question came to my mind, while I was looking at the vlc PKGBUILD. Does splitting packages have to be done in such a non efficient way? I mean, why do we have to delete for example, a directory, once make install has been issued, only to copy the removed parts by hand in the next function? Wouldn't it be better to just specify something like per-package %files section (like in RPM .spec files)? Is this approach possible in Arch without ditching all the work up to now? If there was any discussion about that, I would love to take part in it. I am also looking forward to listening some critical comments.

    Allan wrote:How is providing a list of files to include more efficient that providing a list not to include?
    If it was only about providing a list of files to include/exclude, it would be ok. However, as far as I know, when Makefile has only one install target and we have to separate some files, we have to install all first, and then remove parts which don't fit into the main package just to copy them back in place in the next package-foo2() function. It's like doing the same work twice. Is that right? If so, it could be quite problematic to package bigger projects. I'm kind of speculating here, because I can't name any of the "big projects", but I'm quite sure there are some out there. I hope I made my point clearly now.

  • [Solved] Split packages in the AUR?

    Can I not upload a split package to the AUR? I am getting an error when I try to upload this PKGBUILD source package:
    Invalid name: only lowercase letters are allowed.
    PKGBUILD:
    pkgbase=mfs
    pkgname=('mfs-client' 'mfs-chunkserver' 'mfs-master')
    pkgver=1.6.19
    pkgrel=1
    pkgdesc="File system designed for petabyte class clusters crunching mission critical data 24/7"
    license=("GPL3")
    arch=('i686' 'x86_64')
    options=('!libtool')
    url="http://www.moosefs.com/"
    source=("http://www.moosefs.org/tl_files/mfscode/${pkgbase}-${pkgver}.tar.gz"
    "mfsmaster"
    "mfschunkserver"
    "mfsmetalogger"
    "mfscgiserv")
    md5sums=('21a86c7a521c8682868eb8c0b330fb58'
    'e4e260f48b063d7f2bd568fc6230b813'
    '2b5c6d70938add6aa4e859dfbe11e71b'
    '4359c1e0f857a3c5d26e0cb67f8c9d8b'
    '3aa9b98a05d08e1f6256a57746181798')
    build() {
    cd "${srcdir}/${pkgbase}-${pkgver}"
    package_mfs-client() {
    depends=('zlib' 'fuse')
    cd "${srcdir}/${pkgbase}-${pkgver}"
    ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var/lib --disable-mfschunkserver --disable-mfsmaster --disable-mfscgi --disable-mfscgiserv
    make || return 1
    make DESTDIR="${pkgdir}" install || return 1
    rm -rf ${pkgdir}/usr/share/man/man7
    package_mfs-chunkserver() {
    depends=('zlib')
    cd "${srcdir}/${pkgbase}-${pkgver}"
    ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var/lib --disable-mfsmaster --disable-mfsmount --disable-mfscgi --disable-mfscgiserv
    make || return 1
    make DESTDIR="${pkgdir}" install || return 1
    rm -rf ${pkgdir}/usr/share/man/man7
    install -m 755 -D ${srcdir}/mfschunkserver ${pkgdir}/etc/rc.d/mfschunkserver
    package_mfs-master() {
    depends=('zlib')
    cd "${srcdir}/${pkgbase}-${pkgver}"
    ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var/lib --disable-mfschunkserver --disable-mfsmount
    make || return 1
    make DESTDIR="${pkgdir}" install || return 1
    install -D -m0644 README $pkgdir/usr/share/doc/${pkgbase}/README
    install -D -m0644 INSTALL $pkgdir/usr/share/doc/${pkgbase}/INSTALL
    install -D -m0644 NEWS $pkgdir/usr/share/doc/${pkgbase}/NEWS
    install -D -m0644 UPGRADE $pkgdir/usr/share/doc/${pkgbase}/UPGRADE
    install -m 755 -D ${srcdir}/mfsmaster ${pkgdir}/etc/rc.d/mfsmaster
    install -m 755 -D ${srcdir}/mfsmetalogger ${pkgdir}/etc/rc.d/mfsmetalogger
    install -m 755 -D ${srcdir}/mfscgiserv ${pkgdir}/etc/rc.d/mfscgiserv
    find "$pkgdir" -name 'mfscgiserv' -print0 |xargs -0 \
    sed -i -e 's,^#!/usr/bin/env python$,#!/usr/bin/env python2,' \
    -e 's,^#!/usr/bin/python$,#!/usr/bin/python2,'
    Last edited by Ryujin (2010-12-23 03:35:40)

    https://bugs.archlinux.org/task/16394
    And, please use "code" tags...

  • Split packages disallowed in the AUR?

    Are split packages disallowed in the AUR?  I get a "Invalid name: only lowercase letters are allowed." when I attempted to upload the source to a split package I've been working on...

    https://bbs.archlinux.org/viewtopic.php … 14#p772214
    https://bugs.archlinux.org/index.php?do … k_id=16394
    Last edited by karol (2010-09-26 18:10:30)

  • Different sources split packages

    How do i put different sources for each package in a split package?
    Also i couldn't find any documentation on the build function for split packages, Will it be same for all the split packages?
    Thanks

    shaumux wrote:eg. if i already have vim installed and then want to install gvim.
    but since the package has only one build function does it mean that both vim and gvim will get built even though i am only installing gvim.
    man makeppkg wrote:       --pkg <list>
    Only build listed packages from a split package.

  • [Solved] Split packages getting updated multiple times?

    Assumably since AUR v3.0.0, when updating split packages, all these packages are listed for an upgrade, even though updating just one of them would take care of the rest.
    I created the following minimal PKGBUILD for "building" a previous version of linux-ck as a test: http://pastebin.com/vBykd5ta
    Both packer and yaourt are doing this:
    └┌(%:~/Desktop)┌- yaourt -Su --aur
    Foreign packages: / 61 / 61
    ==> Software upgrade (new version) :
    aur/linux-ck         3.14.7-1 -> 3.14.8-1
    aur/linux-ck-headers 3.14.7-1 -> 3.14.8-1
    └┌(%:~/Desktop)┌- packer -Su
    :: Starting full system upgrade...
    there is nothing to do
    :: Synchronizing aur database...
    aur                                        61  61 [----------------------------------------------------------]100%
    :: Starting full aur upgrade...
    Aur Targets    (2): linux-ck linux-ck-headers
    Is this a problem with the AUR helpers or the AUR in general?
    Last edited by algorythm (2014-06-17 10:17:14)

    Well, I was reported to one of my packages about this behavior, and I actually already made the bug reports.
    Other tools than Yaourt might have some "mid-checks" indeed. At least aura-git kind of worked around this by saying "linux-ck-headers is not an AUR package" and excluded it from the updates. It was the only one of which I didn't file a bug.
    E: You were right. Turns out only Yaourt and packer (hiatus) do this. Aurget and pacaur work just fine.
    Last edited by algorythm (2014-06-17 11:44:50)

  • Split Package Installs wrong version

    I noticed that AUR package for gradle and gradle-doc are a split package. I use AURA for my package manager and I opened a issue aurapm/aura#227. However, I am not sure it's a AURA issue.
    If you do aura -Aakx gradle-docs it installed the 1.12 documentation even though if you do -Ai gradle-doc which shows version 2. Gradle installed version 2 but the docs are always 1.12.
    Anyone have an idea why it's doing this?

    @Scimmia, I didn't think it was a PKGBUILD problem -- since doing the searches and looking directly at the PKGBUILD seems to be right. Its frustrating when trying to upgrade gradle and it keeps installing the wrong version for some odd reason.

  • [gambas2] Splitted package and testing repository available!

    Just following the bug report (http://bugs.archlinux.org/task/19318), now a repository is available to test gambas2 as a splitted package.
    The purpose of these packages is that it will allow the possibility to add an archlinux package generator to the gambas2 ide, avoiding to add the full list of gambas2 packages, for only installing a graphical application.
    The packages are built from a default archlinux installation, so no need to get testing repository enabled, i686 and x86_64 packages are available. Just add the following lines to your pacman.conf file:
    i686
    [gambarch]
    Server = http://gambarch.toile-libre.org/os/i686
    x86_64
    [gambarch]
    Server = http://gambarch.toile-libre.org/os/x86_64
    I hope you will find these useful. I will take a look to add gambas3 splitted svn packages.
    ++

    zodmaner wrote:
    neotuli wrote:I'm not so sure what you're talking about. It's up and running smooth
    Wow! The migration is finish? Great job guys! The migration from CVS to SVN is a very large undertaking and it's great to see that you guys have finally made it. Congrats guys.
    This is great news indeed! Thanks for informing us about this, neotuli.
    neotuli wrote:And yeah... we see the out of date flags, we even get a little spam every time you click one of them... but we're only human.
    Don't worry, we understand you.
    not quite..its seems community is going to take a bit longer got left behiend

  • Removeing kde-meta packages

    Hi!
    On KDE 4.3, when I try to remove an unwanted KDE app (ie KsCD), it tells me that i need to remove the corresponding kde-meta package as well (ie kde-meta-kdemultimedia). cool. however, when i do this, it makes all of the other apps with the kdemultimedia group orphans - i.e. they show up in pacman -Qdtq. is there any way to stop this from happening?

    I'd say just remove the meta-packages and reinstall (with --asexplicit) those that you want to keep and which show up in -Qtd.

  • Kde-trunk packages

    Awhile back, Mark Constable created some packages for running latest trunk of KDE.  When he decided he could no longer maintain, them, we moved them to gitorious and I (and LastOfTheWolves) took over maintenance.  I don't know if Stephan is stil maintaining the "split" PKGBUILDs, but I am keeping the "svn" (monolithic) branch up-to-date. 
    Despite the fact that they are bleeding edge, I have found them to be unusually stable.  In fact, I've had better luck with these on my production system than I did with 4.3-stable packages (especially in kdepim applications).
    Now that kde-4.4-unstable is available, the need for these packages is less, but I will continue to maintain the PKGBUILD files.  Feel free to send me bug reports.  I hope, soon, to upload my "build script" which automates the process of building and installing these.
    Here are instructions for downloading, building, and installing kde-trunk using the PKGBUILDs:
    1.  Make sure git is installed:
    pacman -S git
    2.  Use git to obtain a clone of the repostitory:
    git clone git://gitorious.org/kde-git-pkgbuilds/kde-git-pkgbuilds.git
    3.  Edit /etc/makepkg.conf
    Add the following lines:
    PKGDEST=/var/abs/local/eth-os/packages
    SRCDEST=/var/abs/local/eth-os/sources
    Warning: This will mean that ANY package you build with makepkg will be placed in /var/abs/local/eth-os/packages from now on!
    4.  cd to kde-git-pkgbuilds/svn/PKGNAME (where PKGNAME might be "kde-qt", for instance) and type:
    makepkg
    If this step fails the first time, don't fret.  Occasionally, the initial creation of the git repository hits a weird timeout or something.  Just run it again and it should complete.
    5.  Become root and install using pacman:
    su
    pacman -U /var/abs/local/eth-os/packages/PKGNAME.tar.gz
    Repeat steps 4 and 5 for any packages you want to install.  Every time you run the makepkg command, the script will grab the latest sources from kde svn (or, for kde-qt and amarok, git) and install them on your computer.

    thank you! this will be very useful :-)

  • "conflicts/provides" problem with splitted package

    I'm currently working on some brother printer packages and have the following situation:
    I want to replace the not-working package brother-mfc260c in AUR, and have made two packages, brother-mfc260c-lpr (the LPR driver) and brother-mfc260c-cupswrapper (the LPR-to-CUPS wrapper), which together provide what the old package should do (or have done).
    Here are the dependency specs from the new PKGBUILDs:
    brother-mfc260c-lpr:
    conflicts=('brother-mfc260c')
    brother-mfc260c-cupswrapper:
    depends=('brother-mfc260c-lpr')
    conflicts=('brother-mfc260c') # This could also be omitted because its dependency already conflicts with brother-mfc260c
    provides=('brother-mfc260c=1.0.1')
    But pacman doesn't like it. Whether I try to install both packages at the same time, or install brother-mfc260c-lpr first, and then brother-mfc260c-cupswrapper (like below), I get the same error:
    # pacman -U brother-mfc260c-cupswrapper-1.0.1_1-1-i686.pkg.tar.gz
    loading package data...
    checking dependencies...
    error: replacing packages with -U is not supported yet
    error: you can replace packages manually using -Rd and -U
    error: failed to prepare transaction (conflicting dependencies)
    :: brother-mfc260c-cupswrapper: conflicts with brother-mfc260c-lpr
    Should I file a bug report, or is this behavior intended? If the latter case applies, how can I solve such a conflict without loss of generality?
    Thanks in advance!

    Profjim wrote:Can you confirm that you've already manually removed brother-mfc260c?
    Sorry for not mentioning this earlier. I've never installed brother-mfc260c on my machine to begin with, because I don't even have such a printer. But I've successfully created such a package pair for the brother-mfc210c, and have read on the AUR page of the orphaned brother-mfc260c package the comment "The driver is not working... DELETE!!!", so I've made a package pair for this model in a similar style. And the brother-mfc210c package pair only works with the above mentioned provides/conflicts statements because its provides-statement has a typo which I've found after uploading it to AUR.
    To make a long story short, because of these two facts (never installed the real brother-mfc260c, and the typo in the brother-mfc210c-* packages), I'm quite positive about understanding how the provides/conflicts mechanism works.
    Profjim wrote:I think pacman knows to remove the existing package and install the new conflicting package, but only when the install is from a repo, not when one is using -U blahblah.pkg,tar.gz.
    I couldn't understand why this should matter from where a package is installed. IMHO this is a totally different layer of abstraction. But I'll make a test repo tomorrow to clear this question.
    Concerning your 3-package-suggestion, this wouldn't fit right away because both real packages have to conflict with the original one, because it is ~just~ a split of that package. And maybe there are still some people around using only the LPR driver and not the CUPS wrapper on top of it.
    After testing your suggestion, I'll post a feature request and will link it to this thread. AFAICT interpreting a conflicts statement not only against a package with the exact name but also against packages which provide that one is simply a design decision, and not clearly right or wrong. Would it only conflict against a given package, all other packages which provide that one and have files in common would have to be listed in the conflicts array, too.
    For the moment I've solved the problem by simply removing the provides-statement, because there is no package explicitly depending on brother-mfc260c, and the probability of it happening will be quite next to zero, but the basic problem still remains, and that's why I wanted to consult the community first before giving the devs extra work.

  • [SOLVED]pacman -R kde leaves packages uninstalled

    I installed KDE with "pacman -S kde" it installed all sorts of stuff and i didn't like it. 
    The only things i needed were kde-base plasma and dolphin. Now i've disintalled kde ( with "pacman -R kde ) and kept it minimal with the few things i need.
    Seems perfect but when i open a terminal and digit "k" and press tab, i can still see all kapplications that came with the whole kde package. Why? Shouldn't they be deleted? How can i remove them completley?
    Last edited by z3r0 (2010-02-25 12:03:56)

    Before anyone gives me "noob" i'll tell you that i also did a pacman -Rns kde and after reboot this is what's left if i press "k + tab" from a terminal
    z3r0@ deathstar ~$ k
    kaddressbookmigrator kEsetroot kpasswdd
    kadmin keytool kquitapp
    kadmind kf krb5-config
    kauth kfd krcp
    kbd_mode kfile4 kreadconfig
    kbdrate kftp kres-migrator
    kbuildsycoca4 kftpd kross
    kbxutil kgetcred krsh
    kcm kglobalaccel krshd
    kcmshell4 khelpcenter ksba-config
    kconfig_compiler khotnewstuff4 kshell4
    kcookiejar4 khotnewstuff-upload kstart
    kdc kiconfinder kstash
    kde4 kill ksu
    kde4-config killall ksvgtopng
    kde4-menu killall5 kswitch
    kdebugdialog kimpersonate ktelnet
    kde-cp kinit ktelnetd
    kded4 kioclient ktraderclient
    kdeinit4 kjs ktrash
    kdeinit4_shutdown kjscmd ktutil
    kdeinit4_wrapper klist kuiserver
    kde-mv klogin kunittestmodrunner
    kde-open kmail-migrator kwalletd
    kdestroy kmimetypefinder kwrapper4
    kdesu knotify4 kwriteconfig
    kdigest koi8rxterm
    keditfiletype kpasswd
    any ideas on how to get rid of this stuff i don't use?

  • Need some help with a split package

    Basically, I'd like to have some code in my PKGBUILD that will append some extra info to the package name based on a file the user defined.  This is for kernel26-ck and the file I speak of is the .config he/she makes.  Below is the code that doesn't work and I think it doesn't work because the name of the package is the name of the package_name() {} function and both of of these have to match the pkgname array.  What I want is to have the pkgname array get generated dynamically based on the code below which starts before the make command in the build section.  Advise is appreciated.  Is what I'm asking for possible?
    # Contributor: graysky <graysky AT archlinux dot us>
    # Contributor: Cray "MP2E" Elliott <MP2E { AT } archlinux.us>
    # Contributor: Tobias Powalowski <[email protected]>
    # Contributor: Thomas Baechler <[email protected]>
    # Patch and Build Options
    _BFQ_patches="n" # add BFQ patches
    _makemenucfg="n" # menuconfig option
    _streamline_="n" # run Steven Rostedt's streamline_config.pl script - see notes below!
    _use_current="n" # use the current kernel's .config file - see notes below!
    # More Details and References
    ## Note all kernels get the ck patch set - there is no option to enable/disable it!
    ## BFQ
    # read, http://algo.ing.unimo.it/people/paolo/disk_sched/
    ## MAKEMENUCONFIG OPTION
    # Allow you to select additional kernel options prior to a build via a menuconfig.
    ## STREAMLINE_CONFIG OPTION
    # Similar to a make localmodconfig but this actually works!
    # WARNING - make CERTAIN that all modules are modprobed BEFORE you begin making the pkg!
    # read, https://bbs.archlinux.org/viewtopic.php?pid=830221#p830221
    # to keep track of which modules are needed for your specific system/hardware, give my module_db script.
    # a try: http://aur.archlinux.org/packages.php?ID=41689
    # Not that if you use my script, this PKGBUILD will auto run the reload_data base for you to probe
    # all the modules you have logged!
    ## USE CURRENT KERNEL'S .CONFIG
    # Enabling this option will use the .config of the RUNNING kernel rather than the ARCH defaults.
    # Useful when the package gets updated and you already went through the trouble of customizing your
    # config options. NOT recommended when a new kernel is released, but again, convenient for package bumps.
    pkgname='kernel26-ck'
    #true && pkgname=("kernel26-ck" "kernel26-ck-headers")
    _basekernel=2.6.36
    pkgver=${_basekernel}.1
    pkgrel=4
    arch=('i686' 'x86_64')
    license=('GPL2')
    url="http://users.on.net/~ckolivas/kernel"
    _archpatchversion=3
    _ckpatchversion=2
    _kernelname=-ck
    _patchname="patch-${pkgver}-${_archpatchversion}-ARCH"
    _ckpatchname="patch-${_basekernel}-ck${_ckpatchversion}"
    _bfqpath="http://algo.ing.unimo.it/people/paolo/disk_sched/patches/2.6.36"
    source=(ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-$_basekernel.tar.bz2 # kernel source
    ftp://ftp.archlinux.org/other/kernel26/${_patchname}.bz2 # arch patchset
    config config.x86_64 kernel26.preset # configs
    # ck patchset
    http://www.kernel.org/pub/linux/kernel/people/ck/patches/2.6/${_basekernel}/${_basekernel}-ck${_ckpatchversion}/${_ckpatchname}.bz2
    # BFQ patches
    ${_bfqpath}/0001-bfq_iosched-block-prepare_IO_context_code-v1-2.6.36.patch
    ${_bfqpath}/0002-bfq_iosched-block-add-cgroups-kconfig-and-build-bits-for-BFQ-v1-2.6.36.patch
    ${_bfqpath}/0003-bfq_iosched-block-introduce_BFQ-v1-2.6.36.patch)
    build() {
    # Patch source with -ARCH patches
    # See http://projects.archlinux.org/linux-2.6-ARCH.git/
    msg "Patching source with-ARCH patches"
    cd ${srcdir}/linux-$_basekernel
    patch -Np1 -i ${srcdir}/${_patchname}
    # Patch source for BFQ patches
    if [ ${_BFQ_patches} = "y" ]; then
    msg "Patching source with BFQ patches"
    for p in $(ls ${srcdir}/*-bfq_*); do
    patch -Np1 -i $p
    done
    fi
    # Patch source with ck
    # Fix double name in EXTRAVERSION
    sed -i -re "s/^(.EXTRAVERSION).*$/\1 = /" ${srcdir}/${_ckpatchname}
    # Add -ck base patch set
    msg "Patching source with ck1 patch set"
    patch -Np1 -i ${srcdir}/${_ckpatchname}
    msg "Running make mrproper to clean source tree"
    make mrproper
    if [ "$CARCH" = "x86_64" ]; then
    cat ../config.x86_64 >./.config
    else
    cat ../config >./.config
    fi
    # use current kernel's config
    # code originally by nous; http://aur.archlinux.org/packages.php?ID=40191
    if [ ${_use_current} = "y" ]; then
    if [[ -s /proc/config.gz ]]; then
    msg "Extracting config from /proc/config.gz..."
    modprobe configs
    zcat /proc/config.gz > ./.config
    else
    warning "You kernel was not compiled with IKCONFIG_PROC!"
    warning "You cannot read the current config!"
    warning "Aborting!"
    exit 0
    fi
    fi
    if [ "${_kernelname}" != "" ]; then
    sed -i "s|CONFIG_LOCALVERSION=.*|CONFIG_LOCALVERSION=\"${_kernelname}\"|g" ./.config
    fi
    msg "Running make prepare for you to enable patched options of your choosing"
    make prepare
    # If user patched to BFQ and enabled it in the prev step, set it as default io scheduler
    if [ ${_BFQ_patches} = "y" ]; then
    sed -i s'/CONFIG_DEFAULT_CFQ=y/# CONFIG_DEFAULT_CFQ is not set/g' ./.config
    sed -i s'/# CONFIG_DEFAULT_BFQ is not set/CONFIG_DEFAULT_BFQ=y/g' ./.config
    sed -i s'/CONFIG_DEFAULT_IOSCHED="cfq"/CONFIG_DEFAULT_IOSCHED="bfq"/g' ./.config
    fi
    if [ $_streamline_ = "y" ]; then
    msg "If you have modprobe_db installed, running reload_database now"
    if [ -e /usr/bin/reload_database ]; then
    /usr/bin/reload_database
    fi
    msg "Running Steven Rostedt's streamline_config script now "
    chmod +x ./scripts/kconfig/streamline_config.pl
    ./scripts/kconfig/streamline_config.pl > config_strip
    cp config_strip .config
    msg "An error about ksource in line 118 blah blah is NORMAL as are the one you will get for each"
    msg "module you have probed that is not in the kernel itself like nvidia for example!"
    fi
    if [ $_makemenucfg = "y" ]; then
    msg "Running make menuconfig"
    make menuconfig
    fi
    # 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|M686=y" ./.config`
    CPU=`sed -e "s/CONFIG_M\(.*\)=y/\1/" <<<$CPU`
    case $CPU in
    CORE2)
    _pn="-core2"
    _pd=" Intel Core2 optimized."
    K8)
    _pn="-k8"
    _pd="AMD K8 optimized."
    PSC)
    _pn="-psc"
    _pd="Intel Pentium4/D/Xeon optimized."
    ATOM)
    _pn="-atom"
    _pd="Intel Atom optimized."
    K7)
    _pn="-k7"
    _pd="AMD K7 optimized."
    PENTIUMII)
    _pn="-p2"
    _pd="Intel Pentium2 optimized."
    PENTIUMIII)
    _pn="-p3"
    _pd="Intel Pentium3 optimized."
    PENTIUMM)
    _pn="-pm"
    _pd="Intel Pentium-M optimized."
    PENTIUM4)
    _pn="-p4"
    _pd="Intel Pentium4 optimized."
    default)
    esac
    # save to a file for reacall in subsequent sections
    echo "_pn=\"${_pn}\"" > vars
    echo "_pd=\"${_pd}\"" >> vars
    msg "Running make bzImage and modules"
    make bzImage modules
    package_kernel26-ck() {
    . ${srcdir}/linux-$_basekernel/vars
    pkgname="kernel26-ck${_pn}"
    pkgdesc="ARCH kernel with Con Kolivas' patchset using the Brain Fuck Scheduler (BFS). Budget Fair Queueing (BFQ) I/O scheduler optional.${_pd}"
    backup=(etc/mkinitcpio.d/kernel26.preset)
    depends=('coreutils' 'linux-firmware' 'module-init-tools' 'mkinitcpio>=0.5.20')
    install=kernel26.install
    optdepends=('crda: to set the correct wireless channels of your country' \
    'nvidia-ck-stable: NVIDIA drivers for kernel26-ck' \
    'nvidia-beta-ck: NVIDIA beta drivers for kernel26-ck' \
    'modprobed_db: Keeps track of EVERY kernel module that has ever been probed - useful for those of us who make localmodconfig')
    KARCH=x86
    cd ${srcdir}/linux-$_basekernel
    #get kernel version
    _kernver="$(make kernelrelease)"
    mkdir -p ${pkgdir}/{lib/modules,lib/firmware,boot}
    msg "Running make modules_install"
    make INSTALL_MOD_PATH=${pkgdir} modules_install
    cp System.map ${pkgdir}/boot/System.map26${_kernelname}
    cp arch/$KARCH/boot/bzImage ${pkgdir}/boot/vmlinuz26${_kernelname}
    # add vmlinux
    install -m644 -D vmlinux ${pkgdir}/usr/src/linux-${_kernver}/vmlinux
    # install fallback mkinitcpio.conf file and preset file for kernel
    install -m644 -D ${srcdir}/kernel26.preset ${pkgdir}/etc/mkinitcpio.d/${pkgname}.preset
    # set correct depmod command for install
    sed \
    -e "s/KERNEL_NAME=.*/KERNEL_NAME=${_kernelname}/g" \
    -e "s/KERNEL_VERSION=.*/KERNEL_VERSION=${_kernver}/g" \
    -i $startdir/kernel26.install
    sed \
    -e "s|source .*|source /etc/mkinitcpio.d/kernel26${_kernelname}.kver|g" \
    -e "s|default_image=.*|default_image=\"/boot/${pkgname}.img\"|g" \
    -e "s|fallback_image=.*|fallback_image=\"/boot/${pkgname}-fallback.img\"|g" \
    -i ${pkgdir}/etc/mkinitcpio.d/${pkgname}.preset
    echo -e "# DO NOT EDIT THIS FILE\nALL_kver='${_kernver}'" > ${pkgdir}/etc/mkinitcpio.d/${pkgname}.kver
    # remove build and source links
    rm -f ${pkgdir}/lib/modules/${_kernver}/{source,build}
    # remove the firmware
    rm -rf ${pkgdir}/lib/firmware
    package_kernel26-ck-headers () {
    . ${srcdir}/linux-$_basekernel/vars
    pkgname="kernel26-ck${_pn}-headers"
    pkgdesc="Header files and scripts to build modules for kernel26-ck.${_pd}"
    provides=("kernel26-ck${_pn}-headers=${pkgver}")
    mkdir -p ${pkgdir}/lib/modules/${_kernver}
    cd ${pkgdir}/lib/modules/${_kernver}
    ln -sf ../../../usr/src/linux-${_kernver} build
    cd ${srcdir}/linux-$_basekernel
    install -D -m644 Makefile \
    ${pkgdir}/usr/src/linux-${_kernver}/Makefile
    install -D -m644 kernel/Makefile \
    ${pkgdir}/usr/src/linux-${_kernver}/kernel/Makefile
    install -D -m644 .config \
    ${pkgdir}/usr/src/linux-${_kernver}/.config
    mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/include
    for i in acpi asm-generic config generated linux math-emu media net pcmcia scsi sound trace video; 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/
    # need to remove zc0301 from the array with 2.26.36
    for i in bt8xx cpia2 cx25840 cx88 em28xx et61x251 pwc saa7134 sn9c102 usbvideo; 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
    if [ -d ${srcdir}/linux-$_basekernel/include/config/dvb ]; then
    mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/include/config/dvb/
    cp include/config/dvb/*.h ${pkgdir}/usr/src/linux-${_kernver}/include/config/dvb/
    fi
    # add dvb headers for http://mcentral.de/hg/~mrec/em28xx-new
    # in reference to:
    # http://bugs.archlinux.org/task/13146
    mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/frontends/
    cp drivers/media/dvb/frontends/lgdt330x.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/frontends/
    cp drivers/media/video/msp3400-driver.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/frontends/
    # add dvb headers
    # in reference to:
    # http://bugs.archlinux.org/task/20402
    mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/dvb-usb
    cp drivers/media/dvb/dvb-usb/*.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/dvb-usb/
    mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/frontends
    cp drivers/media/dvb/frontends/*.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/frontends/
    mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/common/tuners
    cp drivers/media/common/tuners/*.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/common/tuners/
    # add xfs and shmem for aufs building
    mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/fs/xfs
    mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/mm
    cp fs/xfs/xfs_sb.h ${pkgdir}/usr/src/linux-${_kernver}/fs/xfs/xfs_sb.h
    # add headers 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 {} \;
    # 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}
    # Global pkgdesc and depends are here so that they will be picked up by AUR
    pkgdesc="ARCH kernel with Con Kolivas' patchset using the Brain Fuck Scheduler (BFS). Budget Fair Queueing (BFQ) I/O scheduler optional."
    depends=('coreutils' 'linux-firmware' 'module-init-tools' 'mkinitcpio>=0.5.20')
    sha256sums=('15a076d1a435a6bf8e92834eba4b390b4ec094ce06d47f89d071ca9e5788ce04'
    '96ed15bd64ae90163f81996ee31c3db6c7433d8af156e546ca7b36bedec1728b'
    '1b9abff4752d4a294716b05ae17b981e2e5aaae1b51d19613e6b4bac0aea989d'
    'd1b8757e99ee6cbeacf0b4185236c654440d5d945458b94948fd2cc4af0a881d'
    '7ead13bbe2fdfc5308ddc3a0484d66f8150f78bbdbc59643e0b52bb9e776b5da'
    '092e17164f453bdca8bd50e4fd71c074755740252bd8ad5c3eb6d2d51e78a104'
    'f5c42a2ec2869a756e53fabada51a25dcb9de13861f367463e9ec4da8bf0b86a'
    'f3f52953a2ccc07af3f23c7252e08e61580ec4b165934c089351ddd719c3e41f'
    'cca4eea16278e302c2f7649a145e4d5ceb5ff2ece25fea3988eca82290b0c633')
    Last edited by graysky (2010-11-24 20:09:31)

    Got it!
    Allan wrote:What about in the -headers package?
    Yep, headers package is good too!
    # Generated by makepkg 3.4.1
    # using fakeroot version 1.14.4
    # Wed Nov 24 23:06:36 UTC 2010
    pkgname = kernel26-ck-headers-core2
    pkgbase = kernel26-ck
    pkgver = 2.6.36.1-4
    pkgdesc = Header files and scripts to build modules for kernel26-ck. Intel Core2 optimized.
    url = http://users.on.net/~ckolivas/kernel
    builddate = 1290639996
    packager = Unknown Packager
    size = 31174656
    arch = x86_64
    license = GPL2
    depend = coreutils
    depend = linux-firmware
    depend = module-init-tools
    depend = mkinitcpio>=0.5.20
    provides = kernel26-ck-headers-core2=2.6.36.1
    makepkgopt = strip
    makepkgopt = docs
    makepkgopt = libtool
    makepkgopt = emptydirs
    makepkgopt = zipman
    makepkgopt = purge
    PKGBUILD built using the modified makepkg suggested by nous.
    # Contributor: graysky <graysky AT archlinux dot us>
    # Contributor: Cray "MP2E" Elliott <MP2E { AT } archlinux.us>
    # Contributor: Tobias Powalowski <[email protected]>
    # Contributor: Thomas Baechler <[email protected]>
    # Patch and Build Options
    _BFQ_patches="n" # add BFQ patches
    _makemenucfg="n" # menuconfig option
    _streamline_="n" # run Steven Rostedt's streamline_config.pl script - see notes below!
    _use_current="n" # use the current kernel's .config file - see notes below!
    # More Details and References
    ## Note all kernels get the ck patch set - there is no option to enable/disable it!
    ## BFQ
    # read, http://algo.ing.unimo.it/people/paolo/disk_sched/
    ## MAKEMENUCONFIG OPTION
    # Allow you to select additional kernel options prior to a build via a menuconfig.
    ## STREAMLINE_CONFIG OPTION
    # Similar to a make localmodconfig but this actually works!
    # WARNING - make CERTAIN that all modules are modprobed BEFORE you begin making the pkg!
    # read, https://bbs.archlinux.org/viewtopic.php?pid=830221#p830221
    # to keep track of which modules are needed for your specific system/hardware, give my module_db script.
    # a try: http://aur.archlinux.org/packages.php?ID=41689
    # Not that if you use my script, this PKGBUILD will auto run the reload_data base for you to probe
    # all the modules you have logged!
    ## USE CURRENT KERNEL'S .CONFIG
    # Enabling this option will use the .config of the RUNNING kernel rather than the ARCH defaults.
    # Useful when the package gets updated and you already went through the trouble of customizing your
    # config options. NOT recommended when a new kernel is released, but again, convenient for package bumps.
    pkgname='kernel26-ck'
    true && pkgname=("kernel26-ck" "kernel26-ck-headers")
    _basekernel=2.6.36
    pkgver=${_basekernel}.1
    pkgrel=4
    arch=('i686' 'x86_64')
    license=('GPL2')
    url="http://users.on.net/~ckolivas/kernel"
    _archpatchversion=3
    _ckpatchversion=2
    _kernelname=-ck
    _patchname="patch-${pkgver}-${_archpatchversion}-ARCH"
    _ckpatchname="patch-${_basekernel}-ck${_ckpatchversion}"
    _bfqpath="http://algo.ing.unimo.it/people/paolo/disk_sched/patches/2.6.36"
    source=(ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-$_basekernel.tar.bz2 # kernel source
    ftp://ftp.archlinux.org/other/kernel26/${_patchname}.bz2 # arch patchset
    config config.x86_64 kernel26.preset # configs
    # ck patchset
    http://www.kernel.org/pub/linux/kernel/people/ck/patches/2.6/${_basekernel}/${_basekernel}-ck${_ckpatchversion}/${_ckpatchname}.bz2
    # BFQ patches
    ${_bfqpath}/0001-bfq_iosched-block-prepare_IO_context_code-v1-2.6.36.patch
    ${_bfqpath}/0002-bfq_iosched-block-add-cgroups-kconfig-and-build-bits-for-BFQ-v1-2.6.36.patch
    ${_bfqpath}/0003-bfq_iosched-block-introduce_BFQ-v1-2.6.36.patch)
    build() {
    # Patch source with -ARCH patches
    # See http://projects.archlinux.org/linux-2.6-ARCH.git/
    msg "Patching source with-ARCH patches"
    cd ${srcdir}/linux-$_basekernel
    patch -Np1 -i ${srcdir}/${_patchname}
    # Patch source for BFQ patches
    if [ ${_BFQ_patches} = "y" ]; then
    msg "Patching source with BFQ patches"
    for p in $(ls ${srcdir}/*-bfq_*); do
    patch -Np1 -i $p
    done
    fi
    # Patch source with ck
    # Fix double name in EXTRAVERSION
    sed -i -re "s/^(.EXTRAVERSION).*$/\1 = /" ${srcdir}/${_ckpatchname}
    # Add -ck base patch set
    msg "Patching source with ck1 patch set"
    patch -Np1 -i ${srcdir}/${_ckpatchname}
    msg "Running make mrproper to clean source tree"
    make mrproper
    if [ "$CARCH" = "x86_64" ]; then
    cat ../config.x86_64 >./.config
    else
    cat ../config >./.config
    fi
    # use current kernel's config
    # code originally by nous; http://aur.archlinux.org/packages.php?ID=40191
    if [ ${_use_current} = "y" ]; then
    if [[ -s /proc/config.gz ]]; then
    msg "Extracting config from /proc/config.gz..."
    modprobe configs
    zcat /proc/config.gz > ./.config
    else
    warning "You kernel was not compiled with IKCONFIG_PROC!"
    warning "You cannot read the current config!"
    warning "Aborting!"
    exit 0
    fi
    fi
    if [ "${_kernelname}" != "" ]; then
    sed -i "s|CONFIG_LOCALVERSION=.*|CONFIG_LOCALVERSION=\"${_kernelname}\"|g" ./.config
    fi
    msg "Running make prepare for you to enable patched options of your choosing"
    make prepare
    # If user patched to BFQ and enabled it in the prev step, set it as default io scheduler
    if [ ${_BFQ_patches} = "y" ]; then
    sed -i s'/CONFIG_DEFAULT_CFQ=y/# CONFIG_DEFAULT_CFQ is not set/g' ./.config
    sed -i s'/# CONFIG_DEFAULT_BFQ is not set/CONFIG_DEFAULT_BFQ=y/g' ./.config
    sed -i s'/CONFIG_DEFAULT_IOSCHED="cfq"/CONFIG_DEFAULT_IOSCHED="bfq"/g' ./.config
    fi
    if [ $_streamline_ = "y" ]; then
    msg "If you have modprobe_db installed, running reload_database now"
    if [ -e /usr/bin/reload_database ]; then
    /usr/bin/reload_database
    fi
    msg "Running Steven Rostedt's streamline_config script now "
    chmod +x ./scripts/kconfig/streamline_config.pl
    ./scripts/kconfig/streamline_config.pl > config_strip
    cp config_strip .config
    msg "An error about ksource in line 118 blah blah is NORMAL as are the one you will get for each"
    msg "module you have probed that is not in the kernel itself like nvidia for example!"
    fi
    if [ $_makemenucfg = "y" ]; then
    msg "Running make menuconfig"
    make menuconfig
    fi
    # This allows building cpu-optimized packages with according package names.
    # Useful for repo maintainers.
    # Code by nous.
    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|M686=y" ./.config`
    CPU=`sed -e "s/CONFIG_M\(.*\)=y/\1/" <<<$CPU`
    case $CPU in
    CORE2)
    _pn="-core2"
    _pd=" Intel Core2 optimized."
    K8)
    _pn="-k8"
    _pd="AMD K8 optimized."
    PSC)
    _pn="-psc"
    _pd="Intel Pentium4/D/Xeon optimized."
    ATOM)
    _pn="-atom"
    _pd="Intel Atom optimized."
    K7)
    _pn="-k7"
    _pd="AMD K7 optimized."
    PENTIUMII)
    _pn="-p2"
    _pd="Intel Pentium2 optimized."
    PENTIUMIII)
    _pn="-p3"
    _pd="Intel Pentium3 optimized."
    PENTIUMM)
    _pn="-pm"
    _pd="Intel Pentium-M optimized."
    PENTIUM4)
    _pn="-p4"
    _pd="Intel Pentium4 optimized."
    default)
    esac
    # save to a file for reacall in subsequent sections
    echo "_pn=\"${_pn}\"" > vars
    echo "_pd=\"${_pd}\"" >> vars
    msg "Running make bzImage and modules"
    make bzImage modules
    package_kernel26-ck() {
    . ${srcdir}/linux-$_basekernel/vars
    pkgname="kernel26-ck${_pn}"
    pkgdesc="ARCH kernel with Con Kolivas' patchset using the Brain Fuck Scheduler (BFS). Budget Fair Queueing (BFQ) I/O scheduler optional.${_pd}"
    backup=(etc/mkinitcpio.d/kernel26.preset)
    depends=('coreutils' 'linux-firmware' 'module-init-tools' 'mkinitcpio>=0.5.20')
    install=kernel26.install
    optdepends=('crda: to set the correct wireless channels of your country' \
    'nvidia-ck-stable: NVIDIA drivers for kernel26-ck' \
    'nvidia-beta-ck: NVIDIA beta drivers for kernel26-ck' \
    'modprobed_db: Keeps track of EVERY kernel module that has ever been probed - useful for those of us who make localmodconfig')
    KARCH=x86
    cd ${srcdir}/linux-$_basekernel
    #get kernel version
    _kernver="$(make kernelrelease)"
    mkdir -p ${pkgdir}/{lib/modules,lib/firmware,boot}
    msg "Running make modules_install"
    make INSTALL_MOD_PATH=${pkgdir} modules_install
    cp System.map ${pkgdir}/boot/System.map26${_kernelname}
    cp arch/$KARCH/boot/bzImage ${pkgdir}/boot/vmlinuz26${_kernelname}
    # add vmlinux
    install -m644 -D vmlinux ${pkgdir}/usr/src/linux-${_kernver}/vmlinux
    # install fallback mkinitcpio.conf file and preset file for kernel
    install -m644 -D ${srcdir}/kernel26.preset ${pkgdir}/etc/mkinitcpio.d/${pkgname}.preset
    # set correct depmod command for install
    sed \
    -e "s/KERNEL_NAME=.*/KERNEL_NAME=${_kernelname}/g" \
    -e "s/KERNEL_VERSION=.*/KERNEL_VERSION=${_kernver}/g" \
    -i $startdir/kernel26.install
    sed \
    -e "s|source .*|source /etc/mkinitcpio.d/kernel26${_kernelname}.kver|g" \
    -e "s|default_image=.*|default_image=\"/boot/${pkgname}.img\"|g" \
    -e "s|fallback_image=.*|fallback_image=\"/boot/${pkgname}-fallback.img\"|g" \
    -i ${pkgdir}/etc/mkinitcpio.d/${pkgname}.preset
    echo -e "# DO NOT EDIT THIS FILE\nALL_kver='${_kernver}'" > ${pkgdir}/etc/mkinitcpio.d/${pkgname}.kver
    # remove build and source links
    rm -f ${pkgdir}/lib/modules/${_kernver}/{source,build}
    # remove the firmware
    rm -rf ${pkgdir}/lib/firmware
    package_kernel26-ck-headers () {
    . ${srcdir}/linux-$_basekernel/vars
    pkgname="kernel26-ck-headers${_pn}"
    pkgdesc="Header files and scripts to build modules for kernel26-ck.${_pd}"
    provides=("kernel26-ck-headers${_pn}=${pkgver}")
    mkdir -p ${pkgdir}/lib/modules/${_kernver}
    cd ${pkgdir}/lib/modules/${_kernver}
    ln -sf ../../../usr/src/linux-${_kernver} build
    cd ${srcdir}/linux-$_basekernel
    install -D -m644 Makefile \
    ${pkgdir}/usr/src/linux-${_kernver}/Makefile
    install -D -m644 kernel/Makefile \
    ${pkgdir}/usr/src/linux-${_kernver}/kernel/Makefile
    install -D -m644 .config \
    ${pkgdir}/usr/src/linux-${_kernver}/.config
    mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/include
    for i in acpi asm-generic config generated linux math-emu media net pcmcia scsi sound trace video; 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/
    # need to remove zc0301 from the array with 2.26.36
    for i in bt8xx cpia2 cx25840 cx88 em28xx et61x251 pwc saa7134 sn9c102 usbvideo; 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
    if [ -d ${srcdir}/linux-$_basekernel/include/config/dvb ]; then
    mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/include/config/dvb/
    cp include/config/dvb/*.h ${pkgdir}/usr/src/linux-${_kernver}/include/config/dvb/
    fi
    # add dvb headers for http://mcentral.de/hg/~mrec/em28xx-new
    # in reference to:
    # http://bugs.archlinux.org/task/13146
    mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/frontends/
    cp drivers/media/dvb/frontends/lgdt330x.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/frontends/
    cp drivers/media/video/msp3400-driver.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/frontends/
    # add dvb headers
    # in reference to:
    # http://bugs.archlinux.org/task/20402
    mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/dvb-usb
    cp drivers/media/dvb/dvb-usb/*.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/dvb-usb/
    mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/frontends
    cp drivers/media/dvb/frontends/*.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/frontends/
    mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/common/tuners
    cp drivers/media/common/tuners/*.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/common/tuners/
    # add xfs and shmem for aufs building
    mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/fs/xfs
    mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/mm
    cp fs/xfs/xfs_sb.h ${pkgdir}/usr/src/linux-${_kernver}/fs/xfs/xfs_sb.h
    # add headers 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 {} \;
    # 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}
    # Global pkgdesc and depends are here so that they will be picked up by AUR
    pkgdesc="ARCH kernel with Con Kolivas' patchset using the Brain Fuck Scheduler (BFS). Budget Fair Queueing (BFQ) I/O scheduler optional."
    depends=('coreutils' 'linux-firmware' 'module-init-tools' 'mkinitcpio>=0.5.20')
    sha256sums=('15a076d1a435a6bf8e92834eba4b390b4ec094ce06d47f89d071ca9e5788ce04'
    '96ed15bd64ae90163f81996ee31c3db6c7433d8af156e546ca7b36bedec1728b'
    '1b9abff4752d4a294716b05ae17b981e2e5aaae1b51d19613e6b4bac0aea989d'
    'd1b8757e99ee6cbeacf0b4185236c654440d5d945458b94948fd2cc4af0a881d'
    '7ead13bbe2fdfc5308ddc3a0484d66f8150f78bbdbc59643e0b52bb9e776b5da'
    '092e17164f453bdca8bd50e4fd71c074755740252bd8ad5c3eb6d2d51e78a104'
    'f5c42a2ec2869a756e53fabada51a25dcb9de13861f367463e9ec4da8bf0b86a'
    'f3f52953a2ccc07af3f23c7252e08e61580ec4b165934c089351ddd719c3e41f'
    'cca4eea16278e302c2f7649a145e4d5ceb5ff2ece25fea3988eca82290b0c633')
    @Allan - can you see any other potential down sides of implementing the patch suggested by nous?  What about dependency issues?  For example, nvidia-ck depends on kernel26-ck, not kernel26-ck-core2.  Perhaps circumvent this with a provides=('kernel26-ck-headers') for headers and provides=('kernel26-ck') for the main package?
    Last edited by graysky (2010-11-24 23:08:02)

  • Makepkg split package question.

    I was making today a custom kernel using the kernel26 PKGBUILD file. This files creates three (3) packages. kernel26, kernel26-headers, kernel26-firmware. While packaging kernel26-headers the power went down. I started again with makepkg but it complained for the presence of the packet kernel26-xxxxx.pkg.tar.gz and suggested -f option to build the package again. Is this behavior "correct"? kernel26-xxxxx.pkg.tar.gz was successfully builded before the power loss. Is there an option for makepkg to build the remaining packages?

    Allan wrote:Given the build was completed, "makepkg -Rf" will just repackage all packages.
    I read man makepkg at least 3 times. I can swear the -R wasn't there before... :P:P
    -R, --repackage
    Repackage contents of the package without rebuilding the package. This is useful if you forgot a depend or install file in your PKGBUILD
    and the build itself will not change.
    I think that I should go to sleep right now...
    Thanks you Alan.

Maybe you are looking for

  • ASA5510 VPN not working after upgrade from 8.2 to 8.3

    Hi, I have recently upgraded a customer ASA5510 to version 8.3. After upgrade web access etc is working fine however VPN is down. The config looks very different after the upgrade plus what looks to be duplicate entries. I suspect its an access list

  • Problem creating physical Standby database with RMAN

    Hi All I am trying to learn oracle dataguard and as part of the process learning creating standby database. Platform : Sun-Fire-V250 Sparc, Solaris 10 Database Version - Oracle 11R2 I am creating standby database on same server, so directory structur

  • XML to CSV using SAX Parser

    Hello I need to convert xml files to csv format using SAX Parser. The following code & outputs are as below: XML file: <Library> <Book>      <Title>Professional JINI</Title>      <Author>bs</Author>      <Publisher>Oreilly Publications</Publisher> </

  • Lenovo tablet A3000 doesn't charge as it powered on

    Hello Please I have the following strange problem with my A3000 tablet, recently as I try to cahrge the tablet while it is powered on I got the charge mark on the battery for few seconds and then it disappear and the tablet of course doesn't charge.

  • Photoshop 2014 painfully slow?

    So I've searched around and seen solutions such as 'update to most recent version', 'disabling smart guides' and ways on getting back the previous CC version of Photoshop. Updated to most recent version today, and began using for the first time.  Slo