updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / bup-git / PKGBUILD
blob048571505c2544551cd49fbd8a5c3206c912d2e5
1 # Maintainer: Michael Witten <mfwitten>
3 # The various phases of the build can be controlled
4 # with the following variables (use an empty value
5 # to mean false; if you're hacking on the source,
6 # I RECOMMEND skipping the _clean phase):
8 _source=yes
9 _clean=yes
10 _config=yes
11 _compile=yes
12 _test=yes
13 _install=yes
14 #_install=          # do not install
16 ######################################################################
18 pkgname=bup-git
19 pkgver=20110420
20 pkgrel=3
21 pkgdesc="Backup tool (built from git repo); it handles many very large files"
23 arch=(i686 x86_64)
24 url=https://github.com/apenwarr/bup
25 license=(GPL)
27 provides=(bup)
28 conflicts=(bup)
30 depends=(
32   python2
33   python-fuse
34   pyxattr
35   pylibacl
37   par2cmdline
41 makedepends=(
43   git
44   #pandoc Currrently the pre-generated docs are used.
48 options=('!strip')
50 _gitroot=git://github.com/apenwarr/bup.git
51 _gitname=repo
53 build()
55   cd "$srcdir"
57   #### Source ####
59     if [[ ! $_source ]]; then
61       cd "$_gitname"
63     else
65       msg "Connecting to server...."
67       if [[ -d $_gitname ]]; then
69         cd "$_gitname"
70         git pull origin
71         msg "The local files are updated."
73       else
75         git clone "$_gitroot" "$_gitname"
76         cd "$_gitname"
78       fi
80       msg "Checkout done or server timeout"
82     fi
84   # At this point, the current working directory
85   # should be "$srcdir/$_gitname"
87   #### Clean ####
89     if [[ $_clean ]]; then
91       msg "Cleaning ..."
92       git reset --hard HEAD
93       git clean -fdx
95     fi
97   #### Configure ####
99     if [[ $_config ]]; then
101       msg "Configuring ..."
102       find . -name \*.py -exec sed -i '1s/env python\b/env python2/' {} +
103       sed -i -e 's/PYTHON=python\b/PYTHON=python2/' -e '/docs-available/d' Makefile
105     fi
107   #### Compile ####
109     if [[ $_compile ]]; then
110     
111       msg "Compiling ..."
112       make all import-docs
114     fi
116   #### Test ####
118     if [[ $_test ]]; then
119     
120       msg "Testing ..."
121       make test
123     fi
126 package()
128   cd "$srcdir/$_gitname"
130   #### Install  ####
132     if [[ $_install ]]; then
133     
134       msg "Installing ..."
135       make DESTDIR="$pkgdir" install
137     fi