summaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2022-04-13 12:59:28 -0400
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2022-04-16 12:11:25 +0700
commita942a37a9a1a5024ae1afa34611fd9bdb8fc2283 (patch)
tree13e409fef3ecb3e25b6133150dce64ef7dfdbbd4 /system
parentbb769687e88e4c7d2b767a6692c3d678b1088391 (diff)
downloadslackbuilds-a942a37a9a1a5024ae1afa34611fd9bdb8fc2283.tar.gz
system/nagvis: Fix docs, symlinks.
Signed-off-by: B. Watson <yalhcru@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system')
-rw-r--r--system/nagvis/nagvis.SlackBuild24
1 files changed, 13 insertions, 11 deletions
diff --git a/system/nagvis/nagvis.SlackBuild b/system/nagvis/nagvis.SlackBuild
index e5bf4f4fac..6fbc3d041e 100644
--- a/system/nagvis/nagvis.SlackBuild
+++ b/system/nagvis/nagvis.SlackBuild
@@ -22,6 +22,10 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 20220413 bkw: Modified by SlackBuilds.org, BUILD=2:
+# - use relative symlinks in usr/share/$PRGNAM.
+# - remove 0-byte files from doc dir.
+
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=nagvis
@@ -32,9 +36,6 @@ PKGTYPE=${PKGTYPE:-tgz}
ARCH=noarch
-# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
-# the name of the created package would be, and then exit. This information
-# could be useful to other scripts.
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
@@ -55,9 +56,9 @@ cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
- -o -perm 511 \) -exec chmod 755 {} \; -o \
+ -o -perm 511 \) -exec chmod 755 {} \+ -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
- -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \+
# Patches thanks to Debian folks!
patch -p1 <$CWD/global.diff
@@ -82,12 +83,12 @@ mv $PKG/etc/$PRGNAM/geomap/demo* $PKG/usr/doc/$PRGNAM-$VERSION/demo/geomap
mv $PKG/etc/$PRGNAM/maps/demo* $PKG/usr/doc/$PRGNAM-$VERSION/demo/maps
# Symlink stupidity
-ln -s /var/lib/$PRGNAM/userfiles $PKG/usr/share/$PRGNAM/share/userfiles
-ln -s /usr/doc/$PRGNAM-$VERSION/html $PKG/usr/share/$PRGNAM/share/docs
-ln -s /usr/doc/$PRGNAM-$VERSION/html $PKG/usr/share/$PRGNAM/docs
-ln -s /etc/$PRGNAM $PKG/usr/share/$PRGNAM/etc
-ln -s /var/cache/$PRGNAM $PKG/usr/share/$PRGNAM/share/var
-ln -s /var/cache/$PRGNAM $PKG/usr/share/$PRGNAM/var
+ln -s ../../../../var/lib/$PRGNAM/userfiles $PKG/usr/share/$PRGNAM/share/userfiles
+ln -s ../../../doc/$PRGNAM-$VERSION/html $PKG/usr/share/$PRGNAM/share/docs
+ln -s ../../doc/$PRGNAM-$VERSION/html $PKG/usr/share/$PRGNAM/docs
+ln -s ../../../etc/$PRGNAM $PKG/usr/share/$PRGNAM/etc
+ln -s ../../../../var/cache/$PRGNAM $PKG/usr/share/$PRGNAM/share/var
+ln -s ../../../var/cache/$PRGNAM $PKG/usr/share/$PRGNAM/var
# Install configuration
sed -e "s#@NAGVIS_WEB@#/$PRGNAM#g" \
@@ -116,6 +117,7 @@ find $PKG/etc/$PRGNAM -type f ! -name '*.new' -exec mv {} {}.new \;
# Apache needs permissions
chown -R apache:apache $PKG/etc/$PRGNAM $PKG/var/{cache,lib}/$PRGNAM
+find $PKG/usr/doc/$PRGNAM-$VERSION -type f -a -empty | xargs rm -f
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install