Last active
March 16, 2017 18:12
-
-
Save lukauskas/6ba254eeb9f6f8ee6f922ec9884dd784 to your computer and use it in GitHub Desktop.
PKGBUILD for phantompeakqualtoools git version
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This doesn't work nicely as it uses bioclite to install dependdencies | |
# which is why I'm not submitting it to AUR | |
# but it's useful if one compiles it themselves. | |
pkgname=phantompeakqualtools-git | |
pkgver=r30.b9267ea | |
pkgrel=1 | |
pkgdesc="Computes quick but highly informative enrichment and quality measures for ChIP-seq/DNase-seq/FAIRE-seq/MNase-seq data. It can also be used to obtain robust estimates of the predominant fragment length or characteristic tag shift values in these assays." | |
arch=('i686' 'x86_64') | |
url="https://github.com/kundajelab/phantompeakqualtools" | |
license=('MIT') | |
depends=('r' 'r-cran-catools' 'r-snow' 'samtools' 'boost' 'boost-libs') | |
source=("$pkgname::git+https://github.com/kundajelab/phantompeakqualtools.git") | |
sha1sums=('SKIP') | |
conflicts=("phantompeakqualtools") | |
pkgver() { | |
cd "$srcdir/$pkgname" | |
#printf "%s" "$(git describe --long | sed 's/\([^-]*-\)g/r\1/;s/-/./g')" | |
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" | |
} | |
package() { | |
cd $srcdir/$pkgname | |
install -d $pkgdir/usr/lib/R/library | |
# Below is required for this to work with gcc6 | |
tar xvf spp_1.14.tar.gz | |
sed -i "s/PKG_CXXFLAGS=/PKG_CXXFLAGS=-std=gnu++98 /g" spp-1.14/src/Makevars.in | |
R -e "source('https://bioconductor.org/biocLite.R'); biocLite('Rsamtools', lib='${pkgdir}/usr/lib/R/library')" | |
R CMD INSTALL -l $pkgdir/usr/lib/R/library spp-1.14 | |
install -d $pkgdir/usr/share/phantompeakqualtools/ | |
install -Dm0644 run_spp.R $pkgdir/usr/share/phantompeakqualtools/ | |
echo "#!/bin/bash" > run_spp.sh | |
echo 'Rscript /usr/share/phantompeakqualtools/run_spp.R "$@"' >> run_spp.sh | |
install -d $pkgdir/usr/bin/ | |
install -Dm0755 run_spp.sh $pkgdir/usr/bin/run_spp | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment