Browse Source

xap/pymol: Added.

slackware-14.2
Damien Goutte-Gattat 13 years ago
parent
commit
82d0c4fc96
  1. 3
      xap/pymol/doinst.sh
  2. 1
      xap/pymol/pymol-1.0.tar.gz.sha1
  3. 118
      xap/pymol/pymol.SlackBuild
  4. 10
      xap/pymol/pymol.desktop
  5. 12
      xap/pymol/slack-desc

3
xap/pymol/doinst.sh

@ -0,0 +1,3 @@
if [ -x /usr/bin/update-desktop-database ]; then
/usr/bin/update-desktop-database -q usr/share/applications
fi

1
xap/pymol/pymol-1.0.tar.gz.sha1

@ -0,0 +1 @@
f307167b6276e01bb13b74551e2ca9085df66db5 pymol-1.0.tar.gz

118
xap/pymol/pymol.SlackBuild

@ -0,0 +1,118 @@
#!/bin/bash
# Build script for Slackware
# Damien Goutte-Gattat "gouttegd" < damien.goutte-gattat at e.ujf-grenoble.fr >
#
# Redistribution and use of this script, with or without modifications, 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.
#
# Latest PyMOL sourcecode is available at:
# http://pymol.sourceforge.net/
#
# Depends: l/pmw
# Source package infos
NAMESRC=${NAMESRC:-pymol}
VERSION=${VERSION:-1.0}
ARCHIVE=${ARCHIVE:-$NAMESRC-$VERSION.tar.gz}
SVN=${SVN:-https://pymol.svn.sourceforge.net/svnroot/pymol/branches/b10/pymol}
# Built package infos
NAMETGZ=${NAMETGZ:-pymol}
BUILD=${BUILD:-2GGD}
ARCH=${ARCH:-i486}
TARGET=${TARGET:-i486}
# Directories
TMP=${TMP:-/tmp}
OUT=${OUT:-$TMP/build}
PKG=${PKG:-$OUT/$NAMETGZ}
CWD=$(pwd)
# Get the "site-packages" directory of the Python installation
SITEPKG=$(python <<EOF
#!/usr/bin/python
import sys
for p in sys.path:
if p[-13:] == 'site-packages':
print p
EOF)
set -e # Quit if a command returns non-zero
# Sanity checks
if [ $UID -eq 0 ]; then
echo "You should NOT run this script as ROOT!"
exit 1
fi
if [ ! -d $TMP ]; then
echo "$TMP does not exist or is not a directory!"
exit 1
fi
# Get the sources
if [ -r $ARCHIVE ]; then
sha1sum -c $ARCHIVE.sha1
tar xf $ARCHIVE -C $TMP
else
svn export $SVN $TMP/$NAMETGZ-$VERSION
fi
# Compile
cd $TMP
echo "Building $NAMETGZ-$VERSION..."
cd $NAMETGZ-$VERSION
python setup.py build
python setup.py install --prefix=$PKG/usr
# Install supplementary data (not installed by the setup.py script)
mkdir -p $PKG/usr/share/{pymol,applications}
cp -R data test scripts examples $PKG/usr/share/pymol
install -m 0644 $CWD/pymol.desktop $PKG/usr/share/applications
# Install the launching script
mkdir -p $PKG/usr/bin
cat > $PKG/usr/bin/pymol <<EOF
#!/bin/sh
export PYMOL_DATA=/usr/share/pymol/data
export PYMOL_SCRIPTS=/usr/share/pymol/scripts
python $SITEPKG/pymol/__init__.py \$*
EOF
chmod 755 $PKG/usr/bin/pymol
# Install the documentation
mkdir -p $PKG/usr/doc/$NAMETGZ-$VERSION
install -m 644 \
AUTHORS COPYING ChangeLog DEVELOPERS INSTALL LICENSE NEWS PACKAGING README \
$PKG/usr/doc/$NAMETGZ-$VERSION
# Copy slack-desc and doinst.sh files
install -D -m 0644 $CWD/slack-desc $PKG/install/slack-desc
install -m 0755 $CWD/doinst.sh $PKG/install/doinst.sh
# Package the tree
cd $PKG
mkdir -p $OUT
PACKAGING="
chown root:root . -R
/sbin/makepkg -l y -c n $OUT/$NAMETGZ-$VERSION-$ARCH-$BUILD.tgz
rm -rf $PKG
rm -rf $TMP/$NAMETGZ-$VERSION
"
if type -p fakeroot ; then
echo "$PACKAGING" | fakeroot
else
su -c "$PACKAGING"
fi

10
xap/pymol/pymol.desktop

@ -0,0 +1,10 @@
[Desktop Entry]
Name=PyMOL
Comment=Molecular Visualization Program
Exec=pymol
Icon=/usr/share/icons/hicolor/64x64/apps/kalzium.png
Terminal=false
Type=Application
Categories=GNOME;GTK;Qt;KDE;Science
StartupNotify=false
GenericName=Molecular Visualization Program

12
xap/pymol/slack-desc

@ -0,0 +1,12 @@
|-----handy-ruler------------------------------------------------------|
pymol: pymol (Molecular visualization system)
pymol:
pymol: PyMOL is an open-source molecular visualization system.
pymol:
pymol:
pymol:
pymol:
pymol:
pymol:
pymol:
pymol:
Loading…
Cancel
Save