Browse Source

xap/pymol: Upgraded to pymol-1.4.1.

slackware-14.2
Damien Goutte-Gattat 10 years ago
parent
commit
8fe84c4792
  1. 3
      xap/pymol/doinst.sh
  2. 1
      xap/pymol/pymol-1.0.tar.gz.sha1
  3. 1
      xap/pymol/pymol-v1.4.1.tar.bz2.sha1
  4. 39
      xap/pymol/pymol.SlackBuild
  5. 9
      xap/pymol/python26.diff

3
xap/pymol/doinst.sh

@ -1,3 +1,4 @@
#!/bin/sh
if [ -x /usr/bin/update-desktop-database ]; then
/usr/bin/update-desktop-database -q usr/share/applications
/usr/bin/update-desktop-database ./usr/share/applications >/dev/null 2>&1
fi

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

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

1
xap/pymol/pymol-v1.4.1.tar.bz2.sha1

@ -0,0 +1 @@
085c83af192c53160060fac14c438ca31c5b6ebf pymol-v1.4.1.tar.bz2

39
xap/pymol/pymol.SlackBuild

@ -1,6 +1,6 @@
#!/bin/bash
# Build script for Slackware
# Copyright (C) 2008,2009 Damien Goutte-Gattat
# Copyright (C) 2008,2009,2011 Damien Goutte-Gattat
#
# Redistribution and use of this script, with or without modifications,
# is permitted provided that the following conditions are met:
@ -29,14 +29,14 @@
# 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}
VERSION=${VERSION:-1.4.1}
ARCHIVE=${ARCHIVE:-$NAMESRC-v$VERSION.tar.bz2}
WGET=${WGET:-https://downloads.sourceforge.net/pymol/$ARCHIVE}
# Built package infos
NAMEPKG=${NAMEPKG:-pymol}
BUILD=${BUILD:-3GGD}
ARCH=${ARCH:-i486}
BUILD=${BUILD:-1GGD}
ARCH=${ARCH:-$(uname -m | sed 's/^i.86$/i486/;s/^arm.*/arm/')}
EXT=${EXT:-txz}
# Directories
@ -44,14 +44,14 @@ TMP=${TMP:-/tmp}
OUT=${OUT:-$TMP/build}
PKG=${PKG:-$OUT/$NAMEPKG}
CWD=$(pwd)
# Get the "site-packages" directory of the Python installation
SITEPKG=$(python <<EOF
# Get the 'site-packages' directory in the Python installation
SITEPKG=`python <<EOF | tail -n 1
#!/usr/bin/python
import sys
for p in sys.path:
if p[-13:] == 'site-packages':
print p
EOF)
EOF`
set -e # Quit if a command returns non-zero
@ -66,20 +66,20 @@ if [ ! -d $TMP ]; then
fi
# Get the sources
if [ -r $ARCHIVE ]; then
sha1sum -c $ARCHIVE.sha1
tar xf $ARCHIVE -C $TMP
else
svn export $SVN $TMP/$NAMEPKG-$VERSION
if [ ! -f $ARCHIVE ]; then
wget -c -O $ARCHIVE.part "$WGET"
mv $ARCHIVE.part $ARCHIVE
fi
sha1sum -c $ARCHIVE.sha1
NAME=$(tar ft $ARCHIVE | head -n 1 | cut -d / -f 1)
# Compile
cd $TMP
echo "Building $NAMEPKG-$VERSION..."
cd $NAMEPKG-$VERSION
[ -f $CWD/python26.diff ] && patch -p1 < $CWD/python26.diff
tar xf $CWD/$ARCHIVE
cd $NAME
python setup.py build
python setup.py install --prefix=$PKG/usr
python setup.py install --root=$PKG
# Install supplementary data (not installed by the setup.py script)
mkdir -p $PKG/usr/share/{pymol,applications}
@ -90,6 +90,7 @@ install -m 0644 $CWD/pymol.desktop $PKG/usr/share/applications
mkdir -p $PKG/usr/bin
cat > $PKG/usr/bin/pymol <<EOF
#!/bin/sh
export PYMOL_PATH=/usr/share/pymol
export PYMOL_DATA=/usr/share/pymol/data
export PYMOL_SCRIPTS=/usr/share/pymol/scripts
python $SITEPKG/pymol/__init__.py \$*
@ -98,9 +99,9 @@ chmod 755 $PKG/usr/bin/pymol
# Install the documentation
mkdir -p $PKG/usr/doc/$NAMEPKG-$VERSION
install -m 644 \
AUTHORS COPYING ChangeLog DEVELOPERS INSTALL LICENSE NEWS PACKAGING README \
install -m 644 AUTHORS COPYING ChangeLog DEVELOPERS LICENSE NEWS README \
$PKG/usr/doc/$NAMEPKG-$VERSION
cp -R examples $PKG/usr/doc/$NAMEPKG-$VERSION
# Copy slack-desc and doinst.sh files
install -D -m 0644 $CWD/slack-desc $PKG/install/slack-desc

9
xap/pymol/python26.diff

@ -1,9 +0,0 @@
diff -Naur pymol-1.0.orig/modules/pymol/api.py pymol-1.0/modules/pymol/api.py
--- pymol-1.0.orig/modules/pymol/api.py 2007-07-09 04:38:03.000000000 +0200
+++ pymol-1.0/modules/pymol/api.py 2009-08-30 00:04:41.907542255 +0200
@@ -371,4 +371,4 @@
# 1. stick with Python <=2.5 for as long as possible
# 2. convert API method to cmd.show_as() and leave "as" in the scripting langauge
# 3. allow "show_as" in the scripting language
-as = show_as
+globals()['as'] = show_as
Loading…
Cancel
Save