summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorJames Meyer <James.meyer@operamail.com>2008-10-02 03:23:45 (GMT)
committerJames Meyer <James.meyer@operamail.com>2008-10-02 03:23:45 (GMT)
commit618d4ad515a93d1e48934be5846edd71270171ec (patch)
treea22a9294af81215d4a7b1053e5fdb4d746f39d41 /templates
downloadlinhes_dev-618d4ad515a93d1e48934be5846edd71270171ec.zip
initital import
Diffstat (limited to 'templates')
-rw-r--r--templates/developers/jams/.gtkrc-2.01
-rwxr-xr-xtemplates/developers/jams/display.sh3
-rwxr-xr-xtemplates/developers/jams/loginrun.sh4
-rwxr-xr-xtemplates/developers/rdt/loginrun.sh39
-rw-r--r--templates/enter_dev_chroot.sh178
-rwxr-xr-xtemplates/etc/.bash_profile6
-rwxr-xr-xtemplates/etc/.bashrc3
-rw-r--r--templates/etc/bashrc4
-rw-r--r--templates/etc/kmdev.sh5
-rw-r--r--templates/makepkg.conf106
-rw-r--r--templates/pacman.conf.chroot74
11 files changed, 423 insertions, 0 deletions
diff --git a/templates/developers/jams/.gtkrc-2.0 b/templates/developers/jams/.gtkrc-2.0
new file mode 100644
index 0000000..f5915f3
--- /dev/null
+++ b/templates/developers/jams/.gtkrc-2.0
@@ -0,0 +1 @@
+gtk-icon-theme-name = "Tango"
diff --git a/templates/developers/jams/display.sh b/templates/developers/jams/display.sh
new file mode 100755
index 0000000..c0c3bbc
--- /dev/null
+++ b/templates/developers/jams/display.sh
@@ -0,0 +1,3 @@
+#!/bin/bash
+DISPLAY=aopen:0
+export DISPLAY
diff --git a/templates/developers/jams/loginrun.sh b/templates/developers/jams/loginrun.sh
new file mode 100755
index 0000000..5f936b0
--- /dev/null
+++ b/templates/developers/jams/loginrun.sh
@@ -0,0 +1,4 @@
+#!/bin/bash
+thunar &
+terminal
+
diff --git a/templates/developers/rdt/loginrun.sh b/templates/developers/rdt/loginrun.sh
new file mode 100755
index 0000000..9811e3a
--- /dev/null
+++ b/templates/developers/rdt/loginrun.sh
@@ -0,0 +1,39 @@
+#!/bin/sh
+# this is a script that gets run from the ~/.bash_profile
+# Note: this is being run from the $BROOT directory,
+# which, by default is /build_tools
+
+# First : only do this once, so check if it has been done:
+if [ ! -f ~/.run ]; then
+# Set the title bar:
+cat >> ~/.bashrc << EOF
+# Set the title bar:
+echo -e "\e]0; CHROOT : LinHES-dev/build_root \007"
+# End
+EOF
+#
+# Set up a new ~/.bash_profile:
+mv ~/.bash_profile ~/.bash_profile.orig
+cat > ~/.bash_profile << EOF
+#!/bin/bash
+# ~/.bash_profile
+. ~/.bashrc
+cdb
+[ -f ~/loginrun.sh ] && ~/loginrun.sh
+# prompt:
+PS1='[\u@\h] \e[34m\W \e[31m\\$\e[0m '
+# End
+EOF
+#
+cat >> /etc/bashrc << EOF
+# added by rdt
+alias ls='ls --color=auto'
+alias lt='ls -lrt'
+# End
+EOF
+#
+# end of "do only once" code
+date > ~/.run && chmod 0 ~/.run
+fi # End of first time test.
+
+# End
diff --git a/templates/enter_dev_chroot.sh b/templates/enter_dev_chroot.sh
new file mode 100644
index 0000000..8f5eb40
--- /dev/null
+++ b/templates/enter_dev_chroot.sh
@@ -0,0 +1,178 @@
+#!/bin/bash
+MYDIR=`pwd`
+BROOT=$MYDIR/build_root.REPLACEME
+MIRROR_DIR=$MYDIR/pkg_repo
+TOOLS_DIR='LinHES-dev'
+ARCH=REPLACEME
+
+
+
+# Make sure only root can run our script
+if [[ $EUID -ne 0 ]]; then
+ echo "This script must be run as root" 1>&2
+ exit 1
+fi
+
+
+
+if [ ! -d $BROOT ]
+then
+ echo "build_root directory not found"
+ exit 1
+fi
+
+
+
+if [ -d LinHES-PKGBUILD ]
+ then
+ echo "Found LinHES-PKGBUILD"
+ else
+ echo "***********************************************************************************************"
+ echo "* Couldn't find LinHES-PKGBUILD *"
+ echo "* Please checkout the repository into the current directory *"
+ echo "* The LinHES-PKGBUILD git repoistory is at knoppmyth.net/mount/repository/LinHES-PKGBUILD.git *"
+ echo "***********************************************************************************************"
+ exit 1
+ fi
+
+mounted=`mount`
+umountlist=" "
+
+
+
+echo $mounted | grep -q $BROOT/proc
+status=$?
+if [ ! status = 0 ]
+then
+ mount -t proc proc $BROOT/proc
+ umountlist="$umountlist proc"
+else
+ echo "proc alredy mounted"
+fi
+
+
+
+
+echo $mounted | grep -q $BROOT/sys
+status=$?
+if [ ! $status = 0 ]
+then
+ mount -t sysfs sysfs $BROOT/sys
+ umountlist="$umountlist sys"
+else
+ echo "sys alredy mounted"
+fi
+
+[ -e $BROOT/dev/random ] || mknod $BROOT/dev/random c 1 8
+[ -e $BROOT/dev/urandom ] || mknod $BROOT/dev/urandom c 1 9
+[ -e $BROOT/dev/tty ] || mknod $BROOT/dev/tty c 5 0
+
+
+
+
+echo $mounted | grep -q $BROOT/dev/pts
+status=$?
+if [ ! $status = 0 ]
+then
+ [ -e $BROOT/dev/pts ] || mkdir -p $BROOT/dev/pts
+ mount -t devpts devpts $BROOT/dev/pts
+ umountlist="$umountlist dev/pts"
+else
+ echo "/dev/pts alredy mounted"
+fi
+
+
+
+#create dir for build_tools
+if [ ! -e $BROOT/build_tools ]
+then
+ mkdir $BROOT/build_tools
+fi
+#mount build_tools
+echo $mounted | grep -q $BROOT/build_tools
+status=$?
+if [ ! $status = 0 ]
+then
+ mount --bind $MYDIR/$TOOLS_DIR/build_tools $BROOT/build_tools
+ umountlist="$umountlist build_tools"
+else
+ echo "/build_tools alredy mounted"
+fi
+
+
+#create dir for the PKGBUILDS
+if [ ! -e $BROOT/data/LinHES-PKGBUILD ]
+then
+ mkdir -p $BROOT/data/LinHES-PKGBUILD
+fi
+
+#mount pkg_repo
+echo $mounted | grep -q $BROOT/data/LinHES-PKGBUILD
+status=$?
+if [ ! $status = 0 ]
+then
+ mount --bind $MYDIR/LinHES-PKGBUILD $BROOT/data/LinHES-PKGBUILD
+ umountlist="$umountlist data/LinHES-PKGBUILD"
+else
+ echo "pkg_repo alredy mounted"
+fi
+
+
+
+#create dir for pkg_repo / local mirror
+if [ ! -e $BROOT/data/pkg_repo ]
+then
+ mkdir -p $BROOT/data/pkg_repo
+fi
+
+#mount pkg_repo
+echo $mounted | grep -q $BROOT/data/pkg_repo
+status=$?
+if [ ! $status = 0 ]
+then
+ mount --bind $MYDIR/pkg_repo $BROOT/data/pkg_repo
+ umountlist="$umountlist data/pkg_repo"
+else
+ echo "pkg_repo alredy mounted"
+fi
+
+
+
+
+
+
+
+
+#copy in some files
+[ -e $BROOT/etc/resolv.conf ] || cp -f /etc/resolv.conf $BROOT/etc/resolv.conf
+
+if [ ! -f $BROOT/etc/bashrc ]
+then
+ cp -f $MYDIR/$TOOLS_DIR/templates/etc/bashrc $BROOT/etc/
+ cp -f $MYDIR/$TOOLS_DIR/templates/etc/kmdev.sh $BROOT/etc/profile.d/kmdev.sh
+ cp -f $MYDIR/$TOOLS_DIR/templates/etc/.bashrc $BROOT/root/
+ cp -f $MYDIR/$TOOLS_DIR/templates/etc/.bash_profile $BROOT/root/
+ chmod 755 $BROOT/root/.bashrc
+ chmod 755 $BROOT/root/.bash_profile
+ chmod 755 $BROOT/etc/profile.d/kmdev.sh
+fi
+
+
+#change the "xterm" title so we know it's a chroot
+echo -e "\e]0;chroot-pkgbuild\a"
+#used for Konsole
+echo -e "\e]30;chroot-pkgbuild\a"
+env -i /usr/sbin/chroot $BROOT /bin/bash --login
+
+
+
+for i in $umountlist
+do
+ #echo "unmounting $BROOT/$i"
+ umount $BROOT/$i
+done
+
+
+echo -e "\e]30;normal\a"
+echo -e "\e]0;normal\a"
+
diff --git a/templates/etc/.bash_profile b/templates/etc/.bash_profile
new file mode 100755
index 0000000..2fe91f2
--- /dev/null
+++ b/templates/etc/.bash_profile
@@ -0,0 +1,6 @@
+. ~/.bashrc
+cdb
+if [ -f ~/loginrun.sh ]
+then
+ ~/loginrun.sh
+fi
diff --git a/templates/etc/.bashrc b/templates/etc/.bashrc
new file mode 100755
index 0000000..9abf8d0
--- /dev/null
+++ b/templates/etc/.bashrc
@@ -0,0 +1,3 @@
+#!/bin/bash
+. /etc/profile
+. /etc/bashrc
diff --git a/templates/etc/bashrc b/templates/etc/bashrc
new file mode 100644
index 0000000..8ade7d0
--- /dev/null
+++ b/templates/etc/bashrc
@@ -0,0 +1,4 @@
+alias cdl='cd /data/LinHES-PKGBUILD/abs'
+alias cdp='cd /build_tools/clarch/larch/profiles'
+alias cdmc='cd /data/LinHES-PKGBUILD/abs/local/mythtv/mythtv/src/mythtv-0.21/programs/mythinstall'
+alias cdb='cd $BHOME'
diff --git a/templates/etc/kmdev.sh b/templates/etc/kmdev.sh
new file mode 100644
index 0000000..7604d9d
--- /dev/null
+++ b/templates/etc/kmdev.sh
@@ -0,0 +1,5 @@
+#!/bin/bash
+export BHOME=/build_tools
+export HOME=/root
+export PATH=$PATH:$BHOME/bin:$BHOME/bld/bin
+export PS1='[\u@LinHES_build \W]\$'
diff --git a/templates/makepkg.conf b/templates/makepkg.conf
new file mode 100644
index 0000000..84e9a76
--- /dev/null
+++ b/templates/makepkg.conf
@@ -0,0 +1,106 @@
+#
+# /etc/makepkg.conf
+#
+
+#########################################################################
+# SOURCE ACQUISITION
+#########################################################################
+#
+#-- The download utilities that makepkg should use to acquire sources
+# Format: 'protocol::agent'
+DLAGENTS=('ftp::/usr/bin/wget -c --passive-ftp -t 3 --waitretry=3 -O %o %u'
+ 'http::/usr/bin/wget -c -t 3 --waitretry=3 -O %o %u'
+ 'https::/usr/bin/wget -c -t 3 --waitretry=3 --no-check-certificate -O %o %u'
+ 'rsync::/usr/bin/rsync -z %u %o'
+ 'scp::/usr/bin/scp -C %u %o')
+
+# Other common tools:
+# /usr/bin/snarf
+# /usr/bin/lftpget -c
+# /usr/bin/curl
+
+#########################################################################
+# ARCHITECTURE, COMPILE FLAGS
+#########################################################################
+#
+CARCH="i686"
+CHOST="i686-pc-linux-gnu"
+
+#-- Exclusive: will only run on -march=i686
+# -march (or -mcpu) builds exclusively for an architecture
+# -mtune optimizes for an architecture, but builds for whole processor family
+CFLAGS="-march=i686 -mtune=generic -O2 -pipe"
+CXXFLAGS="-march=i686 -mtune=generic -O2 -pipe"
+#-- Make Flags: change this for DistCC/SMP systems
+#MAKEFLAGS="-j2"
+
+#########################################################################
+# BUILD ENVIRONMENT
+#########################################################################
+#
+# Defaults: BUILDENV=(fakeroot !distcc color !ccache !xdelta)
+# A negated environment option will do the opposite of the comments below.
+#
+#-- fakeroot: Allow building packages as a non-root user
+#-- distcc: Use the Distributed C/C++/ObjC compiler
+#-- color: Colorize output messages
+#-- ccache: Use ccache to cache compilation
+#-- xdelta: Generate delta patch from previous to current package
+#
+BUILDENV=(fakeroot !distcc !color !ccache !xdelta)
+#
+#-- If using DistCC, your MAKEFLAGS will also need modification. In addition,
+#-- specify a space-delimited list of hosts running in the DistCC cluster.
+#DISTCC_HOSTS=""
+
+#########################################################################
+# GLOBAL PACKAGE OPTIONS
+# These are default values for the options=() settings
+#########################################################################
+#
+# Default: OPTIONS=(strip docs libtool emptydirs zipman)
+# A negated option will do the opposite of the comments below.
+#
+#-- strip: Strip symbols from binaries/libraries
+#-- docs: Save doc and info directories
+#-- libtool: Leave libtool (.la) files in packages
+#-- emptydirs: Leave empty directories in packages
+#-- zipman: Compress manpages with gzip
+#
+OPTIONS=(strip docs libtool emptydirs zipman)
+
+#-- File integrity checks to use. Valid: md5, sha1, sha256, sha384, sha512
+INTEGRITY_CHECK=(md5)
+#-- Info and doc directories to remove (if option set correctly above)
+DOC_DIRS=(usr/{,share/}{info,doc,gtk-doc} opt/*/{info,doc,gtk-doc})
+#-- Directories to be searched for the strip option (if option set correctly above)
+STRIP_DIRS=(bin lib sbin usr/{bin,lib,sbin,local/{bin,lib,sbin}} opt/*/{bin,lib,sbin})
+
+#########################################################################
+# PACKAGE OUTPUT
+#########################################################################
+#
+# Default: put built package and cached source in build directory
+#
+#-- Destination: specify a fixed directory where all packages will be placed
+PKGDEST=/data/pkg_repo/packages
+#-- Source cache: specify a fixed directory where source files will be cached
+SRCDEST=/data/pkg_repo/sources
+
+#-- Packager: name/email of the person or organization building packages
+PACKAGER="LinHESDev@knoppmyth.net"
+
+#########################################################################
+# BUILDSCRIPT/EXTENSION DEFAULTS
+#########################################################################
+#
+# WARNING: Do NOT modify these variables unless you know what you are
+# doing.
+#
+BUILDSCRIPT='PKGBUILD'
+PKGEXT='.pkg.tar.gz'
+SRCEXT='.src.tar.gz'
+DB_COMPRESSION='gz'
+DB_CHECKSUMS=(md5)
+
+# vim: set ft=sh ts=2 sw=2 et:
diff --git a/templates/pacman.conf.chroot b/templates/pacman.conf.chroot
new file mode 100644
index 0000000..7059fbc
--- /dev/null
+++ b/templates/pacman.conf.chroot
@@ -0,0 +1,74 @@
+#
+# /etc/pacman.conf
+# from pacman.conf MV
+# NOTE: If you find a mirror that is geographically close to you, please
+# move it to the top of the server list, so pacman will choose it
+# first.
+#
+# To re-sort your mirror lists by ping/traceroute results, use the
+# /usr/bin/sortmirrors script. It requires the "netselect" package.
+#
+
+# See the pacman manpage for option directives
+
+#
+# GENERAL OPTIONS
+#
+[options]
+LogFile = /var/log/pacman.log
+NoUpgrade = etc/passwd etc/group etc/shadow etc/sudoers
+NoUpgrade = etc/fstab etc/raidtab etc/ld.so.conf
+NoUpgrade = etc/rc.conf etc/rc.local
+NoUpgrade = etc/modprobe.conf etc/modules.conf
+NoUpgrade = etc/lilo.conf boot/grub/menu.lst
+NoUpgrade = data/srv/hobbit/etc/bb-hosts
+NoUpgrade = etc/func/minion.conf
+
+HoldPkg = pacman glibc
+CacheDir = /tmp/dev-pkgcache
+#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
+
+#
+# REPOSITORIES
+# - can be defined here or included from another file
+# - pacman will search repositories in the order defined here.
+# - local/custom mirrors can be added here or in separate files
+#
+[core]
+Server = http://knoppmyth.net/repo/REPLACEME/$repo
+
+[extra]
+Server = http://knoppmyth.net/repo/REPLACEME/$repo
+
+[chroot-devel]
+Server = http://knoppmyth.net/repo/REPLACEME/$repo
+
+#[core-testing]
+Server = http://knoppmyth.net/repo/REPLACEME/$repo
+
+#[extra-testing]
+Server = http://knoppmyth.net/repo/REPLACEME/$repo
+
+
+
+
+
+
+########################ARCH DEFAULTS#############
+#[ARCH-core]
+# Add your preferred servers here, they will be used first
+#Server = ftp://ftp.ibiblio.org/pub/linux/distributions/archlinux/$repo/os/i686
+
+#[ARCH-extra]
+# Add your preferred servers here, they will be used first
+#Server = ftp://ftp.ibiblio.org/pub/linux/distributions/archlinux/$repo/os/i686
+
+#[community]
+# Add your preferred servers here, they will be used first
+#Include = /etc/pacman.d/mirrorlist
+
+# Unstable is disabled by default. To enable, uncomment the following
+# two lines. You can add preferred servers immediately after the header,
+# and they will be used before the default mirrors.
+#[unstable]
+#Include = /etc/pacman.d/mirrorlist