-
-
Save xguse/46d82549cda1a76c0097 to your computer and use it in GitHub Desktop.
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
# Maintainer: Meow < a.li.devtty at gmail dot com > | |
# Get download links and md5 sums for latest version of RStudio desktop | |
cat <<_EOF_ >/dev/null | |
## R code ############# | |
require(XML) | |
page = htmlTreeParse("http://www.rstudio.com/products/rstudio/download/",useInternalNodes = T) | |
links = sapply(getNodeSet(page,'//table[@class="downloads"]/thead/tr/th[text()="Installers"]/../../..//a[contains(@href,".deb")]'),xmlGetAttr,'href') | |
md5sums = sapply(getNodeSet(page,'//table[@class="downloads"]/thead/tr/th[text()="Installers"]/../../..//a[contains(@href,".deb")]/../..//code'),xmlValue) | |
print(cbind(links,md5sums)) | |
####################### | |
_EOF_ | |
pkgname=rstudio-desktop-bin | |
pkgver=0.99.447 | |
pkgrel=1 | |
pkgdesc="A new integrated development environment (IDE) for R (binary version from RStudio official website)" | |
arch=('i686' 'x86_64') | |
license=('GPL') | |
url="http://www.rstudio.org/" | |
depends=('r>=2.11.1' 'shared-mime-info' 'qt5-webkit' 'qt5-svg') | |
conflicts=('rstudio-desktop' 'rstudio-desktop-git' 'rstudio-desktop-preview-bin') | |
provides=("rstudio-desktop=${pkgver}") | |
#options=(!strip) | |
md5sums_i686=(944d9e9de979e2b92c978e9116392b2b) | |
md5sums_x86_64=(9f579d89767312583eac462c35c30a02) | |
source_i386=("http://download1.rstudio.org/rstudio-${pkgver}-i386.deb") | |
source_x86_64=("http://download1.rstudio.org/rstudio-${pkgver}-amd64.deb") | |
install="$pkgname".install | |
package() { | |
msg "Converting debian package..." | |
cd "$srcdir" | |
tar zxpf data.tar.gz -C "$pkgdir" | |
install -dm755 "$pkgdir/usr/bin" | |
cd "$pkgdir/usr/lib/rstudio/bin" | |
rm lib*.so.* | |
rm qt.conf | |
rm -r plugins | |
cd "$pkgdir/usr/bin" | |
ln -s -f ../lib/rstudio/bin/rstudio rstudio-bin | |
find "$pkgdir/usr" -type d -print0 | xargs -0 chmod 755 | |
} | |
# vim:ft=sh tabstop=2 expandtab |
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
post_install() { | |
xdg-icon-resource forceupdate --theme hicolor &>/dev/null | |
update-mime-database /usr/share/mime &>/dev/null | |
update-desktop-database -q | |
} | |
post_upgrade() { | |
post_install | |
} | |
post_remove() { | |
post_install | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment