2 # Contributor: Yorhel <projects@yorhel.nl>
3 # Contributor: archtux <antonio.arias99999@gmail.com>
8 pkgdesc='Lightweight Ncurses Direct Connect client'
11 arch=('i686' 'x86_64')
12 url='http://dev.yorhel.nl/ncdc'
14 depends=('bzip2' 'libxml2' 'ncurses' 'sqlite3' 'glib2>=2.28.0')
15 makedepends=('git' 'autoconf' 'makeheaders')
16 optdepends=('glib-networking: TLS support'
17 'gdbm: To upgrade from pre-1.6')
18 _gitroot="git://g.blicky.net/ncdc.git"
21 # set _gitrev to a git revision (man gitrevisions) like a tag, a commit sha1
22 # hash or a branch name to build from this tree instead of master
27 _build_dir="${_build_dir:-$srcdir}"
28 if [[ -n $_gitname && -n $_gitroot ]]; then
29 (( 1 )) && _ncdc_src="$_build_dir/$_gitname-build"
33 ###############################
34 # Get the latest ncdc sources
35 ###############################
36 if [[ -n $_gitname && -n $_gitroot ]]; then
37 msg "Fetching sources..."
40 if [ -d $_gitname ] ; then
41 msg2 "Updating sources..."
46 msg2 "Cloning the project..."
47 git clone --mirror "${_gitroot}" "${_gitname}"
50 msg "Creating build branch..."
52 git clone "$_gitname" "$_ncdc_src"
54 # reset to specified git revision
56 [[ -n $_gitrev ]] && git reset --hard "$_gitrev"
64 msg "Configuring ncdc..."
65 autoreconf -i || return 1
66 ./configure --prefix=/usr || return 1
68 make DESTDIR=$pkgdir install || return 1
69 install -Dm644 COPYING $pkgdir/usr/share/licenses/$pkgname/LICENSE