diff options
Diffstat (limited to 'system/mongodb/mongodb.SlackBuild')
-rw-r--r-- | system/mongodb/mongodb.SlackBuild | 34 |
1 files changed, 32 insertions, 2 deletions
diff --git a/system/mongodb/mongodb.SlackBuild b/system/mongodb/mongodb.SlackBuild index 346b0da531..7d0fa83b51 100644 --- a/system/mongodb/mongodb.SlackBuild +++ b/system/mongodb/mongodb.SlackBuild @@ -4,7 +4,7 @@ # Home Page http://www.mongodb.org PRGNAM="mongodb" -VERSION=${VERSION:-2.6.1} +VERSION=${VERSION:-2.6.3} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -21,8 +21,35 @@ TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} +MONGO_USER=${MONGO_USER:-285} +MONGO_GROUP=${MONGO_GROUP:-285} + set -e +# Bail if user or group isn't valid on your system +if ! getent passwd mongo 1>/dev/null 2>/dev/null; then + +cat << EOF + + You must have a mongo user to run this script + + # groupadd -g $MONGO_USER mongo + # useradd -u $MONGO_USER -d /var/lib/$PRGNAM -s /bin/false -g mongo mongo + +EOF + + exit +elif ! getent group mongo 1>/dev/null 2>/dev/null; then + +cat << EOF + + You must have a mongo group to run this script + # groupadd -g $MONGO_GROUP mongo + +EOF + exit +fi + rm -fr $TMP/$PRGNAM-$VERSION $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP @@ -33,7 +60,7 @@ find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ -o -perm 511 \) -exec chmod 755 {} \; -o \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ - -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; mkdir -p ${PKG}/usr/doc/${PRGNAM}-${VERSION} cp GNU-AGPL-3.0 README THIRD-PARTY-NOTICES ${PKG}/usr/doc/${PRGNAM}-${VERSION} @@ -47,5 +74,8 @@ mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/doinst.sh > $PKG/install/doinst.sh +mkdir -p $PKG/var/lib/mongodb +chown mongo.mongo $PKG/var/lib/mongodb + cd $PKG /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} |