|
|
#!/bin/bash # # --- ROCK-COPYRIGHT-NOTE-BEGIN --- # # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # Please add additional copyright information _after_ the line containing # the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by # the ./scripts/Create-CopyPatch script. Do not edit this copyright text! # # ROCK Linux: rock-src/scripts/config.in # ROCK Linux is Copyright (C) 1998 - 2006 Clifford Wolf # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. A copy of the GNU General Public # License can be found at Documentation/COPYING. # # Many people helped and are helping developing ROCK Linux. Please # have a look at http://www.rocklinux.org/ and the Documentation/TEAM # file for details. # # --- ROCK-COPYRIGHT-NOTE-END --- # # Main config script # # Execution of sub-scripts: # # - architecture/*/preconfig.in # # * Selecting Architecture # * architecture/$ROCKCFG_ARCH/config.in # # - misc/*/preconfig.in # - target/*/preconfig.in # - package/*/*/preconfig.in # # * Selecting Target # * target/$ROCKCFG_TARGET/config.in # # * misc/*/noexpertconfig.in # # * misc/*/config-*.in # * misc/*/config.in # * package/*/config-*.in # * package/*/config.in # * Various common build options # # - package/*/*/postconfig.in # - misc/*/postconfig.in # - architecture/$ROCKCFG_ARCH/postconfig.in # - target/$ROCKCFG_TARGET/postconfig.in # # Only procedures marked with '*' might interact with the user. # # Naming-scheme for extening config variables: # # Core: ROCKCFG_* # Archs: ROCKCFG_ARCH_<Arch-Name>_* # Targets: ROCKCFG_TRG_<Target-Name>_* # Packages: ROCKCFG_PKG_<Pkg-Name>_* # # Config-Internal Variables: # # Core: CFGTEMP_* # Archs: CFGTEMP_ARCH_<Arch-Name>_* # Targets: CFGTEMP_TRG_<Target-Name>_* # Packages: CFGTEMP_PKG_<Pkg-Name>_* # # Config Presets: ROCKCFGSET_* #
CFGTEMP_ARCHLIST="" CFGTEMP_TARGETLIST=""
include () { local x for x in $@ ; do [ -f "$x" ] && . "./$x" done }
include "architecture/*/preconfig.in"
comment_id '- Architecture, CPU and Optimization' COMMENT_ARCHCPUOPT block_begin 7 choice ROCKCFG_ARCH $ROCKCFG_ARCH $CFGTEMP_ARCHLIST ROCKCFG_ID="$ROCKCFG_ID-$ROCKCFG_ARCH"
if [ -f architecture/$ROCKCFG_ARCH/config.in ] then . architecture/$ROCKCFG_ARCH/config.in ; fi bool 'This is a cross-build between architectures' ROCKCFG_CROSSBUILD 0 if [ "$ROCKCFG_CROSSBUILD" = 1 ] ; then block_begin bool 'Test-build the packages which are not known to cross build' ROCKCFG_CROSS_TESTALL 0 if [ $ROCKCFG_CROSS_TESTALL = 1 ]; then comment '-- WARNING: Test-building packages which are not known to cross build' comment '-- might cause damage on your build system if it is not read-only. So' comment '-- only run this if your /{bin,lib,usr,..} is somehow write-protected.' fi ROCKCFG_ID="$ROCKCFG_ID-cross" ; ROCKCFGSET_USE_CROSSCC=1 const ROCKCFG_PSEUDONATIVE 0 block_end else bool 'This is a pseudo-native cross-build' ROCKCFG_PSEUDONATIVE 0 if [ "$ROCKCFG_PSEUDONATIVE" = 1 ] ; then comment '-- WARNING: Doing pseudo native builds is a tricky thing.' comment '-- Better write the documentation first... ;-)'
text 'IP of native host for command forwarding' ROCKCFG_PSEUDONATIVE_NATIVEHOST '' text 'NFSROOT to be mounted on native host' ROCKCFG_PSEUDONATIVE_NFSROOT "$HOSTNAME:$PWD"
ROCKCFG_ID="$ROCKCFG_ID-pseudonative" ; ROCKCFGSET_USE_CROSSCC=1 fi fi block_end
include "misc/*/preconfig.in" include "target/*/preconfig.in" include "package/*/*/preconfig.in"
if [ "$ROCKCFG_CROSSBUILD" = 1 ] ; then pkgfilter sed -e 's,^\(. ..\)[^ ]*,\1--------, ;' if [ $ROCKCFG_CROSS_TESTALL = 1 ]; then pkgfilter sed -e 's,^\(. .\)?,\11, ;' else pkgfilter sed -e 's,^\(. .\)?,\1-, ;' fi pkgfilter sed -e 's,^\(. .\)X,\11, ; s,^\(. \)X,\1-, ;' else pkgfilter sed -e 's,^\(. .\)[?X],\1-, ;' if [ "$ROCKCFG_PSEUDONATIVE" = 1 ] ; then pkgfilter sed -e 's,^\(. \)X,\10, ;' else pkgfilter sed -e 's,^\(. \)X,\1-, ;' fi fi
comment ' ' comment_id '- Target Distribution' COMMENT_TARGET
block_begin 7 choice ROCKCFG_TARGET crystal $CFGTEMP_TARGETLIST ROCKCFG_ID="$ROCKCFG_ID-$ROCKCFG_TARGET"
include target/$ROCKCFG_TARGET/config.in
text 'Linguas (translations)' ROCKCFG_LINGUAS 'de es fr it ru' block_end
echo "## BUILDENV_SETTINGS_BEGIN" >> config/$config.$swpid/config
comment ' ' comment_id '- Build System Configuration' COMMENT_BUILD_SYS_CONF block_begin 3 bool 'Make a parallel (cluster) build' ROCKCFG_PARALLEL 0 if [ "$ROCKCFG_PARALLEL" = 1 ] ; then block_begin 10 ROCKCFG_PARALLEL_MAX="`echo $ROCKCFG_PARALLEL_MAX | sed 's,[^0-9],,g'`" text 'Maximum size of job queue' ROCKCFG_PARALLEL_MAX 10 text 'Command for adding jobs' ROCKCFG_PARALLEL_ADDJOB '' block_end else bool 'Abort when a package-build fails' \ ROCKCFG_ABORT_ON_ERROR 0 fi
bool 'Retry building broken packages' ROCKCFG_RETRY_BROKEN 0 bool 'Disable packages which are marked as broken' \ ROCKCFG_DISABLE_BROKEN 0 bool 'Do not try building packages if deps failed' \ ROCKCFG_NOBROKENDEPS 0 bool 'Always clean up src dirs (even on pkg fail)' \ ROCKCFG_ALWAYS_CLEAN 0 bool 'Create debug information (xtrace) for builds' ROCKCFG_XTRACE 0
bool 'Use tmpfs for building packages' ROCKCFG_SRC_TMPFS 0 if [ "$ROCKCFG_SRC_TMPFS" = 1 ] ; then block_begin comment '! WARNING: This feature can hang your system, if' comment '! you do not have enough virtual memory!' text 'tmpfs mount options' ROCKCFG_SRC_TMPFS_OPT \ 'size=1024M,nr_inodes=100k' bool 'Write tmpfs log to var/adm/rock-debug/tmpfslog.txt' \ ROCKCFG_SRC_TMPFS_LOG 0 block_end fi
bool 'Send emails on special events' ROCKCFG_SENDMAIL 0 if [ "$ROCKCFG_SENDMAIL" = 1 ] ; then block_begin text 'Sendmail program' ROCKCFG_SENDMAIL_BIN 'sendmail' text 'Recipient address' ROCKCFG_SENDMAIL_TO 'root' block_end fi bool 'HTTP GET request on special events' ROCKCFG_HTTP 0 if [ "$ROCKCFG_HTTP" = 1 ] ; then block_begin text 'Website' ROCKCFG_HTTP_SITE 'http://pallas.crash-override.net/cgi-bin/rocklogbot?package=PACKAGE&config=CONFIG&status=STATUS&stage=STAGE' block_end fi block_end
include "misc/*/noexpertconfig.in"
echo "## BUILDENV_SETTINGS_END" >> config/$config.$swpid/config
comment ' ' block_begin 3 bool 'Show expert-only and experimental options' ROCKCFG_EXPERT 0 block_end
if [ $ROCKCFG_EXPERT == 1 ] ; then ROCKCFG_ID="$ROCKCFG_ID-expert" else ROCKCFG_ID="$ROCKCFG_ID-noexpert" fi
expert_begin
comment ' ' comment '- Binary package format' block_begin 3 bool 'Create Checksums for installed files' ROCKCFG_CREATE_CKSUM 1 bool 'Create *.tar.bz2 binary packages' ROCKCFG_CREATE_TARBZ2 0 bool 'Create *.gem binary packages' ROCKCFG_CREATE_GEM 1 bool 'Append version number to package files' ROCKCFG_PKGFILE_VER 1 block_end
comment ' ' comment '- Package splitting' block_begin 3 bool 'Create extra *:doc packages' ROCKCFG_SPLIT_DOC 1 bool 'Create extra *:dev packages' ROCKCFG_SPLIT_DEV 1 block_end
comment ' ' include "$(ls misc/*/config{,-*}.in 2>/dev/null \ | LC_ALL=C sort -k3,3 -t"/" | tr '\n' ' ')" include "$(ls package/*/*/config{,-*}.in 2>/dev/null \ | LC_ALL=C sort -k4,4 -t"/" | tr '\n' ' ')"
comment ' ' comment '- Additional GNU Configure Options' block_begin 5 editfile ROCKCFG_CONFOPT_FILE config/$config.$swpid/confopt \ 'GNU Configure Options' if [ -f config/$config.$swpid/confopt ] ; then const ROCKCFG_CONFIGURE_OPTS "`tr '\n' ' ' \ < config/$config.$swpid/confopt`" else const ROCKCFG_CONFIGURE_OPTS "" fi for option in $ROCKCFG_CONFIGURE_OPTS ; do if [ "${option#--with-}" = "$option" -a \ "${option#--without-}" = "$option" ] then comment '---- Warning! The custom options may break packages!' break fi done block_end
comment ' ' text 'Additional compiler flags' ROCKCFG_C_FLAGS ""
comment ' ' comment_id '- Flist detection technique' COMMENT_FLIST block_begin 5 choice ROCKCFG_FLIST flwrapper \ flwrapper 'Use the flist wrapper library for flist creation' \ strace 'Use strace to get the file list' \ find 'Use find on timestamp-file for flist creation' if [ "$ROCKCFG_FLIST" = strace ]; then pkgenable strace fi block_end
comment ' ' comment '- Various Options' block_begin 5 bool 'Build and use a (pseudo-)cross compiler' ROCKCFG_USE_CROSSCC 1 bool 'Make rebuild stage (stage 9)' ROCKCFG_DO_REBUILD_STAGE 1
if [ $ROCKCFG_CROSSBUILD != 1 ]; then bool 'Run a check/test for packages with support' ROCKCFG_DO_CHECK 0 fi
if [ $ROCKCFG_USE_CROSSCC != 1 ]; then pkgfilter sed -e 's,^\([XO] \)0,\1-, ;' fi
if [ $ROCKCFG_DO_REBUILD_STAGE != 1 ]; then pkgfilter sed -e 's,^\([XO] [^ ]*\)9 ,\1- , ;' fi
choice ROCKCFG_OPT size \ smart 'Smart optimisation using a profile database' \ bizarre 'Inverse smart optimisation (this is bizarre)' \ speed 'Hard optimise for speed (often pretty slow)' \ size 'Hard optimise for size (recommended)' \ lazy 'Lazy optimisiation (for debugging binaries)' \ test 'Only optimize toolchain (for fast builds)'
bool 'Create binaries with debug symbols' ROCKCFG_DEBUG 0 bool 'Create statically linked binaries' ROCKCFG_STATIC 0
bool 'Disable exceptions and rtti in C++' ROCKCFG_LIMITCXX 0 bool 'Enable C compiler multilib support' ROCKCFG_MULTILIB 0
bool 'Use automatically precompiled C++ headers' ROCKCFG_AUTOPCH 0
bool 'Disable National Language Support' ROCKCFG_DISABLE_NLS 0 if [ "$ROCKCFG_DISABLE_NLS" = 1 ] ; then pkgremove gettext fi
bool 'Automatic documentation creation' ROCKCFG_CREATE_DOCS 1
bool 'Create cache files after packages have been built' \ ROCKCFG_CREATE_CACHE 1
bool 'Run Paranoia Checks in Build-Target and Build-Pkg' \ ROCKCFG_PARANOIA_CHECK 1
bool 'Abbreviate ROCK Config ID with checksum' ROCKCFG_IDCKSUM 0 block_end expert_end
include "package/*/*/postconfig.in" include "misc/*/postconfig.in" include architecture/$ROCKCFG_ARCH/postconfig.in include target/$ROCKCFG_TARGET/postconfig.in
if [ "$ROCKCFG_CROSSBUILD" = 1 ] ; then pkgfilter sed -e 's,^\(. ..\)[^ ]*,\1--------, ;' fi
pkgfilter sed -e '/^[XO] --* / d ;'
[ "$ROCKCFG_EXPERT" = 1 ] || ROCKCFG_ID="`echo $ROCKCFG_ID | sed 's,-noexpert.*,,'`"
[ "$ROCKCFG_IDCKSUM" = 1 ] && ROCKCFG_ID="`echo $ROCKCFG_ID | cksum | cut -f1 -d' '`"
const ROCKCFG_SHORTID "$ROCKCFG_ID"
ROCKCFG_ID="$config-$ROCKCFG_ID" const ROCKCFG_ID "$ROCKCFG_ID"
|