Skip to content

Commit

Permalink
npm-bower: rebuilt to remove /usr/etc empty dir
Browse files Browse the repository at this point in the history
  • Loading branch information
conraid committed Apr 7, 2015
1 parent 156d18c commit 16c44d2
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions npm-bower/npm-bower.SlackBuild
Expand Up @@ -34,7 +34,7 @@ PRGNAME=${PRGNAME:-bower}
PKGNAME=npm-$(echo ${PRGNAME} | tr A-Z a-z)
VERSION=${VERSION:-1.4.1}
PKGVERSION=${VERSION//-/_}
BUILD=${BUILD:-1}
BUILD=${BUILD:-2}
TAG=${TAG:-cf}
TMP=${TMP:-/tmp/pkg}
PKG=${TMP}/package-${PKGNAME}
Expand Down Expand Up @@ -86,18 +86,15 @@ chown -R root:root .
chmod -R u+w,go+r-w,a-s .

# Build and install:
DESTDIR=${PKG} npm install --user root -g ${PRGNAME}
DESTDIR=${PKG} npm install --user root -g

# Remove empty /usr/etc dir
rmdir ${PKG}/usr/etc

# Strip binaries:
find ${PKG} | xargs file | grep -e "executable" -e "shared object" | grep ELF | cut -f 1 -d : | xargs -r strip --strip-unneeded 2> /dev/null || true
find ${PKG} | xargs file | grep "current ar archive" | cut -f 1 -d : | xargs -r strip -g 2> /dev/null || true

# Compress and link manpages, if any:
if [ -d ${PKG}/usr/man ]; then
find ${PKG}/usr/man -type f -exec chmod 644 {} \; -exec gzip -9 {} \;
for i in $( find ${PKG}/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
fi

# Add a documentation directory:
mkdir -p ${DOCDIR}
cp -a ${DOCFILES} ${DOCDIR} || true
Expand Down

0 comments on commit 16c44d2

Please sign in to comment.