summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b35d299473bb9a3d3803f10a9c582c5e5f0fa089 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# Maintainer: ssfdust <ssfdust@gmail.com>
pkgname=ycm-generator-git
pkgbase=ycm-generator-git
pkgver=develop79.fc4839e
pkgrel=1
pkgdesc="Generates config files for YouCompleteMe (https://github.com/Valloric/YouCompleteMe)"
arch=('any')
url="https://github.com/rdnetto/YCM-Generator"
license=('GPL')
depends=('make' 'python2' 'clang')
install=ycm-generator.install
makedepends=('git')
optdepends=('cmake' 'autoconf' 'automake') 
provides=('ycm-generator-git' 'ycm-generator')
source=("git://github.com/rdnetto/YCM-Generator.git")
md5sums=('SKIP')

prepare()
{
    #switch to develop branch for archlinux support
	cd $srcdir/YCM-Generator/
    git checkout develop
}
pkgver() {
	cd $srcdir/YCM-Generator/
	printf "develop%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

package() {
	cd $srcdir/YCM-Generator/
	DESTDIR="$pkgdir"/usr/share/YCM-Generator 
	VIMPLUGIN="$pkgdir"/usr/share/vim/vimfiles/plugin
	sed "s/expand(\"<sfile>:p:h:h\")/\"\/usr\/share\/YCM\-Generator\/\"/g" -i plugin/ycm-generator.vim 
	mkdir -p $DESTDIR
	mkdir -p $VIMPLUGIN
	cp -r * $DESTDIR

	#move vim plugin directory
	mv $DESTDIR/plugin/* $VIMPLUGIN
}