xbps-src: added -V flag to print code version, add new obj into pkg metadata for that.

This commit is contained in:
Juan RP 2011-11-09 20:58:42 +01:00
parent fad78ea7f1
commit 688accec67
2 changed files with 5 additions and 2 deletions

View file

@ -313,6 +313,8 @@ _EOF
<string>$short_desc</string>
<key>long_desc</key>
<string>$long_desc</string>
<key>packaged-with</key>
<string>xbps-src $XBPS_SRC_BUILD_VERSION</string>
_EOF
#
# If package sets $dkms_modules, add dkms rundep.

View file

@ -23,7 +23,7 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#-
readonly XBPS_SRC_BUILD_VERSION=20111109
XBPS_CONFIG_FILE=@@XBPS_INSTALL_ETCDIR@@/xbps-src.conf
PROGNAME=$(basename $0)
@ -227,7 +227,7 @@ check_config_vars()
#
# main()
#
while getopts "CBc:DhKm:p:Ss:" opt; do
while getopts "CBc:DhKm:p:Ss:V" opt; do
case $opt in
B) export BUILD_BINPKG=1;;
C) export KEEP_WRKSRC=1;;
@ -251,6 +251,7 @@ while getopts "CBc:DhKm:p:Ss:" opt; do
;;
S) UNSET_PREFER_BINPKG_DEPS=1;;
s) export XBPS_SRCDISTDIR="$OPTARG";;
V) echo $XBPS_SRC_BUILD_VERSION && exit 0;;
--) shift; break;;
esac
done