diff options
author | rhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58> | 2008-12-16 21:34:14 +0000 |
---|---|---|
committer | rhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58> | 2008-12-16 21:34:14 +0000 |
commit | 535a7ebb86782ad125545d6d2595a619e1ce6ffb (patch) | |
tree | a761f705e5c04b1700b7ed7fcdc15eeb9e9fd947 /trunk/src | |
parent | e4698a98d3fb4bb8767f00a161c6300b2c3d633c (diff) | |
download | simplepkg-535a7ebb86782ad125545d6d2595a619e1ce6ffb.tar.gz simplepkg-535a7ebb86782ad125545d6d2595a619e1ce6ffb.tar.bz2 |
added CREATEPKG_AUTHOR config parameter
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@668 04377dda-e619-0410-9926-eae83683ac58
Diffstat (limited to 'trunk/src')
-rw-r--r-- | trunk/src/createpkg | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/trunk/src/createpkg b/trunk/src/createpkg index 90029f9..87fa202 100644 --- a/trunk/src/createpkg +++ b/trunk/src/createpkg @@ -260,6 +260,7 @@ function load_parameters { COLOR_MODE="`eval_parameter COLOR_MODE none`" CREATEPKG_ARCH="`eval_parameter CREATEPKG_ARCH $(default_arch)`" CREATEPKG_CLEANUP="`eval_parameter CREATEPKG_CLEANUP yes`" + CREATEPKG_AUTHOR="`eval_parameter CREATEPKG_AUTHOR`" TMP="`eval_parameter TMP /tmp`" REMOVE_OLD_PACKAGE="`eval_boolean_parameter REMOVE_OLD_PACKAGE $off`" @@ -665,10 +666,25 @@ handle_error $? $PACKAGE # Get package name, arch, version and build number PKG_NAME="`ls -1 -c $PACKAGES_DIR/$PACKAGE-*-*-*.tgz | head -n 1 | xargs basename`" +PACKAGE_NAME="`package_name $PKG_NAME`" PACKAGE_VERSION="`package_version $PKG_NAME`" PACKAGE_ARCH="`package_arch $PKG_NAME`" PACKAGE_BUILD="`package_build $PKG_NAME`" +if [ ! -z "$CREATEPKG_AUTHOR" ]; then + AUTHOR="`echo $PACKAGE_BUILD | sed -e 's/^[0-9]*//'`" + if [ "$AUTHOR" != "$CREATEPKG_AUTHOR" ]; then + echo "Changing package build author..." + BUILD_NUMBER="`echo $PACKAGE_BUILD | sed -e "s/$AUTHOR$//"`" + NEW_BUILD="$BUILD_NUMBER""$CREATEPKG_AUTHOR" + mv $PACKAGES_DIR/$PKG_NAME $PACKAGES_DIR/$PACKAGE_NAME-$PACKAGE_VERSION-$PACKAGE_ARCH-$NEW_BUILD.tgz + PKG_NAME="$PACKAGE_NAME-$PACKAGE_VERSION-$PACKAGE_ARCH-$NEW_BUILD.tgz" + PACKAGE_BUILD="$NEW_BUILD" + AUTHOR="$CREATEPKG_AUTHOR" + echo "New package name is $PKG_NAME." + fi +fi + # Select repository directory if [ $MOVE_BIN_PACKAGE -eq $on ]; then SUBFOLDER="$( echo ${SCRIPT_BASE#$SLACKBUILDS_DIR/} )" |