summaryrefslogtreecommitdiff
path: root/network/nginx/nginx.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'network/nginx/nginx.SlackBuild')
-rw-r--r--network/nginx/nginx.SlackBuild42
1 files changed, 17 insertions, 25 deletions
diff --git a/network/nginx/nginx.SlackBuild b/network/nginx/nginx.SlackBuild
index ccac530163..bb581e2bb8 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}