void-packages/srcpkgs/rust/template
2014-04-04 00:45:33 +02:00

38 lines
1.3 KiB
Text

# Template file for 'rust'
pkgname=rust
version=0.10
revision=2
build_style=configure
only_for_archs="x86_64 i686"
configure_args="--prefix=/usr --disable-docs"
hostmakedepends="which pkg-config perl curl python chrpath"
short_desc="A safe, concurrent, practical language"
maintainer="pancake <pancake@nopcode.org>"
homepage="http://www.rust-lang.org/"
license="MIT, Apache-2.0"
distfiles="http://static.rust-lang.org/dist/rust-${version}.tar.gz"
checksum=c72cfbbf03016804a81d7b68e8258ffaf018f8f5a25550ad64571ce6c2642cf9
if [ "$XBPS_MACHINE" = "x86_64" ]; then
configure_args+=" --build=$(gcc -dumpmachine)"
fi
if [ "$CROSS_BUILD" ]; then
msg_error "$pkgver cannot be cross compiled currently.\n"
fi
post_install() {
vinstall COPYRIGHT 644 usr/share/licenses/rust LICENSE
vmkdir usr/share/vim/vimfiles
cp -a src/etc/vim ${DESTDIR}/usr/share/vim/vimfiles
find ${DESTDIR}/usr/share/vim -type f -exec chmod 644 {} +
find ${DESTDIR}/usr/share/vim -type d -exec chmod 755 {} +
vinstall src/etc/zsh/_rust 644 usr/share/zsh/site-functions
vinstall src/etc/kate/rust.xml 644 usr/share/apps/katepart/syntax
vinstall src/etc/gedit/share/mime/packages/rust.xml 644 usr/share/mime/packages
vinstall src/etc/gedit/share/gtksourceview-3.0/language-specs/rust.lang \
644 usr/share/gtksourceview-3.0/language-specs
}