mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-22 19:44:21 +01:00
8b610bdb19
Signed-off-by: Kyle Guinn <elyk03@gmail.com>
90 lines
3.7 KiB
Bash
90 lines
3.7 KiB
Bash
#!/bin/sh
|
|
|
|
# Slackware build script for eagle (binary repackaging)
|
|
|
|
# Copyright 2008,2015 Kyle Guinn <elyk03@gmail.com>, USA
|
|
# Copyright 2010,2013 Niels Horn, Rio de Janeiro, RJ, Brazil
|
|
# All rights reserved.
|
|
#
|
|
# Redistribution and use of this script, with or without modification, is
|
|
# permitted provided that the following conditions are met:
|
|
#
|
|
# 1. Redistributions of this script must retain the above copyright
|
|
# notice, this list of conditions and the following disclaimer.
|
|
#
|
|
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
|
|
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
|
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
|
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
|
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
|
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
|
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
|
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
|
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
PRGNAM=eagle
|
|
VERSION=${VERSION:-7.2.0}
|
|
BUILD=${BUILD:-1}
|
|
TAG=${TAG:-_SBo}
|
|
ARCH=i486
|
|
|
|
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
|
|
|
|
set -e
|
|
|
|
rm -rf $PKG
|
|
mkdir -p $TMP $PKG $OUTPUT
|
|
sh $CWD/$PRGNAM-lin-$VERSION.run $PKG/opt
|
|
chown -R root:root $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.
|
|
touch $PKG/opt/$PRGNAM-$VERSION/bin/$PRGNAM.key
|
|
chmod 0666 $PKG/opt/$PRGNAM-$VERSION/bin/$PRGNAM.key
|
|
|
|
mkdir -p $PKG/usr/bin
|
|
ln -s /opt/$PRGNAM-$VERSION/bin/$PRGNAM $PKG/usr/bin/eagle
|
|
|
|
mkdir -p $PKG/usr/share/icons/hicolor/16x16/apps
|
|
mkdir -p $PKG/usr/share/icons/hicolor/48x48/apps
|
|
ln -s /opt/$PRGNAM-$VERSION/bin/eagleicon16.png $PKG/usr/share/icons/hicolor/16x16/apps/$PRGNAM.png
|
|
ln -s /opt/$PRGNAM-$VERSION/bin/eagleicon50.png $PKG/usr/share/icons/hicolor/48x48/apps/$PRGNAM.png
|
|
|
|
mkdir -p $PKG/usr/share/applications
|
|
cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop
|
|
|
|
# Move any man pages to the proper location
|
|
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 {} +
|
|
|
|
# Move the documentation to the proper location
|
|
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
|
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
|
|
cat $CWD/doinst.sh > $PKG/install/doinst.sh
|
|
|
|
cd $PKG
|
|
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
|