diff options
author | Diogo Leal <diogo@diogoleal.com> | 2011-11-12 13:37:31 -0600 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2011-11-15 15:04:12 -0600 |
commit | 60301cdf09058f5e0e143c41a4b9cf030394747f (patch) | |
tree | 93a3eb6a22e30de2f1c459213f74659be72ec69a /network/nginx/nginx.SlackBuild | |
parent | 45392b5eebd0c391a9de5c94a2779a68b0d6aac9 (diff) |
network/nginx: Updated for version 1.0.9.
This commit includes changes by rworkman, and Kent Fritz
deserves some thanks for pointing out a bug with variable
assignment of NGINX_USER and NGINX_GROUP.
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'network/nginx/nginx.SlackBuild')
-rw-r--r-- | network/nginx/nginx.SlackBuild | 42 |
1 files changed, 17 insertions, 25 deletions
diff --git a/network/nginx/nginx.SlackBuild b/network/nginx/nginx.SlackBuild index ccac530163b3..bb581e2bb8a0 100644 --- a/network/nginx/nginx.SlackBuild +++ b/network/nginx/nginx.SlackBuild @@ -25,7 +25,7 @@ # Modified by Diogo Leal <diogo@diogoleal.com> PRGNAM=nginx -VERSION=${VERSION:-1.0.8} +VERSION=${VERSION:-1.0.9} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -81,8 +81,8 @@ CXXFLAGS="$SLKCFLAGS" \ --conf-path=/etc/nginx/nginx.conf \ --pid-path=/var/run/nginx.pid \ --lock-path=/var/lock/nginx \ - --user=${NGINXUSER:-nobody} \ - --group=${NGINXGROUP:-nogroup} \ + --user=${NGINXUSER:=nobody} \ + --group=${NGINXGROUP:=nogroup} \ --error-log-path=/var/log/nginx/error.log \ --http-log-path=/var/log/nginx/access.log \ --with-rtsig_module \ @@ -111,10 +111,8 @@ CXXFLAGS="$SLKCFLAGS" \ make make install DESTDIR=$PKG -find $PKG | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \ - xargs strip --strip-unneeded 2> /dev/null || true -find $PKG | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \ - xargs strip --strip-unneeded 2> /dev/null || true +find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | \ + grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true find $PKG -name perllocal.pod -o -name ".packlist" -o -name "*.bs" | \ xargs rm -f 2> /dev/null find $PKG -perm 444 -exec chmod 0644 {} \; @@ -131,30 +129,24 @@ cat $CWD/rc.nginx > $PKG/etc/rc.d/rc.nginx.new mkdir -p $PKG/etc/logrotate.d cat $CWD/nginx.logrotate > $PKG/etc/logrotate.d/nginx.new +# Don't clobber config files +for file in fastcgi_params fastcgi.conf mime.types nginx.conf \ + koi-utf koi-win scgi_params uwsgi_params win-utf ; do + mv $PKG/etc/nginx/$file $PKG/etc/nginx/$file.new ; +done + +# Create the log dir and set the permissions +mkdir -p $PKG/var/log/nginx +chown $NGINXUSER:$NGINXGROUP $PKG/var/log/nginx +chmod 750 $PKG/var/log/nginx + mkdir -p $PKG/usr/doc/nginx-$VERSION -cp -a CHANGES CHANGES.ru LICENSE README $PKG/usr/doc/nginx-$VERSION +cp -a CHANGES* LICENSE README $PKG/usr/doc/nginx-$VERSION cat $CWD/nginx.SlackBuild > $PKG/usr/doc/nginx-$VERSION/nginx.SlackBuild mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/doinst.sh > $PKG/install/doinst.sh -cat << EOF >> $PKG/install/doinst.sh - -# Create the log dir and set the permissions -if [ ! -d /var/log/nginx ]; then - mkdir -p /var/log/nginx - chown $NGINXUSER:$NGINXGROUP /var/log/nginx - chmod 750 /var/log/nginx -fi -EOF - -# Let's not clobber config files on upgrade -( cd $PKG/etc/nginx - for i in fastcgi_params mime.types nginx.conf koi-utf koi-win win-utf; do - mv $i $i.new; - echo "config etc/nginx/$i.new" >> $PKG/install/doinst.sh; - done -) cd $PKG /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} |