summaryrefslogtreecommitdiff
path: root/academic/xephem
diff options
context:
space:
mode:
authorDario Nicodemi <dario.sbo@gmail.com>2010-04-08 22:12:25 -0500
committerRobby Workman <rworkman@slackbuilds.org>2010-05-15 10:25:33 +0200
commite33c641b630ab8d7150403793685f2eccee0ce60 (patch)
tree89c3bf166ec8de40c51c2392f2814bf038b33f1f /academic/xephem
parenta03ccc1bbcd0184feb71aaa606a34deee04abadf (diff)
downloadslackbuilds-e33c641b630ab8d7150403793685f2eccee0ce60.tar.gz
academic/xephem: Added (an astronomy program)
Diffstat (limited to 'academic/xephem')
-rw-r--r--academic/xephem/00_trailmenu.patch12
-rw-r--r--academic/xephem/README6
-rw-r--r--academic/xephem/XEphem2
-rw-r--r--academic/xephem/doinst.sh19
-rw-r--r--academic/xephem/slack-desc19
-rwxr-xr-xacademic/xephem/xephem.SlackBuild92
-rw-r--r--academic/xephem/xephem.desktop12
-rw-r--r--academic/xephem/xephem.info10
8 files changed, 172 insertions, 0 deletions
diff --git a/academic/xephem/00_trailmenu.patch b/academic/xephem/00_trailmenu.patch
new file mode 100644
index 0000000000..c7909ef5b1
--- /dev/null
+++ b/academic/xephem/00_trailmenu.patch
@@ -0,0 +1,12 @@
+diff -durN xephem-3.7.2.orig/GUI/xephem/trailmenu.c xephem-3.7.2/GUI/xephem/trailmenu.c
+--- xephem-3.7.2.orig/GUI/xephem/trailmenu.c 2006-05-07 04:12:19.000000000 +0200
++++ xephem-3.7.2/GUI/xephem/trailmenu.c 2007-05-26 12:17:10.000000000 +0200
+@@ -1010,6 +1010,8 @@
+ }
+
+ statep->customi = days;
++ } else {
++ statep->customi = 0;
+ }
+
+
diff --git a/academic/xephem/README b/academic/xephem/README
new file mode 100644
index 0000000000..ab546d369a
--- /dev/null
+++ b/academic/xephem/README
@@ -0,0 +1,6 @@
+xephem - Astronomy program
+
+xephem is a scientific-grade interactive astronomical ephemeris software
+package for UNIX-like* systems.
+
+Note that this is not free software: read the license agreement carefully.
diff --git a/academic/xephem/XEphem b/academic/xephem/XEphem
new file mode 100644
index 0000000000..cdf7c53bb3
--- /dev/null
+++ b/academic/xephem/XEphem
@@ -0,0 +1,2 @@
+XEphem.ShareDir: /usr/share/xephem
+XEphem.PrivateDir: ~/.xephem
diff --git a/academic/xephem/doinst.sh b/academic/xephem/doinst.sh
new file mode 100644
index 0000000000..995b974819
--- /dev/null
+++ b/academic/xephem/doinst.sh
@@ -0,0 +1,19 @@
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
+ # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+config etc/X11/app-defaults/XEphem.new
+
+if [ -x /usr/bin/update-desktop-database ]; then
+ /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
+fi
+
diff --git a/academic/xephem/slack-desc b/academic/xephem/slack-desc
new file mode 100644
index 0000000000..146243080a
--- /dev/null
+++ b/academic/xephem/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------------------------------------------------------|
+xephem: xephem (Astronomy program)
+xephem:
+xephem: The scientific-grade interactive astronomical ephemeris
+xephem: software package for UNIX-like* systems.
+xephem:
+xephem: Note that this is not free software: read the license
+xephem: agreement carefully.
+xephem:
+xephem:
+xephem:
+xephem:
diff --git a/academic/xephem/xephem.SlackBuild b/academic/xephem/xephem.SlackBuild
new file mode 100755
index 0000000000..7b3e54471c
--- /dev/null
+++ b/academic/xephem/xephem.SlackBuild
@@ -0,0 +1,92 @@
+#!/bin/sh
+
+# Slackware build script for xephem
+
+# Written by Dario Nicodemi dario.sbo@gmail.com
+
+PRGNAM=xephem
+VERSION=${VERSION:-3.7.4}
+ARCH=${ARCH:-i486}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp} # Drop the package in /tmp
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+fi
+
+set -e # Exit on most errors
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+cd $PRGNAM-$VERSION
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+sed -i 's/^CFLAGS=/override CFLAGS+=/g' libip/Makefile
+sed -i 's/^CFLAGS =/override CFLAGS +=/g' libpng/Makefile
+sed -i 's/^CFLAGS =/override CFLAGS +=/g' GUI/xephem/Makefile
+
+cd GUI/xephem
+ patch -p3 < $CWD/00_trailmenu.patch
+ make CFLAGS="$SLKCFLAGS" CLDFLAGS="" MOTIFL="/usr/lib$LIBDIRSUFFIX" || exit 1
+ mkdir -p $PKG/usr/{bin,man/man1,share/xephem}
+ cp xephem $PKG/usr/bin
+ cp XEphem.png $PKG/usr/share/xephem
+ cp -R auxil $PKG/usr/share/xephem
+ cp -R catalogs $PKG/usr/share/xephem
+ cp -R fifos $PKG/usr/share/xephem
+ cp -R fits $PKG/usr/share/xephem
+ cp -R gallery $PKG/usr/share/xephem
+ cp -R help $PKG/usr/share/xephem
+ cp -R lo $PKG/usr/share/xephem
+ cp xephem.1 $PKG/usr/man/man1
+cd -
+
+# Install desktop file
+mkdir -p $PKG/usr/share/{applications,pixmaps}
+cat $CWD/xephem.desktop > $PKG/usr/share/applications/xephem.desktop
+cat $PKG/usr/share/xephem/XEphem.png > $PKG/usr/share/pixmaps/xephem.png
+
+# Install X defaults
+mkdir -p $PKG/etc/X11/app-defaults
+cat $CWD/XEphem > $PKG/etc/X11/app-defaults/XEphem.new
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+( cd $PKG/usr/man
+ find . -type f -exec gzip -9 {} \;
+ for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+)
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a \
+ Copyright INSTALL README \
+ $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+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}
diff --git a/academic/xephem/xephem.desktop b/academic/xephem/xephem.desktop
new file mode 100644
index 0000000000..84ebf4bcc5
--- /dev/null
+++ b/academic/xephem/xephem.desktop
@@ -0,0 +1,12 @@
+[Desktop Entry]
+Version=1.0
+Exec=xephem
+TryExec=xephem
+Icon=xephem
+Terminal=false
+Name=XEphem
+GenericName=Astronomy program
+Comment=Astronomy program
+Categories=Education;Science;Astronomy;
+Type=Application
+StartupNotify=false
diff --git a/academic/xephem/xephem.info b/academic/xephem/xephem.info
new file mode 100644
index 0000000000..7d4446c1da
--- /dev/null
+++ b/academic/xephem/xephem.info
@@ -0,0 +1,10 @@
+PRGNAM="xephem"
+VERSION="3.7.4"
+HOMEPAGE="http://www.clearskyinstitute.com/xephem/"
+DOWNLOAD="http://97.74.56.125/free/xephem-3.7.4.tar.gz"
+MD5SUM="4e9290609f36df469a2ba5a1b4fffd46"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+MAINTAINER="Dario Nicodemi"
+EMAIL="dario.sbo@gmail.com"
+APPROVED="rworkman"