aboutsummaryrefslogtreecommitdiff
path: root/libraries
diff options
context:
space:
mode:
authorHeinz Wiesinger <pprkut@slackbuilds.org>2013-11-25 12:23:31 +0100
committerHeinz Wiesinger <pprkut@slackbuilds.org>2013-11-25 13:11:59 +0100
commit926b93d445e92be03e62efcd742b2ac88f0d96ed (patch)
treea9e1e616e37f2f7187d0b0ab2d8e83b3ad8eed63 /libraries
parent7bc7feac90a3966ebaea1b1ad87431764a560344 (diff)
various: Replace chmod command with find command from template.
Signed-off-by: Heinz Wiesinger <pprkut@slackbuilds.org>
Diffstat (limited to 'libraries')
-rw-r--r--libraries/AMD/AMD.SlackBuild6
-rw-r--r--libraries/BTF/BTF.SlackBuild6
-rw-r--r--libraries/CAMD/CAMD.SlackBuild6
-rw-r--r--libraries/CCOLAMD/CCOLAMD.SlackBuild6
-rw-r--r--libraries/CHOLMOD/CHOLMOD.SlackBuild6
-rw-r--r--libraries/COLAMD/COLAMD.SlackBuild6
-rw-r--r--libraries/CSparse/CSparse.SlackBuild6
-rw-r--r--libraries/CXSparse/CXSparse.SlackBuild6
-rw-r--r--libraries/KLU/KLU.SlackBuild6
-rw-r--r--libraries/LDL/LDL.SlackBuild6
-rw-r--r--libraries/OpenAL/OpenAL.SlackBuild6
-rw-r--r--libraries/PyXML/PyXML.SlackBuild6
-rw-r--r--libraries/RBio/RBio.SlackBuild6
-rw-r--r--libraries/SDL_Pango/SDL_Pango.SlackBuild6
-rw-r--r--libraries/SDL_sound/SDL_sound.SlackBuild6
-rw-r--r--libraries/SPQR/SPQR.SlackBuild6
-rw-r--r--libraries/UFconfig/UFconfig.SlackBuild6
-rw-r--r--libraries/UMFPACK/UMFPACK.SlackBuild6
-rw-r--r--libraries/adodb/adodb.SlackBuild6
-rw-r--r--libraries/afflib/afflib.SlackBuild6
-rw-r--r--libraries/allegro/allegro.SlackBuild6
-rw-r--r--libraries/aubio/aubio.SlackBuild6
-rw-r--r--libraries/barry/barry.SlackBuild6
-rw-r--r--libraries/cairomm/cairomm.SlackBuild6
-rw-r--r--libraries/cln/cln.SlackBuild6
-rw-r--r--libraries/cracklib/cracklib.SlackBuild6
-rw-r--r--libraries/exiftool/exiftool.SlackBuild6
-rw-r--r--libraries/freealut/freealut.SlackBuild6
-rw-r--r--libraries/ftgl/ftgl.SlackBuild6
-rw-r--r--libraries/ggz-base-libs/ggz-base-libs.SlackBuild6
-rw-r--r--libraries/glibmm/glibmm.SlackBuild6
-rw-r--r--libraries/goffice/goffice.SlackBuild6
-rw-r--r--libraries/gst1-libav/gst1-libav.SlackBuild6
-rw-r--r--libraries/gstreamermm/gstreamermm.SlackBuild6
-rw-r--r--libraries/gtkglarea/gtkglarea.SlackBuild6
-rw-r--r--libraries/gtkmm-utils/gtkmm-utils.SlackBuild6
-rw-r--r--libraries/gtkmm/gtkmm.SlackBuild6
-rw-r--r--libraries/gtkmm3/gtkmm3.SlackBuild6
-rw-r--r--libraries/gts/gts.SlackBuild6
-rw-r--r--libraries/guichan/guichan.SlackBuild6
-rw-r--r--libraries/id3lib/id3lib.SlackBuild6
-rw-r--r--libraries/jbigkit/jbigkit.SlackBuild6
-rw-r--r--libraries/json-glib/json-glib.SlackBuild6
-rw-r--r--libraries/lablgtk/lablgtk.SlackBuild6
-rw-r--r--libraries/lastfmlib/lastfmlib.SlackBuild6
-rw-r--r--libraries/lensfun/lensfun.SlackBuild6
-rw-r--r--libraries/libatomic_ops/libatomic_ops.SlackBuild6
-rw-r--r--libraries/libavc1394/libavc1394.SlackBuild6
-rw-r--r--libraries/libburn/libburn.SlackBuild6
-rw-r--r--libraries/libcitadel/libcitadel.SlackBuild6
-rw-r--r--libraries/libcli/libcli.SlackBuild6
-rw-r--r--libraries/libcue/libcue.SlackBuild6
-rw-r--r--libraries/libdaemon/libdaemon.SlackBuild6
-rw-r--r--libraries/libdbi-drivers/libdbi-drivers.SlackBuild6
-rw-r--r--libraries/libdbi/libdbi.SlackBuild6
-rw-r--r--libraries/libdbus-c++/libdbus-c++.SlackBuild6
-rw-r--r--libraries/libdca/libdca.SlackBuild6
-rw-r--r--libraries/libdv/libdv.SlackBuild6
-rw-r--r--libraries/libdvdnav/libdvdnav.SlackBuild6
-rw-r--r--libraries/libesmtp/libesmtp.SlackBuild6
-rw-r--r--libraries/libetpan/libetpan.SlackBuild6
-rw-r--r--libraries/libewf/libewf.SlackBuild6
-rw-r--r--libraries/libexif-gtk/libexif-gtk.SlackBuild6
-rw-r--r--libraries/libfprint/libfprint.SlackBuild6
-rw-r--r--libraries/libgdiplus/libgdiplus.SlackBuild6
-rw-r--r--libraries/libglademm/libglademm.SlackBuild6
-rw-r--r--libraries/libglpng/libglpng.SlackBuild6
-rw-r--r--libraries/libgnomecanvasmm/libgnomecanvasmm.SlackBuild6
-rw-r--r--libraries/libgsasl/libgsasl.SlackBuild6
-rw-r--r--libraries/libhoard/libhoard.SlackBuild6
-rw-r--r--libraries/libiec61883/libiec61883.SlackBuild6
-rw-r--r--libraries/libircclient/libircclient.SlackBuild6
-rw-r--r--libraries/libisofs/libisofs.SlackBuild6
-rw-r--r--libraries/liblo/liblo.SlackBuild6
-rw-r--r--libraries/liblqr/liblqr.SlackBuild6
-rw-r--r--libraries/liblrdf/liblrdf.SlackBuild6
-rw-r--r--libraries/libmaa/libmaa.SlackBuild6
-rw-r--r--libraries/libmirage/libmirage.SlackBuild6
-rw-r--r--libraries/libmms/libmms.SlackBuild6
-rw-r--r--libraries/libmp4v2/libmp4v2.SlackBuild6
-rw-r--r--libraries/libmspack/libmspack.SlackBuild6
-rw-r--r--libraries/libofx/libofx.SlackBuild6
-rw-r--r--libraries/liboop/liboop.SlackBuild8
-rw-r--r--libraries/libotr/libotr.SlackBuild6
-rw-r--r--libraries/libpano13/libpano13.SlackBuild6
-rw-r--r--libraries/libpar2/libpar2.SlackBuild6
-rw-r--r--libraries/libquicktime/libquicktime.SlackBuild6
-rw-r--r--libraries/librcd/librcd.SlackBuild6
-rw-r--r--libraries/librelp/librelp.SlackBuild6
-rw-r--r--libraries/librsync/librsync.SlackBuild6
-rw-r--r--libraries/libsidplay2/libsidplay2.SlackBuild6
-rw-r--r--libraries/libsieve/libsieve.SlackBuild6
-rw-r--r--libraries/libsmbios/libsmbios.SlackBuild6
-rw-r--r--libraries/libtorrent-rasterbar/libtorrent-rasterbar.SlackBuild6
-rw-r--r--libraries/libtorrent/libtorrent.SlackBuild6
-rw-r--r--libraries/libvdpau/libvdpau.SlackBuild6
-rw-r--r--libraries/libvmime/libvmime.SlackBuild6
-rw-r--r--libraries/libwebp/libwebp.SlackBuild6
-rw-r--r--libraries/libx86emu/libx86emu.SlackBuild6
-rw-r--r--libraries/libxmi/libxmi.SlackBuild6
-rw-r--r--libraries/libxmp/libxmp.SlackBuild6
-rw-r--r--libraries/lilv/lilv.SlackBuild6
-rw-r--r--libraries/meanwhile/meanwhile.SlackBuild6
-rw-r--r--libraries/ocaml-camomile/ocaml-camomile.SlackBuild6
-rw-r--r--libraries/ocaml-findlib/ocaml-findlib.SlackBuild6
-rw-r--r--libraries/ode/ode.SlackBuild6
-rw-r--r--libraries/openbabel/openbabel.SlackBuild6
-rw-r--r--libraries/openjpeg/openjpeg.SlackBuild6
-rw-r--r--libraries/pangomm/pangomm.SlackBuild6
-rw-r--r--libraries/physfs/physfs.SlackBuild6
-rw-r--r--libraries/purple-plugin_pack/purple-plugin_pack.SlackBuild6
-rw-r--r--libraries/quesoglc/quesoglc.SlackBuild6
-rw-r--r--libraries/rlog/rlog.SlackBuild6
-rw-r--r--libraries/rrdtool/rrdtool.SlackBuild6
-rw-r--r--libraries/serd/serd.SlackBuild6
-rw-r--r--libraries/sord/sord.SlackBuild6
-rw-r--r--libraries/sratom/sratom.SlackBuild6
-rw-r--r--libraries/suil/suil.SlackBuild6
-rw-r--r--libraries/swfdec/swfdec.SlackBuild6
-rw-r--r--libraries/tls/tls.SlackBuild6
-rw-r--r--libraries/wxPython/wxPython.SlackBuild6
-rw-r--r--libraries/xalan-c/xalan-c.SlackBuild6
-rw-r--r--libraries/xerces-c/xerces-c.SlackBuild6
-rw-r--r--libraries/zend-opcache/zend-opcache.SlackBuild6
124 files changed, 621 insertions, 125 deletions
diff --git a/libraries/AMD/AMD.SlackBuild b/libraries/AMD/AMD.SlackBuild
index 989dfb9fe83b..9ee2edba71af 100644
--- a/libraries/AMD/AMD.SlackBuild
+++ b/libraries/AMD/AMD.SlackBuild
@@ -49,7 +49,11 @@ rm -rf $PRGNAM
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM
chown -R root:root .
-chmod -R u+w,go+r-w,a-st .
+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 {} \;
patch -p1 < $CWD/autotoolize.diff
autoreconf -vif
diff --git a/libraries/BTF/BTF.SlackBuild b/libraries/BTF/BTF.SlackBuild
index 2abe63d93d1f..df477b3d1796 100644
--- a/libraries/BTF/BTF.SlackBuild
+++ b/libraries/BTF/BTF.SlackBuild
@@ -49,7 +49,11 @@ rm -rf $PRGNAM
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM
chown -R root:root .
-chmod -R u+w,go+r-w,a-st .
+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 {} \;
patch -p1 < $CWD/autotoolize.diff
autoreconf -vif
diff --git a/libraries/CAMD/CAMD.SlackBuild b/libraries/CAMD/CAMD.SlackBuild
index b43ddaa2e4c7..e451d96d6bc2 100644
--- a/libraries/CAMD/CAMD.SlackBuild
+++ b/libraries/CAMD/CAMD.SlackBuild
@@ -49,7 +49,11 @@ rm -rf $PRGNAM
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM
chown -R root:root .
-chmod -R u+w,go+r-w,a-st .
+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 {} \;
patch -p1 < $CWD/autotoolize.diff
autoreconf -vif
diff --git a/libraries/CCOLAMD/CCOLAMD.SlackBuild b/libraries/CCOLAMD/CCOLAMD.SlackBuild
index 2398e86602a5..30acef0fbc8a 100644
--- a/libraries/CCOLAMD/CCOLAMD.SlackBuild
+++ b/libraries/CCOLAMD/CCOLAMD.SlackBuild
@@ -49,7 +49,11 @@ rm -rf $PRGNAM
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM
chown -R root:root .
-chmod -R u+w,go+r-w,a-st .
+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 {} \;
patch -p1 < $CWD/autotoolize.diff
autoreconf -vif
diff --git a/libraries/CHOLMOD/CHOLMOD.SlackBuild b/libraries/CHOLMOD/CHOLMOD.SlackBuild
index 58cae4c9e8d6..3de7305a2055 100644
--- a/libraries/CHOLMOD/CHOLMOD.SlackBuild
+++ b/libraries/CHOLMOD/CHOLMOD.SlackBuild
@@ -50,7 +50,11 @@ rm -rf $PRGNAM
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM
chown -R root:root .
-chmod -R u+w,go+r-w,a-st .
+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 {} \;
patch -p1 < $CWD/autotoolize.diff
if [ -e Include/cholmod_config.h ]; then
diff --git a/libraries/COLAMD/COLAMD.SlackBuild b/libraries/COLAMD/COLAMD.SlackBuild
index 3fe632d14ec3..80b3e42b39e1 100644
--- a/libraries/COLAMD/COLAMD.SlackBuild
+++ b/libraries/COLAMD/COLAMD.SlackBuild
@@ -49,7 +49,11 @@ rm -rf $PRGNAM
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM
chown -R root:root .
-chmod -R u+w,go+r-w,a-st .
+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 {} \;
patch -p1 < $CWD/autotoolize.diff
autoreconf -vif
diff --git a/libraries/CSparse/CSparse.SlackBuild b/libraries/CSparse/CSparse.SlackBuild
index dca25908bbcd..029fb2b4c2f0 100644
--- a/libraries/CSparse/CSparse.SlackBuild
+++ b/libraries/CSparse/CSparse.SlackBuild
@@ -49,7 +49,11 @@ rm -rf $PRGNAM
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM
chown -R root:root .
-chmod -R u+w,go+r-w,a-st .
+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 {} \;
patch -p1 < $CWD/autotoolize.diff
autoreconf -vif
diff --git a/libraries/CXSparse/CXSparse.SlackBuild b/libraries/CXSparse/CXSparse.SlackBuild
index 65b4fd8f58d7..df3f489ae4a1 100644
--- a/libraries/CXSparse/CXSparse.SlackBuild
+++ b/libraries/CXSparse/CXSparse.SlackBuild
@@ -49,7 +49,11 @@ rm -rf $PRGNAM
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM
chown -R root:root .
-chmod -R u+w,go+r-w,a-st .
+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 {} \;
patch -p1 < $CWD/autotoolize.diff
autoreconf -vif
diff --git a/libraries/KLU/KLU.SlackBuild b/libraries/KLU/KLU.SlackBuild
index c3f248b84502..db70e9b16d5e 100644
--- a/libraries/KLU/KLU.SlackBuild
+++ b/libraries/KLU/KLU.SlackBuild
@@ -49,7 +49,11 @@ rm -rf $PRGNAM
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM
chown -R root:root .
-chmod -R u+w,go+r-w,a-st .
+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 {} \;
patch -p1 < $CWD/autotoolize.diff
autoreconf -vif
diff --git a/libraries/LDL/LDL.SlackBuild b/libraries/LDL/LDL.SlackBuild
index 8e75606d9c9b..923356f4345b 100644
--- a/libraries/LDL/LDL.SlackBuild
+++ b/libraries/LDL/LDL.SlackBuild
@@ -49,7 +49,11 @@ rm -rf $PRGNAM
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM
chown -R root:root .
-chmod -R u+w,go+r-w,a-st .
+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 {} \;
patch -p1 < $CWD/autotoolize.diff
autoreconf -vif
diff --git a/libraries/OpenAL/OpenAL.SlackBuild b/libraries/OpenAL/OpenAL.SlackBuild
index f314f7c77f4e..52c88bcda54e 100644
--- a/libraries/OpenAL/OpenAL.SlackBuild
+++ b/libraries/OpenAL/OpenAL.SlackBuild
@@ -64,7 +64,11 @@ rm -rf $SRCNAM-$VERSION
tar xvf $CWD/$SRCNAM-$VERSION.tar.bz2
cd $SRCNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+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 {} \;
cmake \
-DCMAKE_C_FLAGS="$SLKCFLAGS" \
diff --git a/libraries/PyXML/PyXML.SlackBuild b/libraries/PyXML/PyXML.SlackBuild
index c2aa7e3417dc..e75c2b85f6bc 100644
--- a/libraries/PyXML/PyXML.SlackBuild
+++ b/libraries/PyXML/PyXML.SlackBuild
@@ -54,7 +54,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+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 {} \;
patch -p1 -i $CWD/PyXML-0.8.4-python2.6.patch
diff --git a/libraries/RBio/RBio.SlackBuild b/libraries/RBio/RBio.SlackBuild
index 2dffb83ccaa6..eca520f2e869 100644
--- a/libraries/RBio/RBio.SlackBuild
+++ b/libraries/RBio/RBio.SlackBuild
@@ -49,7 +49,11 @@ rm -rf $PRGNAM
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM
chown -R root:root .
-chmod -R u+w,go+r-w,a-st .
+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 {} \;
patch -p1 < $CWD/autotoolize.diff
autoreconf -vif
diff --git a/libraries/SDL_Pango/SDL_Pango.SlackBuild b/libraries/SDL_Pango/SDL_Pango.SlackBuild
index 0d3b0d167bb6..093e35fd7149 100644
--- a/libraries/SDL_Pango/SDL_Pango.SlackBuild
+++ b/libraries/SDL_Pango/SDL_Pango.SlackBuild
@@ -61,7 +61,11 @@ rm -rf $PRGNAM-$VERSION
tar xzvf $CWD/$PRGNAM-$VERSION.tar.gz || exit 1
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+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 {} \;
patch -p1 < $CWD/SDL_Pango-0.1.2-suppress-warning.patch || exit 1
patch -p0 < $CWD/SDL_Pango-0.1.2-API-adds.patch || exit 1
diff --git a/libraries/SDL_sound/SDL_sound.SlackBuild b/libraries/SDL_sound/SDL_sound.SlackBuild
index 7db488343674..de100e5f89b2 100644
--- a/libraries/SDL_sound/SDL_sound.SlackBuild
+++ b/libraries/SDL_sound/SDL_sound.SlackBuild
@@ -63,7 +63,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+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 {} \;
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
diff --git a/libraries/SPQR/SPQR.SlackBuild b/libraries/SPQR/SPQR.SlackBuild
index 42867dfeb8de..bc3d9c9c8aea 100644
--- a/libraries/SPQR/SPQR.SlackBuild
+++ b/libraries/SPQR/SPQR.SlackBuild
@@ -49,7 +49,11 @@ rm -rf $PRGNAM
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM
chown -R root:root .
-chmod -R u+w,go+r-w,a-st .
+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 {} \;
patch -p1 < $CWD/autotoolize.diff
autoreconf -vif
diff --git a/libraries/UFconfig/UFconfig.SlackBuild b/libraries/UFconfig/UFconfig.SlackBuild
index f364c3c7d167..7634a1ccf569 100644
--- a/libraries/UFconfig/UFconfig.SlackBuild
+++ b/libraries/UFconfig/UFconfig.SlackBuild
@@ -49,7 +49,11 @@ rm -rf $PRGNAM
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM
chown -R root:root .
-chmod -R u+w,go+r-w,a-st .
+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 {} \;
patch -p1 < $CWD/autotoolize.diff
autoreconf -vif
diff --git a/libraries/UMFPACK/UMFPACK.SlackBuild b/libraries/UMFPACK/UMFPACK.SlackBuild
index 52e80ec10cbe..530b089c6717 100644
--- a/libraries/UMFPACK/UMFPACK.SlackBuild
+++ b/libraries/UMFPACK/UMFPACK.SlackBuild
@@ -49,7 +49,11 @@ rm -rf $PRGNAM
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM
chown -R root:root .
-chmod -R u+w,go+r-w,a-st .
+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 {} \;
patch -p1 < $CWD/autotoolize.diff
autoreconf -vif
diff --git a/libraries/adodb/adodb.SlackBuild b/libraries/adodb/adodb.SlackBuild
index 2bc0136315f7..5522f93a2ca7 100644
--- a/libraries/adodb/adodb.SlackBuild
+++ b/libraries/adodb/adodb.SlackBuild
@@ -33,7 +33,11 @@ cd $TMP
unzip $CWD/${PRGNAM}${SRCVERSION}.zip
cd ${PRGNAM}${SRCMAJOR}
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+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 {} \;
# "Install" to $DOCROOT/adodb
mkdir -p $PKG/$DOCROOT/$PRGNAM
diff --git a/libraries/afflib/afflib.SlackBuild b/libraries/afflib/afflib.SlackBuild
index 99cf3b725ff5..cbbd5f03c1db 100644
--- a/libraries/afflib/afflib.SlackBuild
+++ b/libraries/afflib/afflib.SlackBuild
@@ -65,7 +65,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+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 {} \;
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
diff --git a/libraries/allegro/allegro.SlackBuild b/libraries/allegro/allegro.SlackBuild
index f1e1903c3df3..121ebc646905 100644
--- a/libraries/allegro/allegro.SlackBuild
+++ b/libraries/allegro/allegro.SlackBuild
@@ -63,7 +63,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+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 {} \;
mkdir -p build
cd build
diff --git a/libraries/aubio/aubio.SlackBuild b/libraries/aubio/aubio.SlackBuild
index 4aff0d944256..fda64ed90ba4 100644
--- a/libraries/aubio/aubio.SlackBuild
+++ b/libraries/aubio/aubio.SlackBuild
@@ -63,7 +63,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+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 {} \;
LDFLAGS="-lm" \
CFLAGS="$SLKCFLAGS" \
diff --git a/libraries/barry/barry.SlackBuild b/libraries/barry/barry.SlackBuild
index eb0fb9987800..807be1328d09 100644
--- a/libraries/barry/barry.SlackBuild
+++ b/libraries/barry/barry.SlackBuild
@@ -71,7 +71,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R a-s,u+rw,go+r-w .
+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 {} \;
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
diff --git a/libraries/cairomm/cairomm.SlackBuild b/libraries/cairomm/cairomm.SlackBuild
index 05e134840f66..e4b0228c47a7 100644
--- a/libraries/cairomm/cairomm.SlackBuild
+++ b/libraries/cairomm/cairomm.SlackBuild
@@ -63,7 +63,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R a-s,u+rw,go-w+r .
+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 {} \;
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
diff --git a/libraries/cln/cln.SlackBuild b/libraries/cln/cln.SlackBuild
index c5bb68cc01e9..62c160f9a568 100644
--- a/libraries/cln/cln.SlackBuild
+++ b/libraries/cln/cln.SlackBuild
@@ -62,7 +62,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.?z*
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+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 {} \;
# Apply some patches from git
for i in $CWD/patches/* ; do patch -p1 < $i ; done
diff --git a/libraries/cracklib/cracklib.SlackBuild b/libraries/cracklib/cracklib.SlackBuild
index cd7f1fc535ba..c065f5149da1 100644
--- a/libraries/cracklib/cracklib.SlackBuild
+++ b/libraries/cracklib/cracklib.SlackBuild
@@ -71,7 +71,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R a-s,u+w,go+r-w .
+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 {} \;
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
diff --git a/libraries/exiftool/exiftool.SlackBuild b/libraries/exiftool/exiftool.SlackBuild
index 1fbd1545fbd7..93539a6d272b 100644
--- a/libraries/exiftool/exiftool.SlackBuild
+++ b/libraries/exiftool/exiftool.SlackBuild
@@ -49,7 +49,11 @@ rm -rf Image-ExifTool-$VERSION
tar xvf $CWD/Image-ExifTool-$VERSION.tar.gz
cd Image-ExifTool-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+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 {} \;
perl Makefile.PL INSTALLDIRS=vendor
make test
diff --git a/libraries/freealut/freealut.SlackBuild b/libraries/freealut/freealut.SlackBuild
index b1a91e3322d5..bde13abe506b 100644
--- a/libraries/freealut/freealut.SlackBuild
+++ b/libraries/freealut/freealut.SlackBuild
@@ -61,7 +61,11 @@ rm -rf freealut-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz || exit 1
cd freealut-$VERSION || exit 1
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+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 {} \;
CFLAGS="$SLKCFLAGS" \
./configure \
diff --git a/libraries/ftgl/ftgl.SlackBuild b/libraries/ftgl/ftgl.SlackBuild
index 0a528f5fd501..9d83bb24fd44 100644
--- a/libraries/ftgl/ftgl.SlackBuild
+++ b/libraries/ftgl/ftgl.SlackBuild
@@ -64,7 +64,11 @@ rm -rf $PRGNAM-$(echo $VERSION | tr _ \~)
tar xvf $CWD/$PRGNAM-$(echo $VERSION | tr _ -).tar.bz2
cd $PRGNAM-$(echo $VERSION | tr _ \~)
chown -R root:root .
-chmod -R a-s,u+rw,go+r-w .
+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 {} \;
# Fix building with gcc-4.7.x
patch -p1 < $CWD/patches/gcc47.patch
diff --git a/libraries/ggz-base-libs/ggz-base-libs.SlackBuild b/libraries/ggz-base-libs/ggz-base-libs.SlackBuild
index 6678b3c725aa..c540c9968c24 100644
--- a/libraries/ggz-base-libs/ggz-base-libs.SlackBuild
+++ b/libraries/ggz-base-libs/ggz-base-libs.SlackBuild
@@ -63,7 +63,11 @@ rm -rf $PRGNAM-snapshot-$VERSION
tar xvf $CWD/$PRGNAM-snapshot-$VERSION.tar.gz
cd $PRGNAM-snapshot-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+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 {} \;
# Fix building with gnutls3, thanks to netbsd people
( cd libggz
diff --git a/libraries/glibmm/glibmm.SlackBuild b/libraries/glibmm/glibmm.SlackBuild
index 2ccbb9e0e5ca..a2c56b76021d 100644
--- a/libraries/glibmm/glibmm.SlackBuild
+++ b/libraries/glibmm/glibmm.SlackBuild
@@ -63,7 +63,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.xz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R a-s,u+rw,go-w+r .
+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 {} \;
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
diff --git a/libraries/goffice/goffice.SlackBuild b/libraries/goffice/goffice.SlackBuild
index 354d9df254a6..a0ab92d41c31 100644
--- a/libraries/goffice/goffice.SlackBuild
+++ b/libraries/goffice/goffice.SlackBuild
@@ -65,7 +65,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.xz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+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 {} \;
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
diff --git a/libraries/gst1-libav/gst1-libav.SlackBuild b/libraries/gst1-libav/gst1-libav.SlackBuild
index 546c1a5c0f0c..8d648a103e8a 100644
--- a/libraries/gst1-libav/gst1-libav.SlackBuild
+++ b/libraries/gst1-libav/gst1-libav.SlackBuild
@@ -65,7 +65,11 @@ cd $TMP
tar xvf $CWD/$SRCNAM-$VERSION.tar.?z*
cd $SRCNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+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 {} \;
CFLAGS="$SLKCFLAGS" \
./configure \
diff --git a/libraries/gstreamermm/gstreamermm.SlackBuild b/libraries/gstreamermm/gstreamermm.SlackBuild
index 44334d5b1b3e..aececa4f0d40 100644
--- a/libraries/gstreamermm/gstreamermm.SlackBuild
+++ b/libraries/gstreamermm/gstreamermm.SlackBuild
@@ -63,7 +63,11 @@ cd $TMP
tar xvf $CWD/$PRGNAM-$VERSION.tar.xz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+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 {} \;
CFLAGS="$SLKCFLAGS" \
./configure \
diff --git a/libraries/gtkglarea/gtkglarea.SlackBuild b/libraries/gtkglarea/gtkglarea.SlackBuild
index d9159351329f..3cadf3fc66a0 100644
--- a/libraries/gtkglarea/gtkglarea.SlackBuild
+++ b/libraries/gtkglarea/gtkglarea.SlackBuild
@@ -46,7 +46,11 @@ rm -rf $PRGNAM-$VERSION
tar -xjvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-st .
+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 {} \;
LDFLAGS="-lm" \
CFLAGS="$SLKCFLAGS" \
diff --git a/libraries/gtkmm-utils/gtkmm-utils.SlackBuild b/libraries/gtkmm-utils/gtkmm-utils.SlackBuild
index d0af007f024a..7a14a4a1cd2b 100644
--- a/libraries/gtkmm-utils/gtkmm-utils.SlackBuild
+++ b/libraries/gtkmm-utils/gtkmm-utils.SlackBuild
@@ -63,7 +63,11 @@ rm -rf $PRGNAM-$VERSION
tar xvzf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R a-s,u+rw,go-w+r .
+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 {} \;
CFLAGS="-DGLIB_COMPILATION" \
CXXFLAGS="-DGLIB_COMPILATION" \
diff --git a/libraries/gtkmm/gtkmm.SlackBuild b/libraries/gtkmm/gtkmm.SlackBuild
index ca4ebfeacc89..8d519398d7a9 100644
--- a/libraries/gtkmm/gtkmm.SlackBuild
+++ b/libraries/gtkmm/gtkmm.SlackBuild
@@ -65,7 +65,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.xz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R a-s,u+rw,go-w+r .
+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 {} \;
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
diff --git a/libraries/gtkmm3/gtkmm3.SlackBuild b/libraries/gtkmm3/gtkmm3.SlackBuild
index fe87e82d7ab8..4f39fb353da2 100644
--- a/libraries/gtkmm3/gtkmm3.SlackBuild
+++ b/libraries/gtkmm3/gtkmm3.SlackBuild
@@ -67,7 +67,11 @@ rm -rf $SRCNAM-$VERSION
tar xvf $CWD/$SRCNAM-$VERSION.tar.?z*
cd $SRCNAM-$VERSION
chown -R root:root .
-chmod -R a-s,u+rw,go-w+r .
+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 {} \;
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
diff --git a/libraries/gts/gts.SlackBuild b/libraries/gts/gts.SlackBuild
index 3dd45a1ed325..f65f89c57f20 100644
--- a/libraries/gts/gts.SlackBuild
+++ b/libraries/gts/gts.SlackBuild
@@ -46,7 +46,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+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 {} \;
# Included for pgm.h, which is required by examples/happrox.c
export CPATH="/usr/include/netpbm:${CPATH:-}"
diff --git a/libraries/guichan/guichan.SlackBuild b/libraries/guichan/guichan.SlackBuild
index 208b9c44f07e..3007617b3247 100644
--- a/libraries/guichan/guichan.SlackBuild
+++ b/libraries/guichan/guichan.SlackBuild
@@ -63,7 +63,11 @@ rm -rf $PRGNAM-$VERSION
tar xzvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R a-s,u+w,go+r-w .
+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 {} \;
CFLAGS="$SLKCFLAGS" \
./configure \
diff --git a/libraries/id3lib/id3lib.SlackBuild b/libraries/id3lib/id3lib.SlackBuild
index f11dde28f0c7..430a95d03eff 100644
--- a/libraries/id3lib/id3lib.SlackBuild
+++ b/libraries/id3lib/id3lib.SlackBuild
@@ -66,7 +66,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+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 {} \;
patch -p1 < $CWD/patches/id3lib_3.8.3_UTF16_writing_bug.patch
patch -p1 < $CWD/patches/id3lib-3.8.3-GCC43FIX-1.patch
diff --git a/libraries/jbigkit/jbigkit.SlackBuild b/libraries/jbigkit/jbigkit.SlackBuild
index e83ab279d080..af538855160d 100644
--- a/libraries/jbigkit/jbigkit.SlackBuild
+++ b/libraries/jbigkit/jbigkit.SlackBuild
@@ -44,7 +44,11 @@ rm -rf $PRGNAM
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+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 {} \;
# Build the shared library first
cd libjbig
diff --git a/libraries/json-glib/json-glib.SlackBuild b/libraries/json-glib/json-glib.SlackBuild
index ff5f795fdcac..e482bc396a93 100644
--- a/libraries/json-glib/json-glib.SlackBuild
+++ b/libraries/json-glib/json-glib.SlackBuild
@@ -63,7 +63,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+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 {} \;
CFLAGS="$SLKCFLAGS" \
./configure \
diff --git a/libraries/lablgtk/lablgtk.SlackBuild b/libraries/lablgtk/lablgtk.SlackBuild
index f83a6c152563..949e5b10525f 100644
--- a/libraries/lablgtk/lablgtk.SlackBuild
+++ b/libraries/lablgtk/lablgtk.SlackBuild
@@ -63,7 +63,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+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 {} \;
./configure \
--prefix=/usr \
diff --git a/libraries/lastfmlib/lastfmlib.SlackBuild b/libraries/lastfmlib/lastfmlib.SlackBuild
index fa81f3621c00..374c77d073d8 100644
--- a/libraries/lastfmlib/lastfmlib.SlackBuild
+++ b/libraries/lastfmlib/lastfmlib.SlackBuild
@@ -63,7 +63,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+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 {} \;
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
diff --git a/libraries/lensfun/lensfun.SlackBuild b/libraries/lensfun/lensfun.SlackBuild
index dfeecc4e2530..ebc6b3c1eb69 100644
--- a/libraries/lensfun/lensfun.SlackBuild
+++ b/libraries/lensfun/lensfun.SlackBuild
@@ -61,7 +61,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.?z* || exit 1
cd $PRGNAM-$VERSION || exit 1
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+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 {} \;
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
diff --git a/libraries/libatomic_ops/libatomic_ops.SlackBuild b/libraries/libatomic_ops/libatomic_ops.SlackBuild
index 5b1b4b94f68a..1de1e3f6b318 100644
--- a/libraries/libatomic_ops/libatomic_ops.SlackBuild
+++ b/libraries/libatomic_ops/libatomic_ops.SlackBuild
@@ -63,7 +63,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+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 {} \;
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
diff --git a/libraries/libavc1394/libavc1394.SlackBuild b/libraries/libavc1394/libavc1394.SlackBuild
index 3a6fc5ade8ee..a2f0637ea57e 100644
--- a/libraries/libavc1394/libavc1394.SlackBuild
+++ b/libraries/libavc1394/libavc1394.SlackBuild
@@ -65,7 +65,11 @@ cd $TMP
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+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 {} \;
CFLAGS="$SLKCFLAGS" \
./configure \
diff --git a/libraries/libburn/libburn.SlackBuild b/libraries/libburn/libburn.SlackBuild
index f2c92dee0b73..0e4d5fa29472 100644
--- a/libraries/libburn/libburn.SlackBuild
+++ b/libraries/libburn/libburn.SlackBuild
@@ -63,7 +63,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-${VERSION}.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+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 {} \;
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
diff --git a/libraries/libcitadel/libcitadel.SlackBuild b/libraries/libcitadel/libcitadel.SlackBuild
index 1eb4291d7674..44644d37a05b 100644
--- a/libraries/libcitadel/libcitadel.SlackBuild
+++ b/libraries/libcitadel/libcitadel.SlackBuild
@@ -64,7 +64,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.*
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+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 {} \;
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
diff --git a/libraries/libcli/libcli.SlackBuild b/libraries/libcli/libcli.SlackBuild
index d754fc9d7ac6..c904ffcce9d7 100644
--- a/libraries/libcli/libcli.SlackBuild
+++ b/libraries/libcli/libcli.SlackBuild
@@ -63,7 +63,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+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 {} \;
sed -i "s|\$(PREFIX)/lib|\$(PREFIX)/lib$LIBDIRSUFFIX|g" Makefile
diff --git a/libraries/libcue/libcue.SlackBuild b/libraries/libcue/libcue.SlackBuild
index 7f446bf3e7ee..b51570186787 100644
--- a/libraries/libcue/libcue.SlackBuild
+++ b/libraries/libcue/libcue.SlackBuild
@@ -63,7 +63,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+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 {} \;
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
diff --git a/libraries/libdaemon/libdaemon.SlackBuild b/libraries/libdaemon/libdaemon.SlackBuild
index b6ce746ac001..c2faffb9cec2 100644
--- a/libraries/libdaemon/libdaemon.SlackBuild
+++ b/libraries/libdaemon/libdaemon.SlackBuild
@@ -65,7 +65,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+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 {} \;
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
diff --git a/libraries/libdbi-drivers/libdbi-drivers.SlackBuild b/libraries/libdbi-drivers/libdbi-drivers.SlackBuild
index 8188bdd132b7..a83ff480de22 100644
--- a/libraries/libdbi-drivers/libdbi-drivers.SlackBuild
+++ b/libraries/libdbi-drivers/libdbi-drivers.SlackBuild
@@ -54,7 +54,11 @@ rm -rf $PRGNAM-$SRCVERSION
tar xvf $CWD/$PRGNAM-$SRCVERSION.tar.gz
cd $PRGNAM-$SRCVERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+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 {} \;
CFLAGS="$SLKCFLAGS" \
./configure \
diff --git a/libraries/libdbi/libdbi.SlackBuild b/libraries/libdbi/libdbi.SlackBuild
index 3923cb92f13b..49790439a478 100644
--- a/libraries/libdbi/libdbi.SlackBuild
+++ b/libraries/libdbi/libdbi.SlackBuild
@@ -61,7 +61,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz || exit 1
cd $PRGNAM-$VERSION || exit 1
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+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 {} \;
CFLAGS="$SLKCFLAGS" \
./configure \
diff --git a/libraries/libdbus-c++/libdbus-c++.SlackBuild b/libraries/libdbus-c++/libdbus-c++.SlackBuild
index ab0458daa17d..ec529a9e2ff5 100644
--- a/libraries/libdbus-c++/libdbus-c++.SlackBuild
+++ b/libraries/libdbus-c++/libdbus-c++.SlackBuild
@@ -63,7 +63,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+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 {} \;
patch -p0 -i $CWD/gcc47.patch
diff --git a/libraries/libdca/libdca.SlackBuild b/libraries/libdca/libdca.SlackBuild
index 5be86e94d6f9..7edf96de9394 100644
--- a/libraries/libdca/libdca.SlackBuild
+++ b/libraries/libdca/libdca.SlackBuild
@@ -65,7 +65,11 @@ rm -rf $PRGNAM-$VERSION libdts-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R a-s,u+rw,go+r-w .
+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 {} \;
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
diff --git a/libraries/libdv/libdv.SlackBuild b/libraries/libdv/libdv.SlackBuild
index 44f249456893..152cca0e2184 100644
--- a/libraries/libdv/libdv.SlackBuild
+++ b/libraries/libdv/libdv.SlackBuild
@@ -63,7 +63,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+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 {} \;
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
diff --git a/libraries/libdvdnav/libdvdnav.SlackBuild b/libraries/libdvdnav/libdvdnav.SlackBuild
index 290b4cea1474..4adf5b8ea725 100644
--- a/libraries/libdvdnav/libdvdnav.SlackBuild
+++ b/libraries/libdvdnav/libdvdnav.SlackBuild
@@ -63,7 +63,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+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 {} \;
./autogen.sh
diff --git a/libraries/libesmtp/libesmtp.SlackBuild b/libraries/libesmtp/libesmtp.SlackBuild
index 24c2641ac209..ca152ade63d0 100644
--- a/libraries/libesmtp/libesmtp.SlackBuild
+++ b/libraries/libesmtp/libesmtp.SlackBuild
@@ -47,7 +47,11 @@ rm -rf $PRGNAM-$VERSION
tar -xjvf $CWD/$PRGNAM-$VERSION.tar.bz2 || exit 1
cd $PRGNAM-$VERSION || exit 1
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+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 {} \;
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
diff --git a/libraries/libetpan/libetpan.SlackBuild b/libraries/libetpan/libetpan.SlackBuild
index b63218dada43..35d51d559386 100644
--- a/libraries/libetpan/libetpan.SlackBuild
+++ b/libraries/libetpan/libetpan.SlackBuild
@@ -63,7 +63,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+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 {} \;
./autogen.sh
diff --git a/libraries/libewf/libewf.SlackBuild b/libraries/libewf/libewf.SlackBuild
index 581b6637b3cc..8c05590c816b 100644
--- a/libraries/libewf/libewf.SlackBuild
+++ b/libraries/libewf/libewf.SlackBuild
@@ -65,7 +65,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+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 {} \;
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
diff --git a/libraries/libexif-gtk/libexif-gtk.SlackBuild b/libraries/libexif-gtk/libexif-gtk.SlackBuild
index dc75891055c0..f12524541d81 100644
--- a/libraries/libexif-gtk/libexif-gtk.SlackBuild
+++ b/libraries/libexif-gtk/libexif-gtk.SlackBuild
@@ -63,7 +63,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2 || exit 1
cd $PRGNAM-$VERSION || exit 1
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+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 {} \;
# Patch to re-enable depreciated calls in gtk+ (only needed for 2.12.x)
# See gentoo bug #194680
diff --git a/libraries/libfprint/libfprint.SlackBuild b/libraries/libfprint/libfprint.SlackBuild
index 4dc4847e6a45..c12c402b2fad 100644
--- a/libraries/libfprint/libfprint.SlackBuild
+++ b/libraries/libfprint/libfprint.SlackBuild
@@ -45,7 +45,11 @@ rm -rf $PRGNAM-$VERSION
tar -xjvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+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 {} \;
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
diff --git a/libraries/libgdiplus/libgdiplus.SlackBuild b/libraries/libgdiplus/libgdiplus.SlackBuild
index f2a6132752b0..2fe560b3feb0 100644
--- a/libraries/libgdiplus/libgdiplus.SlackBuild
+++ b/libraries/libgdiplus/libgdiplus.SlackBuild
@@ -65,7 +65,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+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 {} \;
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
diff --git a/libraries/libglademm/libglademm.SlackBuild b/libraries/libglademm/libglademm.SlackBuild
index 747ec79ae5d4..e33304c12c27 100644
--- a/libraries/libglademm/libglademm.SlackBuild
+++ b/libraries/libglademm/libglademm.SlackBuild
@@ -63,7 +63,11 @@ cd $TMP
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+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 {} \;
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS"
diff --git a/libraries/libglpng/libglpng.SlackBuild b/libraries/libglpng/libglpng.SlackBuild
index f59e7a8aeff2..2a4a063ee148 100644
--- a/libraries/libglpng/libglpng.SlackBuild
+++ b/libraries/libglpng/libglpng.SlackBuild
@@ -63,7 +63,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+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 {} \;
patch -p1 < $CWD/libglpng-1.45-extra_cflags.patch
diff --git a/libraries/libgnomecanvasmm/libgnomecanvasmm.SlackBuild b/libraries/libgnomecanvasmm/libgnomecanvasmm.SlackBuild
index 486a80d03efa..665f2b7d1026 100644
--- a/libraries/libgnomecanvasmm/libgnomecanvasmm.SlackBuild
+++ b/libraries/libgnomecanvasmm/libgnomecanvasmm.SlackBuild
@@ -63,7 +63,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+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 {} \;
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
diff --git a/libraries/libgsasl/libgsasl.SlackBuild b/libraries/libgsasl/libgsasl.SlackBuild
index 232f054258c1..f96b27cde0e6 100644
--- a/libraries/libgsasl/libgsasl.SlackBuild
+++ b/libraries/libgsasl/libgsasl.SlackBuild
@@ -65,7 +65,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+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 {} \;
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
diff --git a/libraries/libhoard/libhoard.SlackBuild b/libraries/libhoard/libhoard.SlackBuild
index 393c0fdbef63..570465db44e0 100644
--- a/libraries/libhoard/libhoard.SlackBuild
+++ b/libraries/libhoard/libhoard.SlackBuild
@@ -63,7 +63,11 @@ rm -rf emeryberger-Hoard-d065953
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd emeryberger-Hoard-d065953
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+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 {} \;
# Fix issue with newer glibc
patch -d src -p1 -i $CWD/gnuwrapper.cpp.patch
diff --git a/libraries/libiec61883/libiec61883.SlackBuild b/libraries/libiec61883/libiec61883.SlackBuild
index b0cabec69361..69e59caeb693 100644
--- a/libraries/libiec61883/libiec61883.SlackBuild
+++ b/libraries/libiec61883/libiec61883.SlackBuild
@@ -65,7 +65,11 @@ cd $TMP
tar xvf $CWD/$PRGNAM-$VERSION.tar.xz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+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 {} \;
CFLAGS="$SLKCFLAGS" \
./configure \
diff --git a/libraries/libircclient/libircclient.SlackBuild b/libraries/libircclient/libircclient.SlackBuild
index e8adad167c21..4ec102d2f55f 100644
--- a/libraries/libircclient/libircclient.SlackBuild
+++ b/libraries/libircclient/libircclient.SlackBuild
@@ -63,7 +63,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+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 {} \;
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
diff --git a/libraries/libisofs/libisofs.SlackBuild b/libraries/libisofs/libisofs.SlackBuild
index c19b1db446fb..e7b2121681e2 100644
--- a/libraries/libisofs/libisofs.SlackBuild
+++ b/libraries/libisofs/libisofs.SlackBuild
@@ -63,7 +63,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+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 {} \;
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
diff --git a/libraries/liblo/liblo.SlackBuild b/libraries/liblo/liblo.SlackBuild
index da97768c1554..e351d02ee985 100644
--- a/libraries/liblo/liblo.SlackBuild
+++ b/libraries/liblo/liblo.SlackBuild
@@ -63,7 +63,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+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 {} \;
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
diff --git a/libraries/liblqr/liblqr.SlackBuild b/libraries/liblqr/liblqr.SlackBuild
index cc6dc0882d6f..7d45b5e2dec7 100644
--- a/libraries/liblqr/liblqr.SlackBuild
+++ b/libraries/liblqr/liblqr.SlackBuild
@@ -64,7 +64,11 @@ rm -rf $SRCNAM-$VERSION
tar xvf $CWD/$SRCNAM-$VERSION.tar.bz2
cd $SRCNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+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 {} \;
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
diff --git a/libraries/liblrdf/liblrdf.SlackBuild b/libraries/liblrdf/liblrdf.SlackBuild
index e13d3b85f4ed..e0289c831c5c 100644
--- a/libraries/liblrdf/liblrdf.SlackBuild
+++ b/libraries/liblrdf/liblrdf.SlackBuild
@@ -63,7 +63,11 @@ rm -rf swh-LRDF-7ebc032
tar xvf $CWD/swh-LRDF-$VERSION-0-g7ebc032.tar.gz
cd swh-LRDF-7ebc032
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+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 {} \;
./autogen.sh
diff --git a/libraries/libmaa/libmaa.SlackBuild b/libraries/libmaa/libmaa.SlackBuild
index 69d2d47c2314..577c371d30c5 100644
--- a/libraries/libmaa/libmaa.SlackBuild
+++ b/libraries/libmaa/libmaa.SlackBuild
@@ -44,7 +44,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+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 {} \;
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
diff --git a/libraries/libmirage/libmirage.SlackBuild b/libraries/libmirage/libmirage.SlackBuild
index f1ebb10f7ffd..0576c2fe565e 100644
--- a/libraries/libmirage/libmirage.SlackBuild
+++ b/libraries/libmirage/libmirage.SlackBuild
@@ -66,7 +66,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R a-s,u+rw,go+r-w .
+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 {} \;
mkdir -p build
cd build
diff --git a/libraries/libmms/libmms.SlackBuild b/libraries/libmms/libmms.SlackBuild
index ec7596f607d7..d51527c99843 100644
--- a/libraries/libmms/libmms.SlackBuild
+++ b/libraries/libmms/libmms.SlackBuild
@@ -63,7 +63,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+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 {} \;
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
diff --git a/libraries/libmp4v2/libmp4v2.SlackBuild b/libraries/libmp4v2/libmp4v2.SlackBuild
index 643dbfed82f5..61c0497769f4 100644
--- a/libraries/libmp4v2/libmp4v2.SlackBuild
+++ b/libraries/libmp4v2/libmp4v2.SlackBuild
@@ -74,7 +74,11 @@ cd $TMP
tar xvf $CWD/$SRCNAM-$VERSION.tar.bz2
cd $SRCNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+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 {} \;
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
diff --git a/libraries/libmspack/libmspack.SlackBuild b/libraries/libmspack/libmspack.SlackBuild
index 16e2e0e70bff..dc5d3bf41f28 100644
--- a/libraries/libmspack/libmspack.SlackBuild
+++ b/libraries/libmspack/libmspack.SlackBuild
@@ -63,7 +63,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+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 {} \;
CFLAGS="$SLKCFLAGS" \
./configure \
diff --git a/libraries/libofx/libofx.SlackBuild b/libraries/libofx/libofx.SlackBuild
index f444055f53c1..bf564d8051e0 100644
--- a/libraries/libofx/libofx.SlackBuild
+++ b/libraries/libofx/libofx.SlackBuild
@@ -63,7 +63,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+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 {} \;
# Patch to fix compilation with gcc 4.7
patch -p1 -i $CWD/libofx-0.9.5-gcc47.patch
diff --git a/libraries/liboop/liboop.SlackBuild b/libraries/liboop/liboop.SlackBuild
index d0e05ba88254..a0ce62f6d003 100644
--- a/libraries/liboop/liboop.SlackBuild
+++ b/libraries/liboop/liboop.SlackBuild
@@ -41,7 +41,7 @@ else
LIBDIRSUFFIX=""
fi
-set -e
+set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
@@ -50,7 +50,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R a-s,go-w .
+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 {} \;
# build including libwww adapter
CFLAGS="$SLKCFLAGS" \
diff --git a/libraries/libotr/libotr.SlackBuild b/libraries/libotr/libotr.SlackBuild
index 2ff7aa98f170..ee96dc6ae551 100644
--- a/libraries/libotr/libotr.SlackBuild
+++ b/libraries/libotr/libotr.SlackBuild
@@ -63,7 +63,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+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 {} \;
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
diff --git a/libraries/libpano13/libpano13.SlackBuild b/libraries/libpano13/libpano13.SlackBuild
index c4bd801ed88e..d61d9b036365 100644
--- a/libraries/libpano13/libpano13.SlackBuild
+++ b/libraries/libpano13/libpano13.SlackBuild
@@ -65,7 +65,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+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 {} \;
CFLAGS="$SLKCFLAGS" \
./configure \
diff --git a/libraries/libpar2/libpar2.SlackBuild b/libraries/libpar2/libpar2.SlackBuild
index a52565d2b3ef..8b9f4873bb29 100644
--- a/libraries/libpar2/libpar2.SlackBuild
+++ b/libraries/libpar2/libpar2.SlackBuild
@@ -60,7 +60,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R a-s,u+rw,go-w+r .
+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 {} \;
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
diff --git a/libraries/libquicktime/libquicktime.SlackBuild b/libraries/libquicktime/libquicktime.SlackBuild
index 6aac11ee1372..d71321d753ec 100644
--- a/libraries/libquicktime/libquicktime.SlackBuild
+++ b/libraries/libquicktime/libquicktime.SlackBuild
@@ -63,7 +63,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+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 {} \;
# Fix compatibility with ffmpeg 2.x
patch -p1 -i $CWD/libquicktime-1.2.4-ffmpeg2.patch
diff --git a/libraries/librcd/librcd.SlackBuild b/libraries/librcd/librcd.SlackBuild
index 8d99e76c910c..71c93a91d55e 100644
--- a/libraries/librcd/librcd.SlackBuild
+++ b/libraries/librcd/librcd.SlackBuild
@@ -47,7 +47,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+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 {} \;
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
diff --git a/libraries/librelp/librelp.SlackBuild b/libraries/librelp/librelp.SlackBuild
index d78cca999a61..a3835fbe0414 100644
--- a/libraries/librelp/librelp.SlackBuild
+++ b/libraries/librelp/librelp.SlackBuild
@@ -62,7 +62,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+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 {} \;
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
diff --git a/libraries/librsync/librsync.SlackBuild b/libraries/librsync/librsync.SlackBuild
index 58b3af79fc84..75305ac71ab6 100644
--- a/libraries/librsync/librsync.SlackBuild
+++ b/libraries/librsync/librsync.SlackBuild
@@ -48,7 +48,11 @@ rm -rf $PRGNAM-$VERSION
tar -xzvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+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 {} \;
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
diff --git a/libraries/libsidplay2/libsidplay2.SlackBuild b/libraries/libsidplay2/libsidplay2.SlackBuild
index 6eca187a3960..14db115aabb8 100644
--- a/libraries/libsidplay2/libsidplay2.SlackBuild
+++ b/libraries/libsidplay2/libsidplay2.SlackBuild
@@ -73,7 +73,11 @@ patch -p1 < $TMP/debian/patches/gcc4-fixes.patch
patch -p1 < $TMP/debian/patches/hardsid_4_bsd.patch
patch -p1 < $TMP/debian/patches/pkg-config.patch
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+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 {} \;
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
diff --git a/libraries/libsieve/libsieve.SlackBuild b/libraries/libsieve/libsieve.SlackBuild
index 2e53ddec508f..25eff8abc95e 100644
--- a/libraries/libsieve/libsieve.SlackBuild
+++ b/libraries/libsieve/libsieve.SlackBuild
@@ -64,7 +64,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.*
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+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 {} \;
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
diff --git a/libraries/libsmbios/libsmbios.SlackBuild b/libraries/libsmbios/libsmbios.SlackBuild
index 198b1c496b8e..af809e2aa993 100644
--- a/libraries/libsmbios/libsmbios.SlackBuild
+++ b/libraries/libsmbios/libsmbios.SlackBuild
@@ -41,7 +41,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+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 {} \;
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
diff --git a/libraries/libtorrent-rasterbar/libtorrent-rasterbar.SlackBuild b/libraries/libtorrent-rasterbar/libtorrent-rasterbar.SlackBuild
index adc25365f424..6c3b5ffe7ccb 100644
--- a/libraries/libtorrent-rasterbar/libtorrent-rasterbar.SlackBuild
+++ b/libraries/libtorrent-rasterbar/libtorrent-rasterbar.SlackBuild
@@ -63,7 +63,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.?z*
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+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 {} \;
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
diff --git a/libraries/libtorrent/libtorrent.SlackBuild b/libraries/libtorrent/libtorrent.SlackBuild
index 06ba706d0d82..45362cec9a61 100644
--- a/libraries/libtorrent/libtorrent.SlackBuild
+++ b/libraries/libtorrent/libtorrent.SlackBuild
@@ -51,7 +51,11 @@ cd $TMP
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+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 {} \;
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
diff --git a/libraries/libvdpau/libvdpau.SlackBuild b/libraries/libvdpau/libvdpau.SlackBuild
index d9f9f91ad6f2..19c31a7b473e 100644
--- a/libraries/libvdpau/libvdpau.SlackBuild
+++ b/libraries/libvdpau/libvdpau.SlackBuild
@@ -64,7 +64,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+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 {} \;
./autogen.sh
diff --git a/libraries/libvmime/libvmime.SlackBuild b/libraries/libvmime/libvmime.SlackBuild
index c5577831a56f..ca595c8f93fd 100644
--- a/libraries/libvmime/libvmime.SlackBuild
+++ b/libraries/libvmime/libvmime.SlackBuild
@@ -65,7 +65,11 @@ cd $TMP
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+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 {} \;
# Apply patch for newer gnutls version
patch -p1 <$CWD/libvmime_gnutls3.patch
diff --git a/libraries/libwebp/libwebp.SlackBuild b/libraries/libwebp/libwebp.SlackBuild
index a1c7186de122..1a0ef0a4707e 100644
--- a/libraries/libwebp/libwebp.SlackBuild
+++ b/libraries/libwebp/libwebp.SlackBuild
@@ -44,7 +44,11 @@ rm -rf $PRGNAM-$VERSION
tar zxf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+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 {} \;
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
diff --git a/libraries/libx86emu/libx86emu.SlackBuild b/libraries/libx86emu/libx86emu.SlackBuild
index 56244c245c15..556e2dc9d8a9 100644
--- a/libraries/libx86emu/libx86emu.SlackBuild
+++ b/libraries/libx86emu/libx86emu.SlackBuild
@@ -63,7 +63,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.xz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+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 {} \;
# disable regeneration of changelog and VERSION
chmod -x ./git2log
diff --git a/libraries/libxmi/libxmi.SlackBuild b/libraries/libxmi/libxmi.SlackBuild
index f42ca1e66336..58c756c23bec 100644
--- a/libraries/libxmi/libxmi.SlackBuild
+++ b/libraries/libxmi/libxmi.SlackBuild
@@ -63,7 +63,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+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 {} \;
# Substitute newer automake files that know about x86_64
am=$(automake --version | head -1 | cut -d " " -f 4 | cut -d "." -f 2)
diff --git a/libraries/libxmp/libxmp.SlackBuild b/libraries/libxmp/libxmp.SlackBuild
index 3267247d8b70..c5a4eeb767e4 100644
--- a/libraries/libxmp/libxmp.SlackBuild
+++ b/libraries/libxmp/libxmp.SlackBuild
@@ -63,7 +63,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+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 {} \;
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
diff --git a/libraries/lilv/lilv.SlackBuild b/libraries/lilv/lilv.SlackBuild
index 0f26d1bc4395..028db0ad973e 100644
--- a/libraries/lilv/lilv.SlackBuild
+++ b/libraries/lilv/lilv.SlackBuild
@@ -63,7 +63,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+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 {} \;
# Fix building python bindings
patch -p2 -i $CWD/lilvmm.patch
diff --git a/libraries/meanwhile/meanwhile.SlackBuild b/libraries/meanwhile/meanwhile.SlackBuild
index 7e3e81bd213b..14e18a826a29 100644
--- a/libraries/meanwhile/meanwhile.SlackBuild
+++ b/libraries/meanwhile/meanwhile.SlackBuild
@@ -61,7 +61,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz || exit 1
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+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 {} \;
# Patch to only include glib.h
patch -p1 < $CWD/fix_glib_includes.patch
diff --git a/libraries/ocaml-camomile/ocaml-camomile.SlackBuild b/libraries/ocaml-camomile/ocaml-camomile.SlackBuild
index 19575c4770e6..d671e48d705f 100644
--- a/libraries/ocaml-camomile/ocaml-camomile.SlackBuild
+++ b/libraries/ocaml-camomile/ocaml-camomile.SlackBuild
@@ -62,7 +62,11 @@ rm -rf $SRCNAM-$VERSION
tar xvf $CWD/$SRCNAM-$VERSION.tar.bz2
cd $SRCNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+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 {} \;
# Install missing library, thanks debian
patch -p1 < $CWD/0002-Install-missing-camomileLibrary.a.patch
diff --git a/libraries/ocaml-findlib/ocaml-findlib.SlackBuild b/libraries/ocaml-findlib/ocaml-findlib.SlackBuild
index 878750b3d304..593ef6a95a55 100644
--- a/libraries/ocaml-findlib/ocaml-findlib.SlackBuild
+++ b/libraries/ocaml-findlib/ocaml-findlib.SlackBuild
@@ -62,7 +62,11 @@ rm -rf $SRCNAM-$VERSION
tar xvf $CWD/$SRCNAM-$VERSION.tar.gz
cd $SRCNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+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 {} \;
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
diff --git a/libraries/ode/ode.SlackBuild b/libraries/ode/ode.SlackBuild
index 21e4ccd21dd9..a01183de56a1 100644
--- a/libraries/ode/ode.SlackBuild
+++ b/libraries/ode/ode.SlackBuild
@@ -50,7 +50,11 @@ cd $TMP
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+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 {} \;
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
diff --git a/libraries/openbabel/openbabel.SlackBuild b/libraries/openbabel/openbabel.SlackBuild
index 79a02f627cef..66325ec6fa68 100644
--- a/libraries/openbabel/openbabel.SlackBuild
+++ b/libraries/openbabel/openbabel.SlackBuild
@@ -65,7 +65,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R a-s,u+w,go-w+r .
+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 {} \;
mkdir -p build
cd build
diff --git a/libraries/openjpeg/openjpeg.SlackBuild b/libraries/openjpeg/openjpeg.SlackBuild
index 8d73c5f7eb86..0a9dcc411df0 100644
--- a/libraries/openjpeg/openjpeg.SlackBuild
+++ b/libraries/openjpeg/openjpeg.SlackBuild
@@ -63,7 +63,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+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 {} \;
mkdir -p build
cd build
diff --git a/libraries/pangomm/pangomm.SlackBuild b/libraries/pangomm/pangomm.SlackBuild
index 4fe06830922a..f4a9bd3254b3 100644
--- a/libraries/pangomm/pangomm.SlackBuild
+++ b/libraries/pangomm/pangomm.SlackBuild
@@ -63,7 +63,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.?z*
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R a-s,u+rw,go-w+r .
+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 {} \;
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
diff --git a/libraries/physfs/physfs.SlackBuild b/libraries/physfs/physfs.SlackBuild
index ed5994a8ef6f..7ab2bde6a870 100644
--- a/libraries/physfs/physfs.SlackBuild
+++ b/libraries/physfs/physfs.SlackBuild
@@ -63,7 +63,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R a-s,u+w,go+r-w .
+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 {} \;
# while we cut away -Werror to make gcc-4.6 happy, we turn off debug too
sed -i "s|-g -pipe -Werror|-pipe|" CMakeLists.txt
diff --git a/libraries/purple-plugin_pack/purple-plugin_pack.SlackBuild b/libraries/purple-plugin_pack/purple-plugin_pack.SlackBuild
index f423d9febe59..a16617f7fc2f 100644
--- a/libraries/purple-plugin_pack/purple-plugin_pack.SlackBuild
+++ b/libraries/purple-plugin_pack/purple-plugin_pack.SlackBuild
@@ -44,7 +44,11 @@ cd $TMP
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+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 {} \;
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
diff --git a/libraries/quesoglc/quesoglc.SlackBuild b/libraries/quesoglc/quesoglc.SlackBuild
index 27f3c7839691..3e020babefd7 100644
--- a/libraries/quesoglc/quesoglc.SlackBuild
+++ b/libraries/quesoglc/quesoglc.SlackBuild
@@ -62,7 +62,11 @@ cd $TMP
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+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 {} \;
CFLAGS="$SLKCFLAGS" \
./configure \
diff --git a/libraries/rlog/rlog.SlackBuild b/libraries/rlog/rlog.SlackBuild
index a0393e2da8f9..f6d43c6e00d4 100644
--- a/libraries/rlog/rlog.SlackBuild
+++ b/libraries/rlog/rlog.SlackBuild
@@ -63,7 +63,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+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 {} \;
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
diff --git a/libraries/rrdtool/rrdtool.SlackBuild b/libraries/rrdtool/rrdtool.SlackBuild
index 7e8e66e4f3a0..e2836af187c6 100644
--- a/libraries/rrdtool/rrdtool.SlackBuild
+++ b/libraries/rrdtool/rrdtool.SlackBuild
@@ -69,7 +69,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $TMP/$PRGNAM-$VERSION
chown -R root:root .
-chmod -R a-s,u+w,go+r-w .
+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 {} \;
# Correct hard-coded path to lua libs (thanks to pprkut for spotting this one!)
sed "s|/lib/lua|/lib${LIBDIRSUFFIX}/lua|g" -i configure
diff --git a/libraries/serd/serd.SlackBuild b/libraries/serd/serd.SlackBuild
index ae96b2c5bb9c..60354ebcd529 100644
--- a/libraries/serd/serd.SlackBuild
+++ b/libraries/serd/serd.SlackBuild
@@ -63,7 +63,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+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 {} \;
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
diff --git a/libraries/sord/sord.SlackBuild b/libraries/sord/sord.SlackBuild
index e2f4dfc4cbbe..5db200aae686 100644
--- a/libraries/sord/sord.SlackBuild
+++ b/libraries/sord/sord.SlackBuild
@@ -63,7 +63,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+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 {} \;
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
diff --git a/libraries/sratom/sratom.SlackBuild b/libraries/sratom/sratom.SlackBuild
index cd6a6459d12c..fc45c2d1b4a9 100644
--- a/libraries/sratom/sratom.SlackBuild
+++ b/libraries/sratom/sratom.SlackBuild
@@ -63,7 +63,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+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 {} \;
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
diff --git a/libraries/suil/suil.SlackBuild b/libraries/suil/suil.SlackBuild
index 285014df31bf..290b459b2999 100644
--- a/libraries/suil/suil.SlackBuild
+++ b/libraries/suil/suil.SlackBuild
@@ -63,7 +63,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+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 {} \;
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
diff --git a/libraries/swfdec/swfdec.SlackBuild b/libraries/swfdec/swfdec.SlackBuild
index 10ee6fe3fe78..fb2925e9b1f9 100644
--- a/libraries/swfdec/swfdec.SlackBuild
+++ b/libraries/swfdec/swfdec.SlackBuild
@@ -60,7 +60,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+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 {} \;
CFLAGS="$SLKCFLAGS" \
./configure \
diff --git a/libraries/tls/tls.SlackBuild b/libraries/tls/tls.SlackBuild
index 396d0f6b1f52..ab0d1cc9b0a8 100644
--- a/libraries/tls/tls.SlackBuild
+++ b/libraries/tls/tls.SlackBuild
@@ -43,7 +43,11 @@ cd $TMP || exit 1
tar -zxvf $CWD/$PRGNAM$VERSION-src.tar.gz || exit 1
cd $PRGNAM$VERSION || exit 1
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+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 {} \;
CFLAGS="$SLKCFLAGS" \
./configure \
diff --git a/libraries/wxPython/wxPython.SlackBuild b/libraries/wxPython/wxPython.SlackBuild
index 20f982b198a4..52fe917af85a 100644
--- a/libraries/wxPython/wxPython.SlackBuild
+++ b/libraries/wxPython/wxPython.SlackBuild
@@ -70,7 +70,11 @@ rm -rf $PRGNAM-src-$VERSION
tar xvf $CWD/$PRGNAM-src-$VERSION.tar.bz2
cd $PRGNAM-src-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+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 {} \;
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
diff --git a/libraries/xalan-c/xalan-c.SlackBuild b/libraries/xalan-c/xalan-c.SlackBuild
index 4401f6a80e85..d3a2b4f06cb0 100644
--- a/libraries/xalan-c/xalan-c.SlackBuild
+++ b/libraries/xalan-c/xalan-c.SlackBuild
@@ -81,7 +81,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/xalan-c-1.11_1335373.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+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 {} \;
XALANCROOT=$(pwd) \
XERCESCROOT="/usr" \
diff --git a/libraries/xerces-c/xerces-c.SlackBuild b/libraries/xerces-c/xerces-c.SlackBuild
index 932caaf00fd2..50de58dc0089 100644
--- a/libraries/xerces-c/xerces-c.SlackBuild
+++ b/libraries/xerces-c/xerces-c.SlackBuild
@@ -56,7 +56,11 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+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 {} \;
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
diff --git a/libraries/zend-opcache/zend-opcache.SlackBuild b/libraries/zend-opcache/zend-opcache.SlackBuild
index 5231763f048a..d2ef6656b77b 100644
--- a/libraries/zend-opcache/zend-opcache.SlackBuild
+++ b/libraries/zend-opcache/zend-opcache.SlackBuild
@@ -66,7 +66,11 @@ cd $TMP
tar xvf $CWD/$SRCNAM-$VERSION.tgz
cd $SRCNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+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 {} \;
phpize
CFLAGS="$SLKCFLAGS" \