updated on Sun Jan 22 16:00:49 UTC 2012
[aur-mirror.git] / vim-qt-git / PKGBUILD
blob0d8e9d71c812f6cbb359ac598adc098ea697be24
1 # Maintainer Jekyll Wu<adaptee [at] gmail [dot] com>
2 # Basically, stolen shamelessly from http://chakra-probject.org/ccr
4 pkgname=vim-qt-git
5 pkgver=20120112
6 pkgrel=1
7 pkgdesc="A Qt powered vim GUI"
8 arch=("i686" "x86_64")
9 url="https://bitbucket.org/equalsraf/vim-qt/wiki/Home"
10 license=('custom:vim')
11 depends=('qt' 'vim-runtime' 'gpm' 'perl' 'python>=2.7.1' 'ruby' 'libxt'
12          'desktop-file-utils' )
13 makedepends=('gpm' 'perl' 'python2>=2.7.1' 'ruby' 'libxt' 'desktop-file-utils' 'qt'
14              'gettext' 'pkgconfig' 'rsync' 'sed' 'git')
15 source=(qvim.desktop
16         qvim.svg)
17 options=(!strip)
18 install="${pkgname}.install"
20 _gitroot="https://bitbucket.org/equalsraf/vim-qt.git"
21 _gitname="vim-qt"
23 _builddir=vim-qt-build
24 _versiondir=vim73
26 build() {
27   cd ${srcdir}
28   msg "Connecting to GIT server...."
30   if [ -d ${_gitname}/.git ] ; then
31     cd ${_gitname}
33     # Change remote url to anongit
34     if [ -z $( git branch -v | grep anongit ) ] ; then
35         git remote set-url origin ${_gitroot}
36     fi
38     git pull origin
39     msg "The local files are updated."
40   else
41     git clone ${_gitroot} ${_gitname}
42   fi
44   msg "GIT checkout done or server timeout"
45   msg "Starting make..."
47   cd ${srcdir}
48   rm -rf vim-qt-build
49   rsync -a --exclude='.git/' ${_gitname}/ vim-qt-build
51   msg2 'Patching...'
53   # define the place for the global (g)vimrc file (set to /etc/vimrc)
54   sed -i 's|^.*\(#define SYS_.*VIMRC_FILE.*"\) .*$|\1|' \
55     vim-qt-build/src/feature.h
56   sed -i 's|^.*\(#define VIMRC_FILE.*"\) .*$|\1|' \
57     vim-qt-build/src/feature.h
58   # fix python name
59   sed -i -e 's|vi_cv_path_python, python|vi_cv_path_python, python2|' \
60     vim-qt-build/src/configure.in
61   (cd vim-qt-build/src && autoconf)
63   msg2 'Building...'
65   cd ${srcdir}/${_builddir}
67   export CFLAGS="-g -O0"
68   export CXXFLAGS="-g -O0"
70   ./configure \
71   --prefix=/usr \
72   --localstatedir=/var/lib/vim \
73   --mandir=/usr/share/man \
74   --with-compiledby=Archlinux \
75   --with-features=big \
76   --enable-gpm \
77   --enable-acl \
78   --with-x=yes \
79   --with-tlib=ncurses \
80   --enable-gui=qt \
81   --enable-multibyte \
82   --enable-cscope \
83   --enable-netbeans \
84   --enable-perlinterp \
85   --enable-pythoninterp \
86   --enable-rubyinterp \
88   make
91 package(){
92   cd ${srcdir}/${_builddir}
94   # Yes, I know gvim stands for `graphical vim`, not `gtk vim`
95   # Whatever, jut name it as qvim.
96   install -D src/vim ${pkgdir}/usr/bin/qvim
98   # desktop entry
99   install -Dm644 ${srcdir}/qvim.desktop \
100       ${pkgdir}/usr/share/applications/qvim.desktop
102   # and the nice icon!
103   install -Dm644 "${srcdir}/qvim.svg" \
104       "${pkgdir}/usr/share/icons/hicolor/scalable/apps/qvim.svg"
107 # vim: set sw=2:
109 md5sums=('48d76291214e5ef81bc0812d6346f391'
110          '58c3f5ca063bd624b9feb5942e4f2adf')