summaryrefslogtreecommitdiff
path: root/development/eagle/eagle.SlackBuild
diff options
context:
space:
mode:
authorKyle Guinn <elyk03@gmail.com>2015-11-13 01:48:15 -0600
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2015-11-14 07:07:20 +0700
commit96a1330f5c423662ae9dec8033693b68a12179ba (patch)
treef36e109f5ec48a5899934b4f590352994b5b4333 /development/eagle/eagle.SlackBuild
parentbaf881f373e61372cbff4a5da47007a42671a1b5 (diff)
downloadslackbuilds-96a1330f5c423662ae9dec8033693b68a12179ba.tar.gz
development/eagle: Updated for version 7.4.0.
Signed-off-by: Kyle Guinn <elyk03@gmail.com>
Diffstat (limited to 'development/eagle/eagle.SlackBuild')
-rw-r--r--development/eagle/eagle.SlackBuild62
1 files changed, 43 insertions, 19 deletions
diff --git a/development/eagle/eagle.SlackBuild b/development/eagle/eagle.SlackBuild
index 74ae617eee..2cff859db2 100644
--- a/development/eagle/eagle.SlackBuild
+++ b/development/eagle/eagle.SlackBuild
@@ -24,33 +24,33 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=eagle
-VERSION=${VERSION:-7.2.0}
+VERSION=${VERSION:-7.4.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
-ARCH=i486
+
+ARCH=${ARCH:-$(uname -m)}
+case $ARCH in
+ i?86) PLATFORM=lin32; ARCH=i686 ;;
+ x86_64) PLATFORM=lin64 ;;
+ *) echo "$ARCH is unsupported."; exit 1 ;;
+esac
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-# Documentation is distributed for English, German and Chinese. Due to the size
-# of the documentation, only include one language.
-LANG=${LANG:-"en"}
-if [ "$LANG" = "de" ]; then
- DOCS="README_de UPDATE_de library_de.txt license_de.txt manual_de.pdf tutorial_de.pdf eagle.dtd connect-device-split-symbol-de.pdf generate-3d-idf-data_de.pdf make-symbol-device-package-bsdl-2011-de.pdf elektro-tutorial.pdf"
-elif [ "$LANG" = "zh" ]; then
- DOCS="README_en UPDATE_en library_en.txt license_en.txt manual_zh.pdf tutorial_zh.pdf eagle.dtd"
-else
- DOCS="README_en UPDATE_en library_en.txt license_en.txt manual_en.pdf tutorial_en.pdf eagle.dtd connect-device-split-symbol-en.pdf generate-3d-idf-data_en.pdf make-symbol-device-package-bsdl-2011-en.pdf EagleIDFExporterInstructions.pdf layer-setup_designrules.pdf"
-fi
+# Documentation is distributed for English, German and Chinese.
+# Due to the size of the documentation, only include one language.
+DOC_LANG=${DOC_LANG:-en} # one of "all", "de", "en", or "zh"
set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
-sh $CWD/$PRGNAM-lin-$VERSION.run $PKG/opt
+sh $CWD/$PRGNAM-$PLATFORM-$VERSION.run $PKG/opt
chown -R root:root $PKG
+chmod -R u+w,go-w,a+rX-st $PKG
# Create the license key file. EAGLE will write to this the first time it is
# run. After that, you can change the permissions to 0644 if you wish.
@@ -73,14 +73,38 @@ mkdir -p $PKG/usr/man/man1
mv $PKG/opt/$PRGNAM-$VERSION/doc/*.1 $PKG/usr/man/man1
find $PKG/usr/man -type f -exec gzip -9 {} +
+if [ ${DOC_LANG} != "all" ]; then
+ # Move each language-specific file to its own subdir.
+ cd $PKG/opt/$PRGNAM-$VERSION/doc
+ for lang in de en zh; do mkdir -p ${lang}/ulp; done
+ for lang in de en; do mv README_${lang} ${lang}/README; done
+ for lang in de en; do mv UPDATE_${lang} ${lang}/UPDATE; done
+ for lang in de en; do mv library_${lang}.txt ${lang}/library.txt; done
+ for lang in de en; do mv license_${lang}.txt ${lang}/license.txt; done
+ for lang in de en zh; do mv manual_${lang}.pdf ${lang}/manual.pdf; done
+ for lang in de en zh; do mv tutorial_${lang}.pdf ${lang}/tutorial.pdf; done
+ for lang in de en; do mv ulp/connect-device-split-symbol-${lang}.pdf ${lang}/ulp/connect-device-split-symbol.pdf; done
+ for lang in de en; do mv ulp/generate-3d-idf-data_${lang}.pdf ${lang}/ulp/generate-3d-idf-data.pdf; done
+ for lang in de en; do mv ulp/make-symbol-device-package-bsdl-2011-${lang}.pdf ${lang}/ulp/make-symbol-device-package-bsdl-2011.pdf; done
+
+ # Prefer the English docs as a base set.
+ cd $PKG/opt/$PRGNAM-$VERSION/doc/en
+ find . -type f -exec mv {} ../{} \;
+
+ # Replace the base set with other languages.
+ cd $PKG/opt/$PRGNAM-$VERSION/doc/${DOC_LANG}
+ find . -type f -exec mv {} ../{} \;
+
+ # Delete all alternate language files.
+ cd $PKG/opt/$PRGNAM-$VERSION/doc
+ for lang in de en zh; do rm -rf ${lang}; done
+fi
+
# Move the documentation to the proper location
-mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+mkdir -p $PKG/usr/doc
+mv $PKG/opt/$PRGNAM-$VERSION/doc $PKG/usr/doc/$PRGNAM-$VERSION
+ln -s /usr/doc/$PRGNAM-$VERSION $PKG/opt/$PRGNAM-$VERSION/doc
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
-cd $PKG/opt/$PRGNAM-$VERSION
-for d in $DOCS; do mv doc/$d $PKG/usr/doc/$PRGNAM-$VERSION/; done
- rm -rf doc
- ln -s /usr/doc/$PRGNAM-$VERSION doc
-cd -
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc