head 1.22; access; symbols; locks; strict; comment @# @; 1.22 date 2003.05.28.10.06.34; author swiergot; state Exp; branches; next 1.21; 1.21 date 2003.05.25.17.16.37; author swiergot; state Exp; branches; next 1.20; 1.20 date 2003.05.25.10.11.26; author swiergot; state Exp; branches; next 1.19; 1.19 date 2003.04.24.15.32.31; author swiergot; state Exp; branches; next 1.18; 1.18 date 2003.04.24.14.57.57; author swiergot; state Exp; branches; next 1.17; 1.17 date 2003.04.05.10.54.24; author swiergot; state Exp; branches; next 1.16; 1.16 date 2003.03.25.21.20.07; author swiergot; state Exp; branches; next 1.15; 1.15 date 2003.03.20.18.31.28; author swiergot; state Exp; branches; next 1.14; 1.14 date 2003.02.07.18.43.47; author swiergot; state Exp; branches; next 1.13; 1.13 date 2003.02.03.14.19.56; author swiergot; state Exp; branches; next 1.12; 1.12 date 2003.02.02.13.07.41; author swiergot; state Exp; branches; next 1.11; 1.11 date 2003.02.01.15.47.07; author swiergot; state Exp; branches; next 1.10; 1.10 date 2003.01.28.16.28.04; author swiergot; state Exp; branches; next 1.9; 1.9 date 2003.01.13.11.15.37; author swiergot; state Exp; branches; next 1.8; 1.8 date 2003.01.12.21.32.22; author swiergot; state Exp; branches; next 1.7; 1.7 date 2003.01.12.21.14.08; author swiergot; state Exp; branches; next 1.6; 1.6 date 2003.01.12.20.44.02; author swiergot; state Exp; branches; next 1.5; 1.5 date 2003.01.12.13.49.17; author swiergot; state Exp; branches; next 1.4; 1.4 date 2003.01.11.19.19.32; author swiergot; state Exp; branches; next 1.3; 1.3 date 2003.01.11.18.55.06; author swiergot; state Exp; branches; next 1.2; 1.2 date 2003.01.11.18.27.34; author swiergot; state Exp; branches; next 1.1; 1.1 date 2002.12.25.23.22.00; author swiergot; state Exp; branches; next ; desc @@ 1.22 log @- Don't put script.postinst and other scripts in subpackages. - If post-install script or other scripts need to be provided for a subpackage, create script.postinst.X or similar file, where X is a name of the subpackage. @ text @#!/bin/sh # pwbuilder: builder.defs - kit for building Slackware packages # Copyright (c) 2002 Jaroslaw Swierczynski # 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. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # You should find the copy of GNU General Public License in file # /usr/doc/pwbuilder-*/COPYING. if [ "$nocolor" = "y" ]; then white_on="*** " white_off=" ***" red_on="*** " red_off=" ***" else white_on="" white_off="" red_on="" red_off="" fi pw_ver="0.5.13" if [ ! "$build_number" = "" ]; then build="$build_number" fi echo -e "\n${white_on}pwbuilder $pw_ver${white_off}" echo "${white_on}TGZ packages building system${white_off}" echo "${white_on}Copyright (c) 2002 Jaroslaw Swierczynski ${white_off}" echo -ne "\n${white_on}Building $title version $version build $build for " if [ "$noarch" = "y" ]; then echo "noarch." else echo "$target_architecture." fi if [ "$automatic" = "y" ]; then echo -e "Using default compile-time options.${white_off}\n" else echo -e "You may be asked for some compile-time options.${white_off}\n" fi tmp="/tmp/builder-$name-$RANDOM" pkg_main="$tmp/packages/main" doc_dir="$pkg_main/usr/doc/$name-$version" cwd="`pwd`" src_tgz=`dirname "$sources_dir"` if [ "$src_tgz" = "." ]; then src_tgz="/usr/src/tgz" fi src_pkg="$src_tgz/sources/$name" src_cnt="1" parent_name="$name" p_suffix="" langs="bg ca cs da de el es et fr gl he hr hu it ja nl no pl pt_BR ru sk sl sv tr uk zh_TW" if [ "$noarch" = "y" ]; then architecture="noarch" else architecture="$target_architecture" if [ "$architecture" = "i486" -o \ "$architecture" = "i586" -o \ "$architecture" = "i686" -o \ "$architecture" = "pentium" -o \ "$architecture" = "pentium-mmx" -o \ "$architecture" = "pentiumpro" -o \ "$architecture" = "pentium2" -o \ "$architecture" = "pentium3" -o \ "$architecture" = "pentium4" -o \ "$architecture" = "k6" -o \ "$architecture" = "k6-2" -o \ "$architecture" = "k6-3" -o \ "$architecture" = "athlon" -o \ "$architecture" = "athlon-tbird" -o \ "$architecture" = "athlon-4" -o \ "$architecture" = "athlon-xp" -o \ "$architecture" = "athlon-mp" ]; then export AM_CFLAGS="-march=$architecture -mcpu=$architecture" export AM_CPPFLAGS="-march=$architecture -mcpu=$architecture" export AM_CXXFLAGS="-march=$architecture -mcpu=$architecture" else export AM_CFLAGS="-march=i386 -mcpu=i686" export AM_CPPFLAGS="-march=i386 -mcpu=i686" export AM_CXXFLAGS="-march=i386 -mcpu=i686" architecture="i386" fi if [ "$disable_pw" = "y" ]; then build_host="--program-prefix= --program-suffix= i386-slackware-linux" else build_host="--host=`echo $architecture | tr - _`-pc-linux-gnu" fi fi slackver="`cat /etc/slackware-version | sed 's}Slackware }}' | cut -f 1 -d ' '`" slackver_max="`echo $slackver | cut -f 1 -d -`" slackver_ext="`echo $slackver | cut -f 2 -d -`" if [ "$slackver_max" = "$slackver_ext" ]; then slackver_ext="" fi slackver_maj="`echo $slackver_max | cut -f 1 -d '.'`" slackver_min="`echo $slackver_max | cut -f 2 -d '.'`" slackver_pat="`echo $slackver_max | cut -f 3 -d '.'`" slackver="$slackver_maj.$slackver_min" if [ "$slackver_pat" = "" ]; then slackver_pat="0" fi slackver_max="$slackver_maj.$slackver_min.$slackver_pat" rm -rf $tmp mkdir -p $tmp/sources chmod 700 $tmp mkdir -p $pkg_main cd $tmp function build_host_off() { build_host="" } function opt_flags_off() { unset AM_CFLAGS unset AM_CXXFLAGS unset AM_CPPFLAGS } function crunch() { read whatever echo $whatever } function file_size() { echo -n "`wc -c $1 | crunch | cut -d ' ' -f 1`" } function force_verbose() { automatic=n } function verbose() { if [ ! "$automatic" = "y" ]; then if [ ! "$first_verbose" = "n" -a ! "$src1" = "" ]; then echo fi first_verbose=n echo $* fi } function msg_configuring() { echo -e "\n${white_on}Configuring...${white_off}" } function msg_compiling() { echo -e "${white_on}Compiling...${white_off}" } function msg_installing() { echo -e "${white_on}Installing...${white_off}" } function write_info() { if [ "$name" = "$package" ]; then package="" fi cat << EOF > $tmp/package-info-$1 package_name="$name" package_fullname="$title" package_file="$package" package_version="$version" package_arch="$architecture" package_build="$build" package_build_info="$build_info" package_short_desc="$info" package_long_desc="$desc" package_kind="$category" package_type="$environment" package_creator_mail="$contact" parent_package="$parent_package" required_packages="$requires" conflicts="$conflicts" home_site="$home_site" EOF ### cat << EOF > $tmp/package-subinfo-$1 name="$name" title="$title" package="$package" version="$version" architecture="$architecture" build="$build" build_info="$build_info" info="$info" desc="$desc" category="$category" environment="$environment" contact="$contact" parent_package="$parent_package" requires="$requires" conflicts="$conflicts" home_site="$home_site" EOF ### for lang in $langs; do eval "cur_lang=\$info_$lang" if [ ! "$cur_lang" = "" ]; then echo "package_short_desc_$lang=\"$cur_lang\"" >> $tmp/package-info-$1 echo "info_$lang=\"$cur_lang\"" >> $tmp/package-subinfo-$1 fi eval "cur_lang=\$desc_$lang" if [ ! "$cur_lang" = "" ]; then echo "package_long_desc_$lang=\"$cur_lang\"" >> $tmp/package-info-$1 echo "desc_$lang=\"$cur_lang\"" >> $tmp/package-subinfo-$1 fi done } function add_source() { if [ "$first_verbose" = "n" -a "$src1" = "" ]; then echo fi if echo "$1" | egrep '(^ftp://)|(^http://)' > /dev/null 2>&1; then srcfile=`basename "$1"` srcurl="1" else srcfile="$1" srcurl="0" fi if [ ! -f "$src_pkg/$srcfile" -a "$srcurl" = "1" ]; then echo -en "${white_on}Downloading source $srcfile...${white_off}" wget -t 3 -P $src_pkg $1 > /dev/null 2>&1 if [ ! "$?" = "0" ]; then echo -e "\r${red_on}Downloading $srcfile failed. Can't continue.${red_off} " clean_up exit 1 fi echo -e "\r${white_on}Downloaded source $srcfile.${white_off} " elif [ ! -f "$src_pkg/$srcfile" -a "$srcurl" = "0" ]; then echo -e "\r${red_on}Source $srcfile not found. Can't continue.${red_off} " clean_up exit 1 fi echo -en "${white_on}Extracting source $srcfile...${white_off}" local foo foo=`pwd` cd $tmp/sources archdir="$2" if [ "$archdir" = "." ]; then narchdir="source-$RANDOM" mkdir $narchdir cd $narchdir fi case $srcfile in *.tar.gz) tar zxf $src_pkg/$srcfile > /dev/null 2>&1 [ ! "$?" = "0" ] && { echo -e "\r${red_on}Extracting source $srcfile failed. Can't continue.${red_off} " clean_up exit 1 } [ "$2" = "" ] && archdir="`basename $srcfile .tar.gz`" ;; *.tar.bz2) tar jxf $src_pkg/$srcfile > /dev/null 2>&1 [ ! "$?" = "0" ] && { echo -e "\r${red_on}Extracting source $srcfile failed. Can't continue.${red_off} " clean_up exit 1 } [ "$2" = "" ] && archdir="`basename $srcfile .tar.bz2`" ;; *.tgz) tar zxf $src_pkg/$srcfile > /dev/null 2>&1 [ ! "$?" = "0" ] && { echo -e "\r${red_on}Extracting source $srcfile failed. Can't continue.${red_off} " clean_up exit 1 } [ "$2" = "" ] && archdir="`basename $srcfile .tgz`" ;; *.zip) unzip -q $src_pkg/$srcfile > /dev/null 2>&1 [ ! "$?" = "0" ] && { echo -e "\r${red_on}Extracting source $srcfile failed. Can't continue.${red_off} " clean_up exit 1 } [ "$2" = "" ] && archdir="`basename $srcfile .zip`" ;; esac if [ ! "$narchdir" = "" ]; then cd .. archdir="$narchdir" fi if [ ! -d "$archdir" ]; then echo -e "\r${red_on}Wrong top directory for source $srcfile. Can't continue.${red_off} " clean_up exit 1 fi eval "src$src_cnt=\"$tmp/sources/$archdir\"" src_cnt="`expr $src_cnt + 1`" cd $foo echo -e "\r${white_on}Extracted source $srcfile.${white_off} " } function clean_up() { if [ "$debug" = "y" ]; then cd $cwd echo -e "${white_on}Left sources.${white_off}\n" else echo -en "${white_on}Cleaning up...${white_off}" cd $cwd rm -rf $tmp echo -e "\r${white_on}Cleaned up.${white_off} \n" fi } function is_set() { local foo eval "foo=\$def_$1" if [ "$foo" = "" ]; then return 1 else return 0 fi } function yes_or_no() { if [ "$automatic" = "y" ]; then if is_set $1; then eval "$1=\$def_$1" else eval "$1=$2" fi else local answer while true; do echo -n "Answer [y/n]: " read answer if [ "$answer" = "y" -o "$answer" = "n" ]; then eval "$1=$answer" break fi done fi } function configure_option() { if [ "$2" = "" ]; then target_source="1" else target_source="$2" fi eval "echo -n \"$1 \" >> \$src$target_source/pwbuilder-configure_options" } function make_option() { if [ "$2" = "" ]; then target_source="1" else target_source="$2" fi eval "echo -n \"$1 \" >> \$src$target_source/pwbuilder-make_options" } function install_option() { if [ "$2" = "" ]; then target_source="1" else target_source="$2" fi eval "echo -n \"$1 \" >> \$src$target_source/pwbuilder-install_options" } function package_suffix() { if [ "$p_suffix" = "" ]; then package=".$1" p_suffix="1" else package="${package}_$1" fi } function do_configure() { msg_configuring touch pwbuilder-configure_options if [ "$output" = "y" ]; then ./configure `cat pwbuilder-configure_options` $* $build_host else ( ./configure `cat pwbuilder-configure_options` $* $build_host ) > /dev/null fi if [ ! "$?" = "0" ]; then echo -e "${red_on}Configure failed. Can't continue.${red_off}" clean_up exit 1 fi } function do_make() { msg_compiling touch pwbuilder-make_options if [ "$output" = "y" ]; then make `cat pwbuilder-make_options` $* else ( make `cat pwbuilder-make_options` $* ) > /dev/null fi if [ ! "$?" = "0" ]; then echo -e "${red_on}Compilation failed. Can't continue.${red_off}" clean_up exit 1 fi } function do_python_make() { msg_compiling touch pwbuilder-make_options if [ "$output" = "y" ]; then python ./setup.py build `cat pwbuilder-make_options` $* else ( python ./setup.py build `cat pwbuilder-make_options` $* ) > /dev/null fi if [ ! "$?" = "0" ]; then echo -e "${red_on}Compilation failed. Can't continue.${red_off}" clean_up exit 1 fi } function do_install() { msg_installing touch pwbuilder-install_options if [ "$output" = "y" ]; then make `cat pwbuilder-install_options` install $* else ( make `cat pwbuilder-install_options` install $* ) > /dev/null fi if [ ! "$?" = "0" ]; then echo -e "${red_on}Installation failed. Can't continue.${red_off}" clean_up exit 1 fi } function do_python_install() { msg_installing touch pwbuilder-install_options if [ "$output" = "y" ]; then python ./setup.py install `cat pwbuilder-install_options` $* else ( python ./setup.py install `cat pwbuilder-install_options` $* ) > /dev/null fi if [ ! "$?" = "0" ]; then echo -e "${red_on}Installation failed. Can't continue.${red_off}" clean_up exit 1 fi } function make_package() { if [ "$first_subpackage" = "n" ]; then echo -e "\r${white_on}Prepared subpackages.${white_off} " first_subpackage=y fi source $tmp/package-info-$1 ### source $tmp/package-subinfo-$1 ### if [ "$1" = "main" ]; then packfile="main" makemsg="Making main package..." else packfile="$parent_package-$1" makemsg="Making package $1..." fi echo -en "$white_on$makemsg$white_off" local pkg="$tmp/packages/$packfile" cd $pkg if [ "$delete_cat" = "y" ]; then rm -rf $pkg/usr/man/cat* $pkg/var/man/cat* test "`ls $pkg/usr/man 2> /dev/null`" = "" && rm -rf $pkg/usr/man test "`ls $pkg/usr 2> /dev/null`" = "" && rm -rf $pkg/usr test "`ls $pkg/var/man 2> /dev/null`" = "" && rm -rf $pkg/var/man test "`ls $pkg/var 2> /dev/null`" = "" && rm -rf $pkg/var fi if [ -d $pkg/usr/info ]; then rm -f $pkg/usr/info/dir gzip -9f $pkg/usr/info/*.info* > /dev/null 2>&1 fi if [ "$reset_dir" = "y" ]; then find $pkg -type d -exec chmod 755 {} \; fi mkdir -p $pkg/install if [ ! "$1" = "main" ]; then scrsuf=".$1" fi if [ ! "$disable_pw" = "y" ]; then cp $src_pkg/script.preinst$scrsuf $pkg/install/slack-pw-preinst.sh 2> /dev/null cp $src_pkg/script.prerem$scrsuf $pkg/install/slack-pw-prerem.sh 2> /dev/null cp $src_pkg/script.postrem$scrsuf $pkg/install/slack-pw-postrem.sh 2> /dev/null cp $src_pkg/script.preup$scrsuf $pkg/install/slack-pw-preup.sh 2> /dev/null cp $src_pkg/script.postup$scrsuf $pkg/install/slack-pw-postup.sh 2> /dev/null fi find . -type l -exec ls -l {} \; | cut -b59- > $tmp/symlinks if [ ! "`file_size $tmp/symlinks`" = "0" ]; then count=1 line="`sed -n "$count p" $tmp/symlinks`" while [ ! "$line" = "" ]; do link_location="`echo "$line" | cut -f 1 -d " "`" link_location="`dirname $link_location`" link_name="`echo "$line" | cut -f 1 -d ' '`" link_name="`basename "$link_name"`" link_target="`echo "$line" | cut -f 3 -d ' '`" echo "( cd $link_location ; rm -rf $link_name )" >> $pkg/install/doinst.sh echo "( cd $link_location ; ln -sf $link_target $link_name )" >> $pkg/install/doinst.sh count=`expr $count + 1` line="`sed -n "$count p" $tmp/symlinks`" done find . -type l -exec rm -f {} \; fi rm -f $tmp/symlinks* if [ -f $src_pkg/script.postinst$scrsuf ]; then cat $src_pkg/script.postinst$scrsuf >> $pkg/install/doinst.sh 2> /dev/null fi echo -e "$info\n\n$desc" | sed "s}^}$package_name: }" > $pkg/install/slack-desc if [ ! "$disable_pw" = "y" ]; then cp $tmp/package-info-$1 $pkg/install/slack-pw-info cp $pkg/install/doinst.sh $pkg/install/slack-pw-postinst.sh 2> /dev/null required_libs=`find $pkg -type f -perm +111 | xargs ldd 2> /dev/null | grep "=>" | grep "[.]so[.]" | awk '{ print $1 }' | awk 'BEGIN { FS = "[.]so[.]" } { print $1 }' | sort | uniq | tr '\012' ' '` echo "required_libs=\"$required_libs\"" >> $pkg/install/slack-pw-info echo "libraries=\"$required_libs\"" >> $tmp/package-subinfo-$1 if [ ! -d $src_tgz/packages/$architecture ]; then mkdir -p $src_tgz/packages/$architecture fi cp $tmp/package-subinfo-$1 $src_tgz/packages/$architecture/$package_name-$package_version-`echo $package_arch | tr -d -`-$package_build$vendor_id$package_file.ppi stored_package="$src_tgz/packages/$architecture/$package_name-$package_version-`echo $package_arch | tr -d -`-$package_build$vendor_id$package_file.tgz" create_pkg $stored_package $1 else cp $pkg/install/slack-desc $src_tgz/packages/$package_name-$package_version-`echo $package_arch | tr -d -`-$package_build.txt stored_package="$src_tgz/packages/$architecture/$package_name-$package_version-`echo $package_arch | tr -d -`-$package_build.tgz" create_pkg $stored_package $1 fi if [ "$1" = "main" ]; then echo -e "\r${white_on}Made main package.${white_off} " else echo -e "\r${white_on}Made package $1.${white_off} " fi if [ "$print_results" = "y" ]; then echo "Stored package $stored_package." fi } function make_docs() { docdir="$pkg_main/usr/doc/$name-$version" mkdir -p $docdir ( cd $src1 ; eval "cp -af {$docs_source,} $pkg_main/usr/doc/$name-$version > /dev/null 2>&1" ) ( cd $src_pkg ; eval "cp -af {$docs_cwd,} $pkg_main/usr/doc/$name-$version > /dev/null 2>&1" ) } function create_pkg() { if [ "`id -u`" = "0" ]; then /usr/src/tgz/lib/builder.mkpkg $1 $tmp `basename $1 .tgz` $reset_own $reset_fil $tmp/ch_script-$2 $strip_bin else fakeroot "/usr/src/tgz/lib/builder.mkpkg $1 $tmp `basename $1 .tgz` $reset_own $reset_fil $tmp/ch_script-$2 $strip_bin" fi } function subpackage() { if [ ! "$first_subpackage" = "n" ]; then echo -en "${white_on}Preparing subpackages...${white_off}" first_subpackage=n fi source $src_pkg/package-info-$1 subpkg="$tmp/packages/$package" mkdir -p $subpkg if [ "$noarch" = "y" ]; then architecture="noarch" fi cat $src_pkg/package-files-$1 | while read line; do eval "entry=\"$line\"" entdir="`dirname $entry`" mkdir -p $subpkg/$entdir mv $pkg_main/$entry $subpkg/$entdir > /dev/null 2>&1 done write_info $1 source $tmp/package-info-main ### source $tmp/package-subinfo-main ### } function build_info() { build_info="$build_info$1" } function apply_patch() { echo -n "Applying patch $1..." if [ -r "$src_pkg/$name-$1.pw.patch" ]; then apatch="$name-$1.pw.patch" elif [ -r "$src_pkg/$1" ]; then apatch="$1" else echo -e "\r${red_on}Patch $1 not found.${red_off} " return fi if [ "$2" = "" ]; then level="0" else level="$2" fi if [ "$3" = "" ]; then srct="$src1" else eval "srct=\$src$3" fi case $apatch in *.gz) ( cd $srct ; zcat $src_pkg/$apatch | patch -p$level > /dev/null 2>&1 ) ;; *.bz2) ( cd $srct ; bzcat $src_pkg/$apatch | patch -p$level > /dev/null 2>&1 ) ;; *) ( cd $srct ; patch -p$level < $src_pkg/$apatch > /dev/null 2>&1 ) ;; esac if [ "$?" = "0" ]; then echo -e "\rApplied patch $1. " else echo -e "\r${red_on}Patch $1 failed.${red_off} " fi } function change_mod() { echo "chmod $3 $tmp/packages/$1/$2" >> $tmp/ch_script-$1 } function change_own() { echo "chown $3 $tmp/packages/$1/$2" >> $tmp/ch_script-$1 } function replace_regexp() { sed "s}$2}$3}g" $1 > $tmp/replace.tmp cat $tmp/replace.tmp > $1 rm -f $tmp/replace.tmp } function copy() { if [ ! -d "$2" ]; then mkdir -p "$2" fi cp $1 $2/$3 } @ 1.21 log @- Fixed a bug (made by fixing the previous bug :)) causing pwbuilder just not to work. @ text @d761 6 d769 5 a773 5 cp $src_pkg/script.preinst $pkg/install/slack-pw-preinst.sh 2> /dev/null cp $src_pkg/script.prerem $pkg/install/slack-pw-prerem.sh 2> /dev/null cp $src_pkg/script.postrem $pkg/install/slack-pw-postrem.sh 2> /dev/null cp $src_pkg/script.preup $pkg/install/slack-pw-preup.sh 2> /dev/null cp $src_pkg/script.postup $pkg/install/slack-pw-postup.sh 2> /dev/null d781 2 a782 2 count=1 line="`sed -n "$count p" $tmp/symlinks`" d784 1 a784 1 while [ ! "$line" = "" ]; do d786 1 a786 1 link_location="`echo "$line" | cut -f 1 -d " "`" d804 1 a804 1 if [ -f $src_pkg/script.postinst ]; then d806 1 a806 1 cat $src_pkg/script.postinst >> $pkg/install/doinst.sh 2> /dev/null @ 1.20 log @- Fixed a bug causing pwbuilder not to strip binaries. - Version 0.5.14. @ text @d874 1 a874 1 fakeroot "/usr/src/tgz/lib/builder.mkpkg $1 `basename $1 .tgz` $tmp $package_file $reset_own $reset_fil $tmp/ch_script-$2 $strip_bin" @ 1.19 log @- Fixed suffix handling. @ text @d870 1 a870 1 /usr/src/tgz/lib/builder.mkpkg $1 $tmp $package_file $reset_own $reset_fil $tmp/ch_script-$2 $strip_bin d874 1 a874 1 fakeroot "/usr/src/tgz/lib/builder.mkpkg $1 $tmp $package_file $reset_own $reset_fil $tmp/ch_script-$2 $strip_bin" @ 1.18 log @- Changed the way package files' names are created. - Fixed script.postinst handling. - Version 0.5.13. @ text @d39 1 a39 1 pw_ver="@@VERSION@@" d248 6 @ 1.17 log @- Fixed building for architectures with dash in their names. @ text @d91 2 d555 10 a564 1 package="$package-$1" d792 5 a796 1 cat $src_pkg/script.postinst >> $pkg/install/doinst.sh 2> /dev/null d816 1 a816 1 cp $tmp/package-subinfo-$1 $src_tgz/packages/$architecture/$package_file-$package_version-`echo $package_arch | tr -d -`-$package_build$vendor_id.ppi d818 1 a818 1 stored_package="$src_tgz/packages/$architecture/$package_file-$package_version-`echo $package_arch | tr -d -`-$package_build$vendor_id.tgz" @ 1.16 log @- Fixed a bug in builder.defs causing script.postinst not to be copied if package has no symlinks. @ text @d138 1 a138 1 build_host="--host=$architecture-pc-linux-gnu" d783 1 a783 1 echo -e "$info\n\n$desc" | sed "s}^}$package_file: }" > $pkg/install/slack-desc d801 1 a801 1 cp $tmp/package-subinfo-$1 $src_tgz/packages/$architecture/$package_file-$package_version-$package_arch-$package_build$vendor_id.ppi d803 1 a803 1 stored_package="$src_tgz/packages/$architecture/$package_file-$package_version-$package_arch-$package_build$vendor_id.tgz" d809 1 a809 1 cp $pkg/install/slack-desc $src_tgz/packages/$package_name-$package_version-$package_arch-$package_build.txt d811 1 a811 1 stored_package="$src_tgz/packages/$architecture/$package_name-$package_version-$package_arch-$package_build.tgz" @ 1.15 log @- Pass "--program-prefix= --program-suffix= i386-slackware-linux" to configure script if disable_pw is set. - When creating install script, put symlinks creation instructions before supplied script.postinst code. - Version 0.5.12. @ text @a776 2 cat $src_pkg/script.postinst >> $pkg/install/doinst.sh 2> /dev/null d781 3 a783 1 echo -e "$info\n\n$desc" | sed "s}^}$package_name: }" > $pkg/install/slack-desc @ 1.14 log @- Removed forgotten debug code. @ text @d132 9 a140 1 build_host="--host=$architecture-pc-linux-gnu" a753 2 cp $src_pkg/script.postinst $pkg/install/doinst.sh 2> /dev/null d768 2 a769 2 echo "( cd $link_location ; rm -rf $link_name )" >> $tmp/symlinks.script echo "( cd $link_location ; ln -sf $link_target $link_name )" >> $tmp/symlinks.script a774 1 cat $tmp/symlinks.script >> $pkg/install/doinst.sh d776 2 @ 1.13 log @- Set variables telling about Slackware version: slackver (x.y), slackver_max (x.y.z), slackver_maj (x), slackver_min (y), slackver_pat (z), slackver_ext ('beta' or anything else after '-', or just nothing). - Version 0.5.11, prerelease. @ text @d136 1 a136 1 slackver="`cat ~/slacks/$i | sed 's}Slackware }}' | cut -f 1 -d ' '`" @ 1.12 log @- Set proper directory for sources without top directory. @ text @d136 25 @ 1.11 log @- Added support for all architectures supported by GCC 3. @ text @d374 1 @ 1.10 log @- Proper handling of sources without top directory when there is more than one of that kind of sources. @ text @d101 21 a121 30 if [ "$architecture" = "i486" ]; then export AM_CFLAGS="-march=i486 -mcpu=i686" export AM_CPPFLAGS="-march=i486 -mcpu=i686" export AM_CXXFLAGS="-march=i486 -mcpu=i686" elif [ "$architecture" = "i586" ]; then export AM_CFLAGS="-march=i586 -mcpu=i686" export AM_CPPFLAGS="-march=i586 -mcpu=i686" export AM_CXXFLAGS="-march=i586 -mcpu=i686" elif [ "$architecture" = "i686" ]; then export AM_CFLAGS="-march=i686 -mcpu=i686" export AM_CPPFLAGS="-march=i686 -mcpu=i686" export AM_CXXFLAGS="-march=i686 -mcpu=i686" elif [ "$architecture" = "k6" ]; then export AM_CFLAGS="-march=k6 -mcpu=k6" export AM_CPPFLAGS="-march=k6 -mcpu=k6" export AM_CXXFLAGS="-march=k6 -mcpu=k6" elif [ "$architecture" = "k7" -o "$architecture" = "athlon" ]; then export AM_CFLAGS="-march=k7 -mcpu=k7" export AM_CPPFLAGS="-march=k7 -mcpu=k7" export AM_CXXFLAGS="-march=k7 -mcpu=k7" architecture="k7" @ 1.9 log @- Fixed a bug that if more than one parameter to do_configure, do_make, do_install, do_python_make or do_python_install were given, only the first one was used. @ text @d339 8 d379 6 @ 1.8 log @- Fixed displaying welcome message (break lines correctly). @ text @d526 1 a526 1 ./configure `cat pwbuilder-configure_options` $1 $build_host d530 1 a530 1 ( ./configure `cat pwbuilder-configure_options` $1 $build_host ) > /dev/null d552 1 a552 1 make `cat pwbuilder-make_options` $1 d556 1 a556 1 ( make `cat pwbuilder-make_options` $1 ) > /dev/null d578 1 a578 1 python ./setup.py build `cat pwbuilder-make_options` $1 d582 1 a582 1 ( python ./setup.py build `cat pwbuilder-make_options` $1 ) > /dev/null d604 1 a604 1 make `cat pwbuilder-install_options` install $1 d608 1 a608 1 ( make `cat pwbuilder-install_options` install $1 ) > /dev/null d630 1 a630 1 python ./setup.py install `cat pwbuilder-install_options` $1 d634 1 a634 1 ( python ./setup.py install `cat pwbuilder-install_options` $1 ) > /dev/null @ 1.7 log @- Defined doc_dir variable that equals to $pkg_main/usr/doc/$name-$version. @ text @d48 2 a49 1 echo "${white_on}TGZ packages building system\nCopyright (c) 2002 Jaroslaw Swierczynski ${white_off}" @ 1.6 log @- Now it is possible to pass extra parameters to do_configure, do_make, do_install, do_python_make and do_python_install, which will be passed to command invoked by these directives. - If we have a standard pw patch ($name-what.pw.patch), then it is possible to write only "apply_patch what" instead of "apply_patch $name-what.pw.patch. @ text @d73 1 @ 1.5 log @- Changed usr/lib/mc to usr/share/mc to conform latest mc version. - Check for mc before doing anything in its configuration files. - Display build number in a starting message when building. @ text @d524 1 a524 1 ./configure `cat pwbuilder-configure_options` $build_host d528 1 a528 1 ( ./configure `cat pwbuilder-configure_options` $build_host ) > /dev/null d550 1 a550 1 make `cat pwbuilder-make_options` d554 1 a554 1 ( make `cat pwbuilder-make_options` ) > /dev/null d576 1 a576 1 python ./setup.py build `cat pwbuilder-make_options` d580 1 a580 1 ( python ./setup.py build `cat pwbuilder-make_options` ) > /dev/null d602 1 a602 1 make `cat pwbuilder-install_options` install d606 1 a606 1 ( make `cat pwbuilder-install_options` install ) > /dev/null d628 1 a628 1 python ./setup.py install `cat pwbuilder-install_options` d632 1 a632 1 ( python ./setup.py install `cat pwbuilder-install_options` ) > /dev/null d867 9 a875 1 if [ ! -r "$src_pkg/$1" ]; then d902 1 a902 1 case $1 in d904 3 a906 3 *.gz) ( cd $srct ; zcat $src_pkg/$1 | patch -p$level > /dev/null 2>&1 ) ;; *.bz2) ( cd $srct ; bzcat $src_pkg/$1 | patch -p$level > /dev/null 2>&1 ) ;; *) ( cd $srct ; patch -p$level < $src_pkg/$1 > /dev/null 2>&1 ) ;; @ 1.4 log @- Call python explicitly with do_python_make and do_python_install as ./setup.py is not executable. @ text @d41 6 d49 1 a49 1 echo -ne "\n${white_on}Building $title version $version for " a87 6 if [ ! "$build_number" = "" ]; then build="$build_number" fi @ 1.3 log @- Added force_verbose function. This allows to override --auto passed to buildpkg. - Added support for home_site variable in packages informations. - Added do_python_make and do_python_install. These do the same as "./setup.py build" and "./setup.py install" with parameters given with make_option and install_option. - Fixed messages displaying. - Version pre of 0.5.10. @ text @d576 1 a576 1 ./setup.py build `cat pwbuilder-make_options` d580 1 a580 1 ( ./setup.py build `cat pwbuilder-make_options` ) > /dev/null d628 1 a628 1 ./setup.py install `cat pwbuilder-install_options` d632 1 a632 1 ( ./setup.py install `cat pwbuilder-install_options` ) > /dev/null @ 1.2 log @- Added force_verbose function. This allows to override --auto passed to buildpkg. - Added support for home_site variable in packages informations. - Fixed displaying messages. @ text @d568 26 d607 26 @ 1.1 log @- Initial release. - Version 0.5.9. @ text @d177 6 d237 1 d257 1 @ .