summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO18
-rw-r--r--PKGBUILD47
-rw-r--r--fix_linking.patch13
3 files changed, 78 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..8fd76a681e72
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,18 @@
+pkgbase = molblocks
+ pkgdesc = A suite to break small molecules into chemically meaningful fragments
+ pkgver = 0.1
+ pkgrel = 1
+ url = https://compbio.cs.princeton.edu/molblocks/
+ arch = x86_64
+ license = GPL3
+ makedepends = gcc
+ makedepends = patch
+ makedepends = make
+ depends = openbabel2
+ source = https://compbio.cs.princeton.edu/molblocks/molblocks.tar.gz
+ source = fix_linking.patch
+ sha1sums = f9cf416d89a282e6dd75a114faef9aa822ded6a6
+ sha1sums = ef8909111347af97ef4c70e296f6d881fbb2a892
+
+pkgname = molblocks
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..7881efcddcd9
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,47 @@
+# Maintainer: Viktor Drobot (aka dviktor) linux776 [at] gmail [dot] com
+
+pkgname=molblocks
+pkgver=0.1
+pkgrel=1
+pkgdesc="A suite to break small molecules into chemically meaningful fragments"
+url="https://compbio.cs.princeton.edu/molblocks/"
+license=("GPL3")
+arch=(x86_64)
+depends=(openbabel2)
+makedepends=(gcc patch make)
+source=("https://compbio.cs.princeton.edu/molblocks/molblocks.tar.gz"
+ "fix_linking.patch")
+sha1sums=('f9cf416d89a282e6dd75a114faef9aa822ded6a6'
+ 'ef8909111347af97ef4c70e296f6d881fbb2a892')
+
+prepare() {
+ cd "${srcdir}/molblocks"
+
+ patch -Np0 -i "${srcdir}/fix_linking.patch"
+}
+
+build() {
+ cd "${srcdir}/molblocks"
+
+ make
+}
+
+
+package() {
+ cd "${srcdir}/molblocks"
+
+ # create directories
+ mkdir -p "${pkgdir}/usr/bin"
+ mkdir -p "${pkgdir}/usr/share/molblocks"
+
+ # install binaries
+ install -Dm755 "${srcdir}/molblocks/analyze" "${pkgdir}/usr/bin/mb-analyze"
+ install -Dm755 "${srcdir}/molblocks/fragment" "${pkgdir}/usr/bin/mb-fragment"
+
+ # install data
+ cp -r "${srcdir}/molblocks/exampleAntiNeopl" "${pkgdir}/usr/share/molblocks/"
+ cp -r "${srcdir}/molblocks/exampleCephalosp" "${pkgdir}/usr/share/molblocks/"
+ install -Dm644 "${srcdir}/molblocks/BRICS.txt" "${pkgdir}/usr/share/molblocks/BRICS.txt"
+ install -Dm644 "${srcdir}/molblocks/CCQ.txt" "${pkgdir}/usr/share/molblocks/CCQ.txt"
+ install -Dm644 "${srcdir}/molblocks/RECAP.txt" "${pkgdir}/usr/share/molblocks/RECAP.txt"
+}
diff --git a/fix_linking.patch b/fix_linking.patch
new file mode 100644
index 000000000000..3bc689cbb075
--- /dev/null
+++ b/fix_linking.patch
@@ -0,0 +1,13 @@
+--- Makefile 2013-10-24 18:44:45.000000000 +0400
++++ Makefile 2020-02-14 17:52:48.328016664 +0300
+@@ -1,8 +1,8 @@
+ CXXFLAGS := -O3 -Wall
+-INCLUDES := -Iboost -I/usr/local/include/openbabel-2.0
+-LIBS=-L/usr/local/lib -lm -lopenbabel
++INCLUDES := -Iboost -I/usr/include/openbabel-2.0
++LIBS=-L/usr/local/lib -lm -l:libopenbabel.so.5
+
+ all: fragment analyze
+
+ fragment: fragment.C
+ g++ $(CXXFLAGS) -o fragment fragment.C utilities.C $(INCLUDES) $(LIBS)