summaryrefslogtreecommitdiffstats
path: root/graphics
diff options
context:
space:
mode:
author Niels Horn <niels.horn@gmail.com>2010-05-13 00:58:16 +0200
committer David Somero <xgizzmo@slackbuilds.org>2010-05-13 00:58:16 +0200
commitb9764d12902d14fef84781fa422a11ece849d937 (patch)
tree596030c4a837ac26e0f94f14fe1043e56fd8a5ab /graphics
parentfc89f27c2622d490b1d797b10f7c3ca94c2cf29b (diff)
downloadslackbuilds-b9764d12902d14fef84781fa422a11ece849d937.tar.gz
slackbuilds-b9764d12902d14fef84781fa422a11ece849d937.tar.xz
graphics/LDraw_data: Added to 13.0 repository
Diffstat (limited to 'graphics')
-rw-r--r--graphics/LDraw_data/LDraw_data.SlackBuild88
-rw-r--r--graphics/LDraw_data/LDraw_data.info10
-rw-r--r--graphics/LDraw_data/README8
-rw-r--r--graphics/LDraw_data/slack-desc19
4 files changed, 125 insertions, 0 deletions
diff --git a/graphics/LDraw_data/LDraw_data.SlackBuild b/graphics/LDraw_data/LDraw_data.SlackBuild
new file mode 100644
index 0000000000..07c9ebea14
--- /dev/null
+++ b/graphics/LDraw_data/LDraw_data.SlackBuild
@@ -0,0 +1,88 @@
+#!/bin/sh
+
+# Slackware build script for LDRAW datafiles, needed by
+# several LDraw utilities
+
+# Written by Niels Horn - niels.horn@gmail.com
+# revision date 2010/01/14
+
+PRGNAM=LDraw_data
+VERSION=200903
+ARCH=noarch
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+PRGSRC=complete.zip
+PRGUNZIPPED=ldraw
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGUNZIPPED
+unzip $CWD/$PRGSRC
+cd $PRGUNZIPPED
+
+# Check if we have the right version of the "source"
+srcver=$(echo "20$(basename $(ls -1 models/note*.txt | tail -n1) .txt | cut -b5-)")
+if [ "$srcver" -ne "$VERSION" ] ; then
+ echo "Version of source ($srcver) does not match VERSION variable ($VERSION)"
+ exit 1
+fi
+
+chown -R root:root .
+find . -type d -exec chmod 0755 {} \;
+find . -type f -exec chmod 0644 {} \;
+
+# Copy the 'read-only' data to the package
+mkdir -p $PKG/usr/share/LDRAW
+cp -a \
+ *.ldr p parts \
+ $PKG/usr/share/LDRAW/
+
+# Create / Copy the 'writable' sub-directories to /var/lib/ldraw/ and correct permissions
+mkdir -p $PKG/var/lib/ldraw/{models,bitmap}
+cp -a \
+ models \
+ $PKG/var/lib/ldraw/
+chgrp -R users $PKG/var/lib/ldraw/{models,bitmap}
+chmod 0775 $PKG/var/lib/ldraw/{models,bitmap}
+chmod 0664 $PKG/var/lib/ldraw/models/*
+
+# Create symlinks
+( cd $PKG/usr/share/LDRAW
+ ln -s ../../../var/lib/ldraw/bitmap BITMAP ; ln -s BITMAP bitmap
+ ln -s ../../../var/lib/ldraw/models MODELS ; ln -s MODELS models
+ ln -s parts PARTS
+ ln -s s PARTS/S
+ ln -s p P
+)
+
+# Move documentation
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/
+cp -a \
+ *.txt \
+ $PKG/usr/doc/$PRGNAM-$VERSION/
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+# unzip & make 'mklist'
+# (this is a one-time executable, that won't be installed,
+# so we don't worry about CFLAGS)
+unzip -o mklist1_4.zip
+make
+
+# Run 'mklist' to generate "parts.lst"
+( cd $PKG/usr/share/LDRAW
+ $TMP/$PRGUNZIPPED/mklist -d )
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/graphics/LDraw_data/LDraw_data.info b/graphics/LDraw_data/LDraw_data.info
new file mode 100644
index 0000000000..b2f84ec83e
--- /dev/null
+++ b/graphics/LDraw_data/LDraw_data.info
@@ -0,0 +1,10 @@
+PRGNAM="LDraw_data"
+VERSION="200903"
+HOMEPAGE="http://www.ldraw.org/"
+DOWNLOAD="http://www.ldraw.org/library/updates/complete.zip"
+MD5SUM="b356d5c887984abf0ea2cae855841957"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+MAINTAINER="Niels Horn"
+EMAIL="niels.horn@gmail.com"
+APPROVED="dsomero"
diff --git a/graphics/LDraw_data/README b/graphics/LDraw_data/README
new file mode 100644
index 0000000000..fc58c2e683
--- /dev/null
+++ b/graphics/LDraw_data/README
@@ -0,0 +1,8 @@
+LDraw_data is a package of data-files needed by several utilities based on
+LDRAW.
+
+This SlackBuild script compiles a temporary program to create the index file.
+Since it is only needed once, it is not copied to the created package.
+
+The source file ("complete.zip") is not versioned, but the SlackBuild checks
+the version of the data after unzipping.
diff --git a/graphics/LDraw_data/slack-desc b/graphics/LDraw_data/slack-desc
new file mode 100644
index 0000000000..543a7b3a2b
--- /dev/null
+++ b/graphics/LDraw_data/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|' on
+# the right side marks the last column you can put a character in. You must make
+# exactly 11 lines for the formatting to be correct. It's also customary to
+# leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+LDraw_data: LDraw_data (data files for LDRAW utilities)
+LDraw_data:
+LDraw_data: LDraw_data is a package of data files needed by several utilities
+LDraw_data: based on LDRAW.
+LDraw_data:
+LDraw_data: http://www.ldraw.org/
+LDraw_data:
+LDraw_data:
+LDraw_data:
+LDraw_data:
+LDraw_data: