summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorssfdust2016-09-16 10:03:21 +0800
committerssfdust2016-09-16 10:03:21 +0800
commit9f3566e6ac3555b6b160d1a378eddc5d26b7af3f (patch)
tree44710e966b8eb2f3b7d08bfe04632b50a5a6e47e
parentf89ebb639218fdc813002432929613e33ba7c331 (diff)
downloadaur-9f3566e6ac3555b6b160d1a378eddc5d26b7af3f.tar.gz
make PKGBUILD standard
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD29
-rw-r--r--ycm-generator.install7
3 files changed, 23 insertions, 17 deletions
diff --git a/.SRCINFO b/.SRCINFO
index fbb39a6d1da..ea989bcd64d 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = ycm-generator-git
pkgdesc = Generates config files for YouCompleteMe (https://github.com/Valloric/YouCompleteMe)
- pkgver = stable92.3d1ee4e
+ pkgver = r122.4d92151
pkgrel = 1
url = https://github.com/rdnetto/YCM-Generator
install = ycm-generator.install
@@ -15,7 +15,7 @@ pkgbase = ycm-generator-git
optdepends = automake
provides = ycm-generator-git
provides = ycm-generator
- source = git://github.com/rdnetto/YCM-Generator.git
+ source = git+https://github.com/rdnetto/YCM-Generator.git
md5sums = SKIP
pkgname = ycm-generator-git
diff --git a/PKGBUILD b/PKGBUILD
index e916d3385cd..aa8f63ca725 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,34 +1,41 @@
# Maintainer: ssfdust <ssfdust@gmail.com>
pkgname=ycm-generator-git
pkgbase=ycm-generator-git
-pkgver=stable92.3d1ee4e
+pkgver=r122.4d92151
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')
+conlicts=('ycm-generator')
+provides=('ycm-generator')
install=ycm-generator.install
makedepends=('git')
optdepends=('cmake' 'autoconf' 'automake')
provides=('ycm-generator-git' 'ycm-generator')
-source=("git://github.com/rdnetto/YCM-Generator.git")
+source=("git+https://github.com/rdnetto/YCM-Generator.git")
md5sums=('SKIP')
pkgver() {
- cd $srcdir/YCM-Generator/
- printf "stable%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+ cd "${srcdir}"/YCM-Generator/
+ printf "r%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
+ 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
+ mkdir -p "${DESTDIR}"
+ mkdir -p "${VIMPLUGIN}"
+ cp -r * "${DESTDIR}"
#move vim plugin directory
- mv $DESTDIR/plugin/* $VIMPLUGIN
+ mv ${DESTDIR}/plugin/* ${VIMPLUGIN}
+
+ #link the execute file to /usr/bin
+ mkdir -p "${pkgdir}"/usr/bin
+ ln -s "${DESTDIR}"/config_gen.py \
+ "${pkgdir}"/usr/bin/ycm_generator
}
diff --git a/ycm-generator.install b/ycm-generator.install
index fcfbaf51db8..9270be2db40 100644
--- a/ycm-generator.install
+++ b/ycm-generator.install
@@ -1,9 +1,8 @@
post_install()
{
- ln -s /usr/share/YCM-Generator/config_gen.py \
- /usr/bin/ycm_generator
- echo "link /usr/share/YCM-Generator/config_gen.py to /usr/bin/ycm_generator"
- echo "\n"
+ echo "link /usr/share/YCM-Generator/config_gen.py to /usr/bin/ycm_generator."
+ echo "Now type ycm_generator to execute the program."
+ echo
}
post_remove()
{