aboutsummaryrefslogtreecommitdiff
path: root/academic/ngspice/ngspice.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'academic/ngspice/ngspice.SlackBuild')
-rw-r--r--academic/ngspice/ngspice.SlackBuild29
1 files changed, 9 insertions, 20 deletions
diff --git a/academic/ngspice/ngspice.SlackBuild b/academic/ngspice/ngspice.SlackBuild
index f26a847ed9519..475b67f9b11c6 100644
--- a/academic/ngspice/ngspice.SlackBuild
+++ b/academic/ngspice/ngspice.SlackBuild
@@ -7,13 +7,13 @@
# Set initial variables:
PRGNAM=ngspice
-VERSION=${VERSION:-26}
+VERSION=${VERSION:-27}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
@@ -24,8 +24,8 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@@ -63,7 +63,6 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-
# Fix the lib path to the code modules
if [ "$ARCH" = "x86_64" ]; then
sed -i "s%/lib/%/lib${LIBDIRSUFFIX}/%g" src/spinit.in
@@ -92,9 +91,6 @@ CFLAGS="$SLKCFLAGS" \
make
make DESTDIR=$PKG install
-mkdir -p $PKG/install
-cat $CWD/slack-desc > $PKG/install/slack-desc
-
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
@@ -111,18 +107,11 @@ mkdir -p $PKG/usr/share/icons/hicolor/48x48/apps
install -m644 $CWD/$PRGNAM.png $PKG/usr/share/icons/hicolor/48x48/apps/$PRGNAM.png
mkdir -p $PKG/usr/share/applications
-cat <<EOF > $PKG/usr/share/applications/$PRGNAM.desktop
-[Desktop Entry]
-Encoding=UTF-8
-Name=Ngspice
-Comment=A mixed-level/mixed-signal circuit simulator
-Exec=ngspice
-Terminal=true
-Type=Application
-Categories=Other
-Icon=ngspice
-StartupNotify=true
-EOF
+cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop
+
+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}