diff options
-rw-r--r-- | .SRCINFO | 17 | ||||
-rw-r--r-- | PKGBUILD | 133 | ||||
-rw-r--r-- | modeller.install | 43 |
3 files changed, 63 insertions, 130 deletions
@@ -1,17 +1,20 @@ +# Generated by mksrcinfo v8 +# Wed Feb 10 13:05:49 UTC 2016 pkgbase = modeller pkgdesc = 3D Structure Homology Modeller - pkgver = 9.15 - pkgrel = 2 + pkgver = 9.16 + pkgrel = 1 url = http://salilab.org/modeller/ - install = modeller.install arch = i686 arch = x86_64 license = custom - depends = python2 depends = glib2 - optdepends = python: python3 support - source = http://www.salilab.org/modeller/9.15/modeller-9.15.tar.gz - sha256sums = 9833eace132429abee54f2f7055a55f88ac9990cd79024f95a58d12161ca8eee + optdepends = python: python support + optdepends = python2: python2 support + backup = etc/modeller/config.py + source = http://www.salilab.org/modeller/9.16/modeller-9.16.tar.gz + md5sums = 62d31d27d437cf48458a997f977caab4 + sha512sums = 5d3dba6134a9583d269ae0df93b05e536a753e00568c1a5562cf1e28bff07eb31185404f4a8b355832096aeb7ea320307e7ec620fc09e56c026c8143c3e4104a pkgname = modeller @@ -5,98 +5,71 @@ # Contributor: Fabio Zanini <iosonofabio@gmail.com> pkgname=modeller -pkgver=9.15 -pkgrel=2 +pkgver=9.16 +pkgrel=1 pkgdesc="3D Structure Homology Modeller" arch=('i686' 'x86_64') url="http://salilab.org/modeller/" license=('custom') -depends=('python2' 'glib2') -optdepends=('python: python3 support') -install=modeller.install -source=("http://www.salilab.org/modeller/$pkgver/modeller-$pkgver.tar.gz") - -sha256sums=('9833eace132429abee54f2f7055a55f88ac9990cd79024f95a58d12161ca8eee') +depends=('glib2') +optdepends=('python: python support' + 'python2: python2 support') +backup=("etc/$pkgname/config.py") +source=("http://www.salilab.org/modeller/$pkgver/$pkgname-$pkgver.tar.gz") +md5sums=('62d31d27d437cf48458a997f977caab4') +sha512sums=('5d3dba6134a9583d269ae0df93b05e536a753e00568c1a5562cf1e28bff07eb31185404f4a8b355832096aeb7ea320307e7ec620fc09e56c026c8143c3e4104a') package() { - cd $srcdir/$pkgname-$pkgver - - #set default values: - VER="9.15" - VERENV="9v15" - MOD="MODELLER ${VER}" - PROGRAM=mod${VER} - MODINSTALL="${pkgdir}/usr/lib/modeller" _MODINSTALL="/usr/lib/modeller" - if [ "${CARCH}" = "i686" ]; then - # for i686 - EXECUTABLE_TYPE="i386-intel8" - elif [ "${CARCH}" = "x86_64" ]; then - # for x86_64 - EXECUTABLE_TYPE="x86_64-intel8" - else - error "MODELLER is only available for i386 and x86_64!" - fi - + cd "$pkgname-$pkgver" + + case "$CARCH" in + i686) + _EXECUTABLE_TYPE="i386-intel8" ;; + x86_64) + _EXECUTABLE_TYPE="x86_64-intel8" ;; + *) + error "MODELLER is only available for i386 and x86_64!" ;; + esac + # Change directory permisssions - find . -type d -exec chmod 755 {} \; - + find . -type d -exec chmod 755 {} + + # Installing Modeller files - mkdir -p "${MODINSTALL}" - cp -R README INSTALLATION doc examples modlib src "${MODINSTALL}" - mkdir -p "${MODINSTALL}/bin" - cp -R bin/*.top bin/modslave.py bin/lib bin/${PROGRAM}_${EXECUTABLE_TYPE} \ - "${MODINSTALL}/bin" - mkdir -p "${MODINSTALL}/lib" - cp -R lib/${EXECUTABLE_TYPE} "${MODINSTALL}/lib" + mkdir -p "$pkgdir/$_MODINSTALL/"{bin,lib} + cp -R README INSTALLATION doc examples modlib src "$pkgdir/$_MODINSTALL" + cp -R bin/*.top bin/lib "bin/mod${pkgver}_${_EXECUTABLE_TYPE}" "$pkgdir/$_MODINSTALL/bin" + cp -R "lib/$_EXECUTABLE_TYPE" "$pkgdir/$_MODINSTALL/lib" # Creating Modeller startup scripts - sed -e "s;EXECUTABLE_TYPE${VERENV}=xxx;EXECUTABLE_TYPE${VERENV}=$EXECUTABLE_TYPE;" \ - -e "s;MODINSTALL${VERENV}=xxx;MODINSTALL${VERENV}=\"$_MODINSTALL\";" \ - bin/modscript > "${MODINSTALL}/bin/${PROGRAM}" - sed -e "s;@TOPDIR\@;\"$_MODINSTALL\";" \ - -e "s;@EXETYPE\@;$EXECUTABLE_TYPE;" \ - bin/modpy.sh.in > "${MODINSTALL}/bin/modpy.sh" - chmod a+x "${MODINSTALL}/bin/${PROGRAM}" "${MODINSTALL}/bin/modpy.sh" - sed -e "s;/usr/bin/python;/usr/bin/python2;" \ - bin/modslave.py > "${MODINSTALL}/bin/modslave.py" - - # Creating simbol link - install -d ${pkgdir}/usr/bin/ - ln -sf ${_MODINSTALL}/bin/mod$pkgver ${pkgdir}/usr/bin/mod$pkgver - ln -sf ${_MODINSTALL}/bin/modpy.sh ${pkgdir}/usr/bin/modpy.sh - ln -sf ${_MODINSTALL}/bin/modslave.py ${pkgdir}/usr/bin/modslave.py + sed -r "s|(EXECUTABLE_TYPE[0-9v]+)=x+|\1=$_EXECUTABLE_TYPE|;s|(MODINSTALL[0-9v]+)=x+|\1=\"$_MODINSTALL\"|" \ + bin/modscript > "$pkgdir/$_MODINSTALL/bin/mod$pkgver" + sed 's|@TOPDIR@|"'"$_MODINSTALL"'"|; s|@EXETYPE@|'"$_EXECUTABLE_TYPE"'|' \ + bin/modpy.sh.in > "$pkgdir/$_MODINSTALL/bin/modpy.sh" + sed '1s/^.*$/&2/' bin/modslave.py > "$pkgdir/$_MODINSTALL/bin/modslave.py" + + # create symlinks + install -dm755 "$pkgdir/usr/bin" + for _f in mod$pkgver modpy.sh modslave.py; do + chmod +x "$pkgdir/$_MODINSTALL/bin/$_f" + ln -sf "$_MODINSTALL/bin/$_f" "$pkgdir/usr/bin/" + done - # Create config.py is it not exists - if [ ! -f "${_MODINSTALL}/modlib/modeller/config.py" ]; then - msg "Creating '${_MODINSTALL}/config.py'..." - echo "license = 'XXXX'" > "${MODINSTALL}/modlib/modeller/config.py" - msg "Done! Add your license code to '${_MODINSTALL}/config.py'." - else - msg "Found existing config.py. Please check that the license code within this file is correct!" - fi - - # Add modeller libs to ld.so.conf - msg "Adding MODELLER to ld.so.conf..." - install -d ${pkgdir}/etc/ld.so.conf.d - echo "/usr/lib/${pkgname}/lib/${EXECUTABLE_TYPE}" > ${pkgdir}/etc/ld.so.conf.d/${pkgname}.conf + # create config.py + install -dm755 "$pkgdir/etc/$pkgname" + echo "license = 'XXXX'" > "$pkgdir/etc/$pkgname/config.py" + ln -s /etc/$pkgname/config.py "$pkgdir/$_MODINSTALL/modlib/modeller/config.py" - # Install python2 module - msg "Installing package for python2..." - install -d ${pkgdir}/usr/lib/python2.7/site-packages - ln -s ${_MODINSTALL}/modlib/modeller ${pkgdir}/usr/lib/python2.7/site-packages/modeller - - ln -s ${_MODINSTALL}/lib/${EXECUTABLE_TYPE}/python2.5/_modeller.so ${pkgdir}/usr/lib/python2.7/site-packages/_modeller.so - - # Install python3 modules if python3 is installed - if [ -d "/usr/lib/python3.4/site-packages" ]; then - msg "Installing package for python3..." - install -d ${pkgdir}/usr/lib/python3.4/site-packages - ln -s ${_MODINSTALL}/modlib/modeller ${pkgdir}/usr/lib/python3.4/site-packages/modeller - ln -s ${_MODINSTALL}/lib/${EXECUTABLE_TYPE}/python3.3/_modeller.so ${pkgdir}/usr/lib/python3.4/site-packages/_modeller.so - else - msg "Python3 not found! If you want to use modeller within python3, install 'python32' from the AUR and reinstall MODELLER." - fi -} + # add modeller libs to ld.so.conf + install -dm755 "$pkgdir/etc/ld.so.conf.d" + echo "/usr/lib/$pkgname/lib/$_EXECUTABLE_TYPE" > "$pkgdir/etc/ld.so.conf.d/$pkgname.conf" + # install python modules + for _pyver in 2.7 3.5; do + install -dm755 "$pkgdir/usr/lib/python$_pyver/site-packages" + ln -s "$_MODINSTALL/modlib/modeller" "$pkgdir/usr/lib/python$_pyver/site-packages/modeller" + done + ln -s "$_MODINSTALL/lib/$_EXECUTABLE_TYPE/python2.5/_modeller.so" "$pkgdir/usr/lib/python2.7/site-packages/_modeller.so" + ln -s "$_MODINSTALL/lib/$_EXECUTABLE_TYPE/python3.3/_modeller.so" "$pkgdir/usr/lib/python3.5/site-packages/_modeller.so" +} diff --git a/modeller.install b/modeller.install deleted file mode 100644 index 86f9b25d6532..000000000000 --- a/modeller.install +++ /dev/null @@ -1,43 +0,0 @@ -post_install() { - -MODINSTALL="$pkgdir/usr/lib/modeller" -if [ "$CARCH" = "i686" ]; then - # for i686 - EXECUTABLE_TYPE="i386-intel8" -else # for x86_64 - EXECUTABLE_TYPE="x86_64-intel8" -fi - -cat << EOF -==> You can also use Modeller as a Python module, if you have Python -==> installed (any version between 2.3 and 2.7). Do this using the script: -==> ${MODINSTALL}/bin/modpy.sh" -==> Simply add your regular Python command line after this script, e.g. -==> ${MODINSTALL}/bin/modpy.sh python myscript.py" - -==> Alternatively, you could ensure that the following directories containing -==> Python modules are in your Python path: -==> ${MODINSTALL}/modlib -==> ${MODINSTALL}/lib/${EXECUTABLE_TYPE} (for Python 2.3 or Python 2.4) -==> ${MODINSTALL}/lib/${EXECUTABLE_TYPE}/python2.5 (for Python 2.5, 2.6, 2.7) -==> (e.g. by setting the PYTHONPATH environment variable) and that the -==> following directory containing dynamic libraries is in your dynamic -==> library search path: -==> ${MODINSTALL}/lib/${EXECUTABLE_TYPE} -==> (e.g. by setting the LD_LIBRARY_PATH variable (LIBPATH on AIX systems). -==> Ask your systems administrator for help if you wish to do this. - -==> ######################################################################## -==> THE LICENSE KEY IS NOT SET. -==> Go to http://salilab.org/modeller/registration.html to get a license key, -==> and then set the 'license' variable to it in the file -==> ${MODINSTALL}/modlib/modeller/config.py -==> example: license = 'XXXX' -==> ######################################################################## - -EOF -} - -post_upgrade() { - post_install $1 -} |