# # ~/.src2pkg/extensions/13.post # Copyright 2009 Gilbert Ashley # This code is released under GPL license version 2. # This src2pkg extension is useful when running src2pkg on vector linux systems. # It adds extra lines to the slack-desc file inside the package. These lines # provide extra information about who created the package and what options # were used to configure the sources # As with all src2pkg extensions, this file should be placed in the directory: # $HOME/.src2pkg/extensions (which you'll have to create first) # You must also enable user extensions to src2pkg by uncommenting the line: # ALLOW_USER_EXTENSIONS="YES" # in your /etc/src2pkg/src2pkg.conf file # For this extension to work, you also need to place a line like this: # VL_PACKAGER=myname # in your /etc/src2pkg/src2pkg.conf file # Of course the line must be uncommented (no '#' at the beginning of the line) # You may want or need to have VL_PACKAGER be the same as the standard # src2pkg variable called 'SIG'. SIG is a tag or signature which gets added onto # the BUILD variable as part of the final package name. If these should be the same, # then instead of placing a line with the VL_PACKAGER variable in your src2pkg.conf # file, simply set the SIG variable to whatever name or initials you widh to use as # your VL_PACKAGER value and uncomment the following line: # ! [[ $VL_PACKAGER ]] && VL_PACKAGER=$SIG # src2pkg doesn't use the VL_PACKAGER variable anywhere in the normal code. # It does use SIG in many places though, so if VL_PACKAGER and SIG should # be the same, it will be much easier to uncomment the line above and simply set # the SIG variable in your src2pkg.conf file. # comments or suggestions for improvement to this extension are welcome at the # email address shown above. Please include 'src2pkg' in the email subject line. if [[ $VL_PACKAGER != "" ]] && [[ -f /etc/vector-version ]] ; then echo -n $BLUE"Adding VL Build Info to $PKG_DESC - "$NORMAL echo "" >> $PKG_DIR/install/$PKG_DESC echo "" >> $PKG_DIR/install/$PKG_DESC echo "" >> $PKG_DIR/install/$PKG_DESC echo "#----------------------------------------" >> $PKG_DIR/install/$PKG_DESC echo "" BUILDDATE: $(date) >> $PKG_DIR/install/$PKG_DESC echo "" PACKAGER: $VL_PACKAGER >> $PKG_DIR/install/$PKG_DESC echo "" HOST: $(uname -srm) >> $PKG_DIR/install/$PKG_DESC echo "" DISTRO: $(cat /etc/vector-version) >> $PKG_DIR/install/$PKG_DESC echo "" CFLAGS: $CFLAGS >> $PKG_DIR/install/$PKG_DESC echo "" LDFLAGS: $LDFLAGS >> $PKG_DIR/install/$PKG_DESC CONFIGURE=$(grep "$CONFIG_DIR/configure" $CONFIG_DIR/config.log 2> /dev/null |head -n 1) CONFIGURE=${CONFIGURE#*configure} echo "CONFIGURE: ./configure $CONFIGURE" >> $PKG_DIR/install/$PKG_DESC # The three lines above should usually provide the actual configuration options passed # to the configure script, including ones which the script itself adds. It might be more # useful to only show the options which the user provides. That could be done by # substituting the above three lines with the following: # echo "CONFIGURE: $CONFIG_COMMAND --prefix=$PRE_FIX $EXTRA_CONFIGS" >> $PKG_DIR/install/$PKG_DESC echo $GREEN"Done"$NORMAL fi