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

Similar Messages

  • [SOLVED] .AURINFO and makepkg --source

    The documentation suggests that one use
    makepkg --source
    to build source packages for AUR, but also states that one should include a .AURINFO file.
    See Arch User Repository and Arch Packaging Standards
    I made a .AURINFO file by hand and placed it in the same directory as PKGBUILD, but the problem is that makepkg --source doesn't pick it up and include it in the src .tgz file.
    It doesn't seem like makepkg --source is doing much more than putting PKGBUILD in a compressed tarball.  I can create such a tarball by hand myself, but am wondering if I'm missing something?  In any case, the documentation appears to be inconsistent.
    AUR Metadata suggests using mkaurball as a wrapper for makepkg --source.  That seems like overkill for the package I'm trying to put in AUR.  I'd rather keep it simple (in accord with the Arch philosophy) whenever possible.
    Last edited by pgoetz (2014-04-03 16:14:06)

    progandy wrote:
    You could add the file in a custom script with something like this:
    bsdtar -cf example-1.2.3-1.aur.src.tar.gz example/.AURINFO @example-1.2.3-1.src.tar.gz
    This is probably worth documenting in the AUR and AUR Metadata Wiki pages -- I'll do that now.
    EDIT:  So, there are some problems with this approach that were discussed outside the forum.  You can make this work (i.e. using bsdtar to add .AURINFO to the source tarball), but you have to be very careful about the file locations when you're executing something like the command above, else the .AURINFO file won't untar into the same directory as the PKGBUILD file.
    See the AUR Metadata Wiki page for details on how get .AURINFO into your source package.
    Last edited by pgoetz (2014-04-05 08:43:12)

  • [SOLVED]can't compile from aur

    /usr/bin/ld: main.o: undefined reference to symbol 'XPending'
    /usr/bin/ld: note: 'XPending' is defined in DSO /usr/lib/libX11.so.6 so try adding it to the linker command line
    /usr/lib/libX11.so.6: could not read symbols: Invalid operation
    collect2: error: ld returned 1 exit status
    make: *** [netwmpager] error 1
    Last edited by nevliv (2012-05-30 01:56:33)

    Yup, not quite the same problem.  It's an entirely independent problem with a related root cause: old/faulty PKGBUILDS.
    Terminator is correct about the general solution, but note the sed line will have to be modified more than that.  The above sed line was specific to the netwmpager Makefile.  The extcalc Makefile will not have the same linker line so the sed context will not match.
    For one-of fixes, it's probably easier to manually edit the Makefile.  Once you find an edit that works, it can be made into a sed line [and reported to the package maintainer] so they can add it to the PKGBUILD in the AUR, so other users can benefit from your fix.
    Just to stress that last point - please make sure  you are reporting these problems and the fixes on the AUR page of the package.
    EDIT: I just looked at extcalc.  It uses cmake.  I'm not remotely familiar with cmake, so the exact solution for this package may be very different.
    Last edited by Trilby (2012-05-29 13:02:02)

  • How i can solve the facetime issue? I cant find it in apple store !!!!! Plaese advice me ..., iphone 5, How i can solve the facetime issue? I cant find it in apple store !!!!! Plaese advice me ..., iphone 5

    How i can solve the facetime issue? I cant find it in apple store !!!!! Plaese advice me ..., iphone 5, How i can solve the facetime issue? I cant find it in apple store !!!!! Plaese advice me ..., iphone 5

    Facetime is not in the App store. It is part of the iOS. You access Facetime on the phone via the contact section. Facetime needs to be activated in Settings. The only reason you may not have it is if you purchased the device in an area where Facetime is prohibited by law.

  • [SOLVED]openstudio is a new AUR package, requesting review of PKGBUILD

    Hi,
    I have been working on a simple desktop environment for Arch Linux, called OpenStudio.se . This is the first time I have made a PKGBUILD and it would be great if anyone with some more experience could help me verify that the PKGBUILD is correct. I have tested it on both x86_64 and x86 systems and it works well and the package installs correctly with pacman.
    If you want to check out the desktop environment, visit www.openstudio.se
    BR
    Mikael
    Here is my PKGBUILD :
    # Maintainer: Mikael Nordvall <[email protected]>
    pkgname=openstudio
    pkgver=0.4
    pkgrel=1
    pkgdesc="Scripts to install and configure a simple, lightweight desktop environment for Arch Linux"
    arch=(any)
    url="http://www.openstudio.se/de/"
    license=('GPL3')
    source=(http://www.openstudio.se/de/source/$pkgname.tar.gz)
    md5sums=('dc085cf28b74a541833a680603fa85be') #generate with 'makepkg -g'
    package() {
    mkdir $pkgdir/etc
    mkdir $pkgdir/etc/openstudio
    mkdir $pkgdir/usr
    mkdir $pkgdir/usr/bin
    mkdir $pkgdir/usr/share
    mkdir $pkgdir/usr/share/man
    mkdir $pkgdir/usr/share/man/man1
    cp -r $srcdir/$pkgname $pkgdir/usr/share/
    cd $pkgdir/usr/share/$pkgname/
    cp ./scripts/openstudio $pkgdir/usr/bin/
    cp ./library/manpage/openstudio.1.gz $pkgdir/usr/share/man/man1/
    Last edited by zkeng (2011-10-09 10:27:25)

    Thank you very much for the input Stefan. I will update the PKGBUILD according to your suggestions.
    About the empty dir /etc/openstudio
    The openstudio package contains a system configure script. When executed this script will set-up some global config files (shared for all users) in this dir. The reason why I created it already during installation is because I do want it to be removed if you decide to remove the openstudio package. The reason why it is empty at the beginning is because I do not want to over-write its content when openstudio package is upgraded.
    Maybe there is another standard way of solving this kind of issue, but to avoid the error you mentioned about an empty dir I made sure an info file is copied to the dir during install.
    New PKGBUILD (with new md5sum) :
    # Maintainer: Mikael Nordvall <[email protected]>
    pkgname=openstudio
    pkgver=0.4
    pkgrel=1
    pkgdesc="Scripts to install and configure a simple, lightweight desktop environment for Arch Linux"
    arch=(any)
    url="http://www.openstudio.se/de/"
    license=('GPL3')
    source=(http://www.openstudio.se/de/source/$pkgname.tar.gz)
    md5sums=('4f9dec211a1b082d91251fa0e73810db') #generate with 'makepkg -g'
    package() {
    install -d $pkgdir/usr/share
    cp -r $srcdir/$pkgname $pkgdir/usr/share/
    cd $pkgdir/usr/share/$pkgname/
    install -Dm755 ./scripts/$pkgname $pkgdir/usr/bin/$pkgname
    install -Dm644 ./library/config/readme_etc_$pkgname \
    $pkgdir/etc/$pkgname/readme_etc_$pkgname
    install -Dm644 ./library/manpage/$pkgname.1.gz \
    $pkgdir/usr/share/man/man1/$pkgname.1.gz
    Last edited by zkeng (2011-10-08 18:48:59)

  • [REQUEST - READY FOR SUBMISSION TO AUR] Critique my smlnj PKGBUILD

    The existing SML-NJ compiler package, 'smlnj', is out-dated and no maintainer info was given.  So I created my own PKGBUILD.  My version seems easier to maintain.  The smlnj source code comes with a build script;  so I use it.  The previous unknown packager chose to basically rewrite the build script in the PKGFILE.  My version of the PKGFILE builds fine - in fact, I used it to compile a larger piece of software (openmodelica).  I checked my package and PKGBUILD with namcap and I have a few questions:
    Output from namcap:
    smlnj E: File (usr/lib32/smlnj/lib/smlnj/cm/.cm/x86-unix/cm.cm) is owned by 501:utmp
    smlnj E: File (usr/lib32/smlnj/lib/smlnj/cm/.cm/x86-unix/tools.cm) is owned by 501:utmp
    smlnj E: File (usr/lib32/smlnj/lib/smlnj/basis/.cm/x86-unix/basis.cm) is owned by 501:utmp
    smlnj E: File (usr/lib32/smlnj/lib/smlnj/MLRISC/.cm/x86-unix/ALPHA.cm) is owned by 501:utmp
    smlnj E: File (usr/lib32/smlnj/lib/smlnj/MLRISC/.cm/x86-unix/AMD64.cm) is owned by 501:utmp
    smlnj E: File (usr/lib32/smlnj/lib/smlnj/MLRISC/.cm/x86-unix/Control.cm) is owned by 501:utmp
    smlnj E: File (usr/lib32/smlnj/lib/smlnj/MLRISC/.cm/x86-unix/Graphs.cm) is owned by 501:utmp
    smlnj E: File (usr/lib32/smlnj/lib/smlnj/MLRISC/.cm/x86-unix/HPPA.cm) is owned by 501:utmp
    Many files have the permissions listed above.  I never altered any permissions.  Any recommendations?
    SMLNJ is a 32-bit program so I changed the install directory to /usr/lib32/smlnj on 64-bit systems and left it at /usr/lib/smlnj on 32-bit systems.  Is this appropriate?
    If it looks like I made a mistake installing SML-NJ where I did: SML-NJ expects to be installed to /where_ever_you_specify/lib/smlnj/{bin,lib} with SMLNJ_HOME=/where_ever_you_specify/lib/smlnj/bin.  That is why the directory structure is laid out like you see above.
    I have code in the PKGBUILD that sets different options based on '$CARCH'.  I test for 'i686' or 'x86_64'.  Should I also test for 'any' and just assume that means 'x86_64' ?
    Here is a copy of the PKGBUILD.  I've only tested it on a 64-bit system.
    # Previous Maintainer: Casper the Friendly Ghost
    # Maintainer: Chris Pemberton <[email protected]>
    pkgname=smlnj
    pkgver=110.74
    pkgrel=1
    pkgdesc="Standard ML of New Jersey is a compiler for the Standard ML '97 programming language"
    arch=(i686 x86_64)
    if test "$CARCH" == i686; then
    LIBn=lib
    fi
    if test "$CARCH" == x86_64; then
    msg ""
    msg "~~~~~~~~~~~~~~~~~~~~~~~~~ N O T I C E ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
    msg ""
    msg "SML-NJ is 32-bit only and must self-compile in a 32-bit environment"
    msg ""
    msg "~~~~~~~~~~~~~~~~~~~~~~~~~ N O T I C E ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
    msg ""
    sleep 4
    makedepends=('gcc-multilib')
    depends=('lib32-glibc')
    LIBn=lib32
    fi
    url="http://www.smlnj.org/"
    license=("BSD")
    groups=()
    checkdepends=()
    optdepends=()
    provides=('sml')
    conflicts=()
    replaces=()
    backup=()
    options=(!makeflags) # multi-threaded make breaks the build
    source=(http://smlnj.cs.uchicago.edu/dist/working/$pkgver/config.tgz)
    md5sums=('9c4f80eb53240b583eb96d8f8c556cf8') # re-generate with makepkg -g >> PKGBUILD
    build() {
    SMLNJ_DEST="$pkgdir/usr/$LIBn/smlnj"
    SMLNJ_REALDEST="/usr/$LIBn/smlnj"
    unset SMLNJ_HOME
    mkdir -p $SMLNJ_DEST
    cd $srcdir
    ./config/install.sh
    cp -Rp bin $SMLNJ_DEST
    cp -Rp lib $SMLNJ_DEST
    mkdir -p $pkgdir/etc/profile.d
    echo -e "export SMLNJ_HOME=/usr/$LIBn/smlnj \nexport PATH=\$PATH:/usr/$LIBn/smlnj/bin" > $pkgdir/etc/profile.d/smlnj.sh
    chmod +x $pkgdir/etc/profile.d/smlnj.sh
    msg ""
    msg "~~~~~~~~~~~~~~~~~~~~~~~~~ N O T I C E ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
    msg ""
    msg " The SML-NJ executables are NOT installed in /usr/bin"
    msg ""
    msg " You MUST define SMLNJ_HOME"
    msg ""
    msg " (ie: 'WARNING: Package contains reference to \$srcdir' message)"
    msg ""
    msg " '/etc/profile.d/smlnj.sh' will update your PATH and set SMLNJ_HOME"
    msg ""
    msg "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
    msg ""
    sleep 4
    Last edited by cjpembo (2012-02-28 23:06:00)

    I like this PKGBUILD; it's something I'd like to see in the AUR as a replacement for the current one.
    cjpembo wrote: msg "~~~~~~~~~~~~~~~~~~~~~~~~~ N O T I C E ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
    msg ""
    msg "SML-NJ is 32-bit only and must self-compile in a 32-bit environment"
    msg ""
    msg " Packages from the 'multilib' repo are required"
    msg ""
    msg " 'multilib' repo is enabled via '/etc/pacman.conf' "
    msg ""
    msg "~~~~~~~~~~~~~~~~~~~~~~~~~ N O T I C E ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
    This was a really valuable hint, I'm glad you added it!
    cjpembo wrote:provides=('sml')
    This also provides: heap2exec, ml-build, ml-lex, ml-nlffigen, ml-yacc, ml-antlr, ml-burg, ml-makedepend, ml-ulex.
    cjpembo wrote:options=(!makeflags) # multi-threaded make breaks the build
    Why disable all makeflags, rather than specifically disabling parallel builds?
    options=()
    MAKEFLAGS="$MAKEFLAGS -j1"
    cjpembo wrote:source=(http://smlnj.cs.uchicago.edu/dist/working/$pkgver/config.tgz)
    I think that fetching just config.tgz works for now, but because 'config/install.sh' fetches additional files it doesn't work well with (i) mirrors (ii) verifying md5sums (iii) (eventual) package-signing. Not a big deal now, but something that may come up when trying to get a TU to put it in 'community'.
    cjpembo wrote: SMLNJ_DEST="$pkgdir/usr/$_LIBn/smlnj"
    SMLNJ_REALDEST="/usr/$_LIBn/smlnj"
    unset SMLNJ_HOME
    mkdir -p $SMLNJ_DEST
    cd $srcdir
    ./config/install.sh
    cp -Rp bin $SMLNJ_DEST
    cp -Rp lib $SMLNJ_DEST
    mkdir -p $pkgdir/etc/profile.d
    echo -e "export SMLNJ_HOME=/usr/$_LIBn/smlnj \nexport PATH=\$PATH:/usr/$_LIBn/smlnj/bin" > $pkgdir/etc/profile.d/smlnj.sh
    chmod +x $pkgdir/etc/profile.d/smlnj.sh
    msg ""
    msg "~~~~~~~~~~~~~~~~~~~~~~~~~ N O T I C E ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
    msg ""
    msg " The SML-NJ executables are NOT installed in /usr/bin"
    msg ""
    msg " You MUST define SMLNJ_HOME"
    msg ""
    msg " (ie: 'WARNING: Package contains reference to \$srcdir' message)"
    msg ""
    msg " '/etc/profile.d/smlnj.sh' will update your PATH and set SMLNJ_HOME"
    msg ""
    msg "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
    msg ""
    sleep 4
    I like to avoid altering my global configuration and environmental variables when installing a package. Unfortunately, it looks like SML/NJ really depends on the structure created by their 'config/install.sh' script.
    One way to work around this to write a small shell script that's shared between all of the executables, which sets SMLNJ_HOME. So that after installation /usr/bin looks like this:
    /usr/bin $ for NAME in /path/to/smlnj/bin/*;do ls -l $NAME; done
    sml: symbolic link to `smlnj-wrapper'
    heap2exec: symbolic link to `smlnj-wrapper'
    ml-build: symbolic link to `smlnj-wrapper'
    ml-lex: symbolic link to `smlnj-wrapper'
    ml-nlffigen: symbolic link to `smlnj-wrapper'
    ml-yacc: symbolic link to `smlnj-wrapper'
    ml-antlr: symbolic link to `smlnj-wrapper'
    ml-burg: symbolic link to `smlnj-wrapper'
    ml-makedepend: symbolic link to `smlnj-wrapper'
    ml-ulex: symbolic link to `smlnj-wrapper'
    /usr/bin $ cat smlnj-wrapper
    #!/bin/sh
    SMLNJ_HOME=/path/to/smlnj /path/to/smlnj/bin/$(basename $0) $*
    It makes the PKGBUILD more complicated, but keeps SML/NJ's configuration from leaking out and doesn't require extra steps from the users. I'm curious how others feel about this approach.
    Thanks for your contribution!

  • [SOLVED] Saving PKGBUILDs with makepkg or AUR helpers

    Hi all,
    I am trying to save automatically the package PKGBUILD when I install a package with an aur helper. I use packer and aurget.
    I modified makepkg.conf and set this relevant variables:
    # PACKAGE OUTPUT
    # Default: put built package and cached source in build directory
    #-- Destination: specify a fixed directory where all packages will be placed
    #PKGDEST=/home/packages
    PKGDEST=/var/cache/pacman/pkg/aur
    #-- Source cache: specify a fixed directory where source files will be cached
    #SRCDEST=/home/sources
    SRCDEST=/var/cache/pacman/pkg/aur/src
    The PKGDEST works fine and packages are saved in the specified path.
    However SRCDEST variable doesn't seem to work, as I expected the PKBUILDs and other sources to be saved there, but there are no files in the path.
    In the end what I am trying to emulate is something similar to ABS but for installed packages from AUR.
    Last edited by adrianbs (2012-01-29 12:18:41)

    adrianbs wrote:
    jasonwryan wrote:
    Cower (as awesome as it is) doesn't open the PKGBUILD in vim, build the package and then ask if you want to keep the build directory.
    I reckon my 10 lines are pretty well spent...
    Cower doesn't but pacaur (which wraps it) does
    It has an option it the config file to keep the build dir.
    And for only an extra 872 lines of code...

  • [SOLVED] EurKEY PKGBUILD request for comments

    Hi, I just finished a PKGBUILD for EurKEY "European Keyboard Layout". It installs and removes fine on my system, and I took care to respect the packaging standards, but before submitting it to AUR I would like to get any comments/suggestions.
    PKGBUILD
    # Maintainer: Christoph Roeper <cr (at) roeper (dot) biz>
    pkgname=eurkey
    pkgver=1.1
    pkgrel=1
    pkgdesc="The European Keyboard Layout"
    arch=('any')
    url="http://eurkey.steffen.bruentjen.eu/"
    license=('GPL3')
    depends=('xkeyboard-config' 'sed' 'gawk')
    install="$pkgname.install"
    source=(http://eurkey.steffen.bruentjen.eu/download/debian/binary/eurkey.deb)
    md5sums=('8da8472f8f8d30baaa6a50145264024b')
    package() {
    cd "$srcdir"
    ar x $pkgname.deb
    tar xzf data.tar.gz -C "$pkgdir/"
    cd "${pkgdir}"
    # euro on '5', swap with pound
    awk='\
    BEGIN { fix = 0 } \
    if ( $2 == "<AE04>" ) { $7="sterling,"; fix = 1 } \
    else if ( $2 == "<AE05>" ) { $7="EuroSign,"; fix = 1 } \
    if ( fix == 1 ) { printf "%11s %s %s %s%16s%19s%22s%21s %s %s\n",$1,$2,$3,$4,$5,$6,$7,$8,$9,$10; fix = 0 } \
    else { print } \
    file="usr/share/X11/xkb/symbols/eurkey"
    tmpfile="$file".`date +%FT%T`.temp
    awk -- "$awk" $file > $tmpfile
    cat $tmpfile > $file
    rm $tmpfile
    pkgname.install
    post_install() {
    # Installs the EurKEY layout.
    if test "$EUID" = 0; then SUDO=; else SUDO=sudo; fi
    exec $SUDO bash /dev/stdin "$@" <<'ENDSUDO'
    set -e
    str=" <layout>\n\
    <configItem>\n\
    <name>eurkey</name>\n\
    <shortDescription>EUR</shortDescription>\n\
    <description>EurKEY</description>\n\
    <languageList>\n\
    <iso639Id>cat</iso639Id>\n\
    <iso639Id>dan</iso639Id>\n\
    <iso639Id>eng</iso639Id>\n\
    <iso639Id>est</iso639Id>\n\
    <iso639Id>fao</iso639Id>\n\
    <iso639Id>fin</iso639Id>\n\
    <iso639Id>ger</iso639Id>\n\
    <iso639Id>gre</iso639Id>\n\
    <iso639Id>gsw</iso639Id>\n\
    <iso639Id>ita</iso639Id>\n\
    <iso639Id>lav</iso639Id>\n\
    <iso639Id>lit</iso639Id>\n\
    <iso639Id>nld</iso639Id>\n\
    <iso639Id>nor</iso639Id>\n\
    <iso639Id>por</iso639Id>\n\
    <iso639Id>spa</iso639Id>\n\
    <iso639Id>swe</iso639Id>\n\
    </languageList>\n\
    </configItem>\n\
    </layout>\n\
    </layoutList>"
    for file in /usr/share/X11/xkb/rules/{base,evdev}.xml; do
    if [ ! -f "$file" ]; then
    echo "File $file is not a regular file (skipped)"
    elif [ $(grep -ci eurkey "$file") -ne 0 ]; then
    echo "File $file already constains eurkey (skipped)"
    else
    echo "processing $file"
    sed -i "s~</layoutList>~$str~" "$file"
    fi
    done
    ENDSUDO
    pre_remove() {
    # Removes the EurKEY layout.
    if test "$EUID" = 0; then SUDO=; else SUDO=sudo; fi
    exec $SUDO bash /dev/stdin "$@" <<'ENDSUDO'
    set -e
    for file in {/etc/vconsole.conf,/etc/X11/xorg.conf.d/*keyboard*}; do
    if [ -f $file ]; then
    [ `grep -ci '^\s*[^#].*eurkey' $file` -ne 0 ] && echo -e "Cannot completely remove EurKEY since it's still configured in $file.\nPlease remove it manually or use the settings manager." && exit 1
    fi
    done
    exit 0
    ENDSUDO
    post_remove() {
    # Removes the EurKEY layout.
    if test "$EUID" = 0; then SUDO=; else SUDO=sudo; fi
    exec $SUDO bash /dev/stdin "$@" <<'ENDSUDO'
    set -e
    awk='
    BEGIN { output = 1 ; buffer = "" }
    $0~/<layout>/ { output = 0 ; deleteSection = 0 }
    output == 1 { print $0 }
    $0~/<\/layout>/ { output = 1 ; buffer = buffer $0 ; if (deleteSection == 0) print buffer ; buffer = "" }
    $0~/<name>eurkey<\/name>/ { deleteSection = 1 }
    output == 0 { buffer = buffer $0 "\n" }
    for file in /usr/share/X11/xkb/rules/{base,evdev}.xml; do
    if test -f "$file"; then
    tmpfile="$file".`date +%FT%T`.temp
    echo "processing $file"
    awk -- "$awk" $file > $tmpfile
    cat $tmpfile > $file
    rm $tmpfile
    fi
    done
    ENDSUDO
    'sed' and 'awk' are neither build nor run-time dependencies, both are install dependencies, but I did not find a proper option for that.
    The (un-)install-scripts are taken from the Debian source, however with deb-packages it is obviously possible to abort  pre/post_remove on failure (here used if the keyboard layout is still in use => no uninstall). I did not find a proper way to accomplish this with PKGBUILD install scripts.
    Both scripts a rather long, but in other review requests forum veterans preferred to have scripts posted here instead of a link to AUR or pastebin. If it's nevertheless wrong I will relocate the scripts.
    Thanks in advance.
    Last edited by roepi (2014-03-17 17:42:44)

    If you still want to modify the XML, I would use xmlstarlet instead of awk/sed. I haven't tested the following scripts so they will probably need some debugging but they should give you a general idea of what I would do.
    The post remove script would be reduced to:
    set -e
    # xpath selector to select layouts that are named eurkey
    xpath='/xkbConfigRegistry/layoutList/layout/configItem/name[text()="eurkey"]/../..'
    for file in /usr/share/X11/xkb/rules/{base,evdev}.xml; do
    [[ -f "$file" ]] && xml ed --inplace -d "$xpath" "$file"
    done
    And the post install script would become:
    set -e
    xpath='/xkbConfigRegistry/layoutList/layout/configItem/name[text()="eurkey"]'
    for file in /usr/share/X11/xkb/rules/{base,evdev}.xml; do
    if [[ ! -f "$file" ]]; then
    echo "File $file is not a regular file (skipped)"
    elif xml sel -t -c "$xpath" $file >/dev/null; then
    echo "File $file already constains eurkey (skipped)"
    else
    echo "processing $file"
    xml ed -P -L \
    -s /xkbConfigRegistry/layoutList -t elem -n layoutTMP -v '' \
    -s //layoutTMP -t elem -n configItem -v '' \
    -s //layoutTMP/configItem -t elem -n name -v 'eurkey' \
    -s //layoutTMP/configItem -t elem -n shortDescription -v 'EUR' \
    -s //layoutTMP/configItem -t elem -n description -v 'EurKEY' \
    -s //layoutTMP/configItem -t elem -n languageList -v '' \
    -s //layoutTMP/configItem/languageList -t elem -n iso639Id -v 'cat' \
    -s //layoutTMP/configItem/languageList -t elem -n iso639Id -v 'dan' \
    -s //layoutTMP/configItem/languageList -t elem -n iso639Id -v 'eng' \
    -s //layoutTMP/configItem/languageList -t elem -n iso639Id -v 'est' \
    -s //layoutTMP/configItem/languageList -t elem -n iso639Id -v 'fao' \
    -s //layoutTMP/configItem/languageList -t elem -n iso639Id -v 'fin' \
    -s //layoutTMP/configItem/languageList -t elem -n iso639Id -v 'ger' \
    -s //layoutTMP/configItem/languageList -t elem -n iso639Id -v 'gre' \
    -s //layoutTMP/configItem/languageList -t elem -n iso639Id -v 'gsw' \
    -s //layoutTMP/configItem/languageList -t elem -n iso639Id -v 'ita' \
    -s //layoutTMP/configItem/languageList -t elem -n iso639Id -v 'lav' \
    -s //layoutTMP/configItem/languageList -t elem -n iso639Id -v 'lit' \
    -s //layoutTMP/configItem/languageList -t elem -n iso639Id -v 'nld' \
    -s //layoutTMP/configItem/languageList -t elem -n iso639Id -v 'nor' \
    -s //layoutTMP/configItem/languageList -t elem -n iso639Id -v 'por' \
    -s //layoutTMP/configItem/languageList -t elem -n iso639Id -v 'spa' \
    -s //layoutTMP/configItem/languageList -t elem -n iso639Id -v 'swe' \
    -r //layoutTMP -v layout \
    "$file"
    fi
    done

  • 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

  • How to solve a PKGBUILD dependency issue for the MinGW-w64 toolchain?

    Hi,
    I had the ambitious plan of creating PKGBUILDs to provide a fully functional and full-featured MinGW-w64 toolchain in Arch (starting with the AUR). For those of you not aware of MinGW-w64; it's a project that provides the more complete alternative for MinGW.org: they support a much larger set of the Win32 API and provide 64-bit support. In short: they allow you to use GCC for Windows 32 and 64-bit.
    The current list of packages is here: https://aur.archlinux.org/packages.php?SeB=m&K=rubenvb
    They work (roughly, for me, I'm working out the problems as people report them), but only if you build and install them manually.
    I would like to ask the help of the experts that reside here to resolve the issue that handy tools like yaourt and other AUR utilities cannot build/install these packages automagically, so that people are more easily persuaded to use my packages. The dependencies here are what functionally needs to be set, not per se what the current PKGBUILDs specify, due to numerous experiments and trial and error...)
    The build and install order needs to be strictly followed:
    1. build+install mingw-w64-headers-base (no makedepends)
    2. build+install mingw-w64-binutils (no makedepends)
    3. build+install mingw-w64-gcc-base (makedepends and depends: mingw-w64-binutils)
    4. build+install mingw-w64-crt (makedepends and depends: mingw-w64-gcc-base and mingw-w64-binutils)
    5. build mingw-w64-winpthreads (makedepends: mingw-w64-headers-base, mingw-w64-gcc-base and mingw-w64-binutils, conflicts mingw-w64-headers-base)
    6. build mingw-w64-headers (no makedepends, conflicts mingw-w64-headers-base)
    7. install mingw-w64-headers (replaces mingw-w64-headers-base)
    8. install mingw-w64-winpthreads
    9. build+install mingw-w64-gcc (replaces mingw-w64-gcc-base)
    I tried to enforce this as much as possible in the PLGBUILDs, but am unsure if everything is as it should be...
    The resulting binary packages that non-AUR-users
    (once mingw-w64 is in a binary repo) should install:
    - mingw-w64-headers
    - mingw-w64-crt
    - mingw-w64-winpthreads
    - mingw-w64-binutils
    - mingw-w64-gcc
    The issue is that winpthreads overwrites two dummy headers that have to be included in mingw-w64-headers-base, so I provide a mingw-w64-headers package omitting these two files, but unusable without mingw-w64-winpthreads. So winpthreads needs to be built when mingw-w64-headers-base is installed, and mingw-w64-headers cannot be installed before winpthreads is installed, due to these two headers (per architecture) being supplied by winpthreads in a complete form.
    I will try to tune the dependencies tonight, but any help or insight into the automation process is highly appreciated!
    Thanks,
    Ruben
    Last edited by rubenvb (2011-11-22 21:28:12)

    Interesting problem.
    While i don't use any aur helper, i think you can simplify your approach a bit.
    Here's how i would do it (changes in red) :
    1. build+install mingw-w64-headers-base (no makedepends)
    this package DOES NOT include the dummy headers
    1a. build + install mingw-w64-headers-extra-dummy (makedepends : mingw-w64-headers-base)
    this package will include ONLY the dummy headers
    2. build+install mingw-w64-binutils (no makedepends)
    3. build+install mingw-w64-gcc-base (makedepends and depends: mingw-w64-binutils)
    4. build+install mingw-w64-crt (makedepends and depends: mingw-w64-gcc-base and mingw-w64-binutils)
    5. build mingw-w64-winpthreads
    makedepends:
    mingw-w64-headers-base, mingw-w64-gcc-base and mingw-w64-binutils, mingw-w64-headers-extra-dummy
    conflicts with mingw-w64-headers-extra-dummy
    provides mingw-w64-headers-extra
    6. skipped
    7. skipped
    8. install mingw-w64-winpthreads
    9. build+install mingw-w64-gcc (replaces mingw-w64-gcc-base)
    makedepends : mingw-w64-headers-base, mingw-w64-headers-extra

  • [Solved] Are these dependecies on aur?

    I more of a creative person and enjoy playing LittleBigPlanet. But right now, I don't have access to the PS3, so I can't play it. I remember Xmoto being fun and I loved to create levels using inksmoto. (Inksmoto is an add-on for inkscape that allows you to make Xmoto levels.) I followed all the instructions on how to install it, but it appears that I didn't have a few dependencies installed, so it didn't work. I got one of them installed, (tk) but I need 2 more. (Python-Imaging-Tk and Python-Tk) I searched to see if it was on aur, and neither of them were. I searched tk, but then a bunch of GTK things showed up, and I didn't have the time to search through all of that. I searched TkInter, but nothing showed up. Are these dependecies found anywhere that it would be easy to install? I don't want to have to compile the dependecies. (Although it wouldn't take too long) Right now I'm updating and the update included Python, so the update may fix this. I'm sorry if the update fixes it. I have a 32-bit processer, I doubt this would help but it just might.
    CONCLUSION for people who are too lazy to read the text above:
    Need These dependecies: Python-Imaging-Tk and Python-Tk.
    Couldn't find them, too lazy to look through tons of results.
    Updating, update includes Python, update may fix it.
    32-bit processer.
    EDIT: Update didn't work, please help!
    EDIT (Again): All finished, works just fine. Thanks iphitus for helping me!
    Last edited by Tjb0607 (2009-06-18 04:00:01)

    @tjb.....
    Before you piss off to many folks, you've already seen no one here is going to do work for you.
    It was probably a whim you were even responded to, even though it looked more like you ticked someone off already.
    Everyone here has a life outside of this forum to include the devs and mods.
    Pretty much everyone here will help with a legit problem, at least supply a link to a fix for the most part.
    What you're asking for is for someone to hold your hand and pretty much think for you.
    Arch is the best distro going for my money, but the users here are somewhat advanced and aren't much inclined to hold hands or think for someone else when the wiki is massive compared to most of the ones I've encountered and just chock full of answers.
    Get thee to the wiki dude. [I'm assuming of course]
    edit. simultaneous post as I see he already solved his problem. O well.
    Last edited by windtalker (2009-06-17 05:13:34)

  • [SOLVED] How to install from AUR?

    Ok, I know I'm posting too many questions too fast but I'm at the last step in configuring my videocard driver to install X and I'm stranded in the middle of nowhere, sorry for too much posting.
    I need to install a package from AUR but even I read the guide (http://wiki.archlinux.org/index.php/AUR_User_Guidelines) I can't make it clear enough on how to do it so please correct me if there's anything wrong.
    a. first of all, I need to download and install wget because I'm at CLI ready to configure X but I need the latest test drivers that fully support my videocard.
    b. mkdir ~/myuser/build && cd ~/myuser/build
    c. I need to download from here (http://aur.archlinux.org/packages.php?ID=34773) the Tarball, PKGBUILD and all the files listed in "Files", right?
    d. Once I have files downloaded all I need to do is follow the instructions in the wiki, 
       1.  Acquire a PKGBUILD  and any other required files (e.g. patches)
       2. Run makepkg in the directory where the files are saved
       3. Install the resulting package with pacman
    Thanks for any advice!
    Last edited by martin77 (2010-03-29 01:38:25)

    guys,
    did you ever saw that Heineken TV Ad where a woman shows her dresser-room to her fellow friends and they start screaming like (women does) crazy, and while they still screaming a lot they start to hear a somewhat identical scream from other part of the house that in fact shows up as the boyfriend/husband of the first lady showing his buddys his special fridge-room filled with green bottles?
    Well, that was my *exact* impression yesterday after having KDE4 up and running with composite turned on faster than any Fluxbox system on a iCore 7, and that's the top part of the iceberg.
    I think the best thing I like about Arch it's it's simplicity - besides it's speed. Okay, it may seem somewhat obscure to profane because editing configuration files is something strange to profanes, but if you have a little knowledge of GNU/Linux like myself once completed the Beginner's Guide, looking at /var/log/pacman.log and start tweaking you found yourself with a very powerfull yet easy to use, easy and fast to learn system. Arch is incredible, that's why it's gaining so much popularity, and it's community is superb.
    I'm doing my first steps around it and find Yaourt a very cool tool, I love all the info it shows about installed and AUR packages and the way it colorize, very pragmatic-oriented (as Arch is).
    On the other hand Packer is a swift tool to replace pacman.
    Thank you guys for your kindness and time spent on this n00b, best!

  • [SOLVED] What are Git-type AUR packages?

    I read the ArchWiki Entry on Git, but I still don't really understand what it is in terms of Aur packages.
    I've seen this a couple of times, where there's a second git version of a package in AUR. For example, when I type 'prey' into Yaourt, I get a couple of results, among them:
    3 aur/prey-git 20100424-1 (5)
        Prey is a lightweight application that will help you track and find your laptop if it ever gets stolen.
    4 aur/prey-tracker 0.6.0-1 (100)
        Remote tracking and monitoring application for laptops, smartphones, and other electronic devices
    Either would install Prey on my computer, right? What are the differences and/or benefits of either?
    Last edited by Winston-Wolfe (2013-06-06 11:11:27)

    https://aur.archlinux.org/
    Statistics
    Packages     42851
    Orphan Packages     9729
    Packages added in the past 7 days     126
    Packages updated in the past 7 days     1052
    Packages updated in the past year     17219
    Packages never updated     10679
    Registered Users     46348
    Trusted Users     34
    x33a wrote:As someone mentioned on the forums recently, people should at least abandon the packages so others can take over.
    You can always e-mail the maintainer and if you don't get a response in two weeks, ask on the AUR ML to take that package over.
    In the meantime you can post a link to the updated PKGBUILD etc. in comments on the AUR page of that package.
    As with my posts, quantity != quality ;P

  • [SOLVED] git PKGBUILD (sinit) almost there, package() fails

    So, I'm trying to make my first PKGBUILD for sinit.
    Here's what I have so far:
    # Maintainer: Cem Aydin (rebootl) <cem.aydin gmx.ch>
    _gitname=sinit
    pkgname=${_gitname}-git
    pkgver=0.7.r1.g3a953ea
    pkgrel=1
    pkgdesc="sinit - suckless init (patched for a custom minirc)"
    arch=('i686' 'x86_64')
    url="http://git.2f30.org/sinit/"
    license=('MIT')
    depends=('')
    makedepends=('git')
    conflicts=('')
    provides=('sinit')
    source=('git://git.2f30.org/sinit'
    'call-minirc-sinit.patch')
    md5sums=('SKIP'
    'ad798476614abd1e78f372e60fcc779e')
    pkgver() {
    cd "${_gitname}"
    # Using most recent unannotated tag, removing prefix v
    git describe --long --tags | sed -r 's/^v//;s/([^-]*-g)/r\1/;s/-/./g'
    prepare() {
    cd "${_gitname}"
    patch -uN config.def.h ../call-minirc-sinit.patch || return 1
    build() {
    cd "${_gitname}"
    make
    package() {
    cd "${_gitname}"
    make PREFIX=/usr DESTDIR="${pkgdir}" install
    It works up to package() where it fails:
    makepkg
    ==> Making package: sinit-git 0.7.r1.g3a953ea-1 (Mon Feb 24 14:53:12 CET 2014)
    ==> Checking runtime dependencies...
    ==> Checking buildtime dependencies...
    ==> Retrieving sources...
    -> Updating sinit git repo...
    Fetching origin
    -> Found call-minirc-sinit.patch
    ==> Validating source files with md5sums...
    sinit ... Skipped
    call-minirc-sinit.patch ... Passed
    ==> Extracting sources...
    -> Creating working copy of sinit git repo...
    Cloning into 'sinit'...
    done.
    ==> Starting pkgver()...
    ==> Starting prepare()...
    patching file config.def.h
    ==> Removing existing pkg/ directory...
    ==> Starting build()...
    sinit build options:
    CFLAGS = -Wextra -Werror -Wall -Os
    LDFLAGS = -static
    CC = cc
    creating config.h from config.def.h
    CC util/eprintf.c
    AR util.a
    make bin
    make[1]: Entering directory '/home/cem/Setups_hplaptop/sinit-git/src/sinit'
    CC sinit.c
    LD sinit
    make[1]: Leaving directory '/home/cem/Setups_hplaptop/sinit-git/src/sinit'
    ==> Entering fakeroot environment...
    ==> Starting package()...
    sinit build options:
    CFLAGS = -Wextra -Werror -Wall -Os
    LDFLAGS = -static
    CC = cc
    make bin
    make[1]: Entering directory '/home/cem/Setups_hplaptop/sinit-git/src/sinit'
    make[1]: Nothing to be done for 'bin'.
    make[1]: Leaving directory '/home/cem/Setups_hplaptop/sinit-git/src/sinit'
    installing executable to /home/cem/Setups_hplaptop/sinit-git/pkg/sinit-git/usr/bin
    cp: cannot create regular file ‘/home/cem/Setups_hplaptop/sinit-git/pkg/sinit-git/usr/bin’: No such file or directory
    Makefile:47: recipe for target 'install' failed
    make: *** [install] Error 1
    ==> ERROR: A failure occurred in package().
    Aborting...
    I can see that it's missing the directory usr/bin under pkg/sinit-git/.. but I don't understand why.
    I also tried to replace all the cd "${_gitname}" by cd "$srcdir/$_gitname" but I get the same error...
    I can't see the difference to e.g. following reference:
    https://aur.archlinux.org/packages/al/a … t/PKGBUILD
    Last edited by rebootl (2014-02-24 19:01:39)

    Hey, thanks a lot for your replies. Ah, that explains it, didn't look at the Makefile, don't know how this works honestly...
    @Scimmia: Your workaround works!
    @WorMzy: I'll do so.
    Regards

  • [SOLVED] Cannot build openswan from AUR

    Hello everybody,
    I have an error when I try to upgrade openswan with yaourt/AUR (2.6.24-2 => 2.6.25-1) on a i686 arch install
    This is the error :
    make[3]: Entering directory `/tmp/yaourt-tmp-olivier/aur-openswan/openswan/src/openswan-2.6.25/OBJ.linux.i386/programs/addconn'
    cc -c -fno-strict-aliasing -g -Werror -DKLIPS -DSCANDIR_HAS_CONST -I/tmp/yaourt-tmp-olivier/aur-openswan/openswan/src/openswan-2.6.25/ports/linux/include -I/tmp/yaourt-tmp-olivier/aur-openswan/openswan/src/openswan-2.6.25/ports/linux/include -I/tmp/yaourt-tmp-olivier/aur-openswan/openswan/src/openswan-2.6.25/ports/linux/include -I/tmp/yaourt-tmp-olivier/aur-openswan/openswan/src/openswan-2.6.25/ports/linux/include -I/tmp/yaourt-tmp-olivier/aur-openswan/openswan/src/openswan-2.6.25/programs/pluto -I/tmp/yaourt-tmp-olivier/aur-openswan/openswan/src/openswan-2.6.25/programs/addconn/ -I/tmp/yaourt-tmp-olivier/aur-openswan/openswan/src/openswan-2.6.25 -I/tmp/yaourt-tmp-olivier/aur-openswan/openswan/src/openswan-2.6.25/linux/include -I/tmp/yaourt-tmp-olivier/aur-openswan/openswan/src/openswan-2.6.25/include -Wall -Wpointer-arith -Wcast-qual -Wstrict-prototypes -Wbad-function-cast -DKLIPS -DNAT_TRAVERSAL -DNAT_TRAVERSAL -DKERNEL_ALG -DIKE_ALG -DFINALCONFDIR=\"/etc\" -DFINALCONFDDIR=\"/etc/ipsec.d\" -DFINALCONFFILE=\"/etc/ipsec.conf\" -DFINALVARDIR=\"/var\" -Werror /tmp/yaourt-tmp-olivier/aur-openswan/openswan/src/openswan-2.6.25/programs/addconn/addconn.c
    cc1: warnings being treated as errors
    In file included from /tmp/yaourt-tmp-olivier/aur-openswan/openswan/src/openswan-2.6.25/programs/addconn/addconn.c:51:0:
    /tmp/yaourt-tmp-olivier/aur-openswan/openswan/src/openswan-2.6.25/include/ipsecconf/confread.h:37:19: error: comparison between 'enum keyword_string_config_field' and 'enum keyword_string_conn_field'
    /tmp/yaourt-tmp-olivier/aur-openswan/openswan/src/openswan-2.6.25/include/ipsecconf/confread.h:38:19: error: comparison between 'enum keyword_numeric_config_field' and 'enum keyword_numeric_conn_field'
    /tmp/yaourt-tmp-olivier/aur-openswan/openswan/src/openswan-2.6.25/include/ipsecconf/confread.h:39:34: error: comparison between 'enum keyword_string_config_field' and 'enum keyword_string_conn_field'
    /tmp/yaourt-tmp-olivier/aur-openswan/openswan/src/openswan-2.6.25/include/ipsecconf/confread.h:40:34: error: comparison between 'enum keyword_numeric_config_field' and 'enum keyword_numeric_conn_field'
    make[3]: *** [addconn.o] Error 1
    make[3]: Leaving directory `/tmp/yaourt-tmp-olivier/aur-openswan/openswan/src/openswan-2.6.25/OBJ.linux.i386/programs/addconn'
    make[2]: *** [programs] Error 1
    make[2]: Leaving directory `/tmp/yaourt-tmp-olivier/aur-openswan/openswan/src/openswan-2.6.25/OBJ.linux.i386/programs'
    make[1]: *** [programs] Error 1
    make[1]: Leaving directory `/tmp/yaourt-tmp-olivier/aur-openswan/openswan/src/openswan-2.6.25/OBJ.linux.i386'
    make: *** [programs] Error 2
    ==> ERROR: Build Failed.
    Aborting...
    Error: Makepkg was unable to build openswan package.
    Error: unable to update openswan
    Following packages have not been installed:
    openswan
    Is a bug with the AUR package or is a problème on my install ?
    Thx for the help.
    Olive
    Last edited by nolive (2010-05-05 06:58:38)

    ok, that's build when I comment this in /tmp/yaourt-tmp-olivier/aur-openswan/openswan/src/openswan-2.6.25/programs/Makefile.program
    # die if there are any warnings
    ifndef WERROR
    #WERROR:= -Werror
    endif
    And run the compile directly (not with yaourt or pkgbuild) with
    sudo make programs install
    in /tmp/yaourt-tmp-olivier/aur-openswan/openswan/src/openswan-2.6.25
    But my ipsec VPN don't work :
    sudo ipsec auto --up toto
    003 ERROR: "toto" #1: sendto on eth0 to xxx.xxx.xxx.xxx:500 failed in main_outI1. Errno 22: Invalid argument
    104 "toto" #1: STATE_MAIN_I1: initiate
    010 "toto" #1: STATE_MAIN_I1: retransmission; will wait 20s for response
    003 ERROR: "toto" #1: sendto on eth0 to xxx.xxx.xxx.xxx:500 failed in EVENT_RETRANSMIT. Errno 22: Invalid argument
    010 "toto" #1: STATE_MAIN_I1: retransmission; will wait 40s for response
    003 ERROR: "toto" #1: sendto on eth0 to xxx.xxx.xxx.xxx:500 failed in EVENT_RETRANSMIT. Errno 22: Invalid argument
    Thank's for your help. I haven't the skills for checking the code.

Maybe you are looking for