blob: c32eb966f71876a2289eb14695bd878456c21baa (
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
|
I've been wrestling with git-annex to try to make it build on Debian, or more specifically, wrestling with Haskell dependencies.
After a fair amount of futzing around, and pestering a bunch of people in the process (thanks for the help! :) ) I finally managed to make it build.
I figured I would post the steps here, since it's not completely trivial, and I expect that a few others might be interested in building newer versions as well.
There appears to currently be two methods:
* Debian packages on Wheezy plus Sid
* Starting out on Wheezy, and then picking the rest from Sid (it seems at least libghc-safesemaphore-dev from Sid is critical for newer git-annex)
* WebDAV suport will not be available with this method
* Cabal packages
#Debian packages on Wheezy plus Sid
##Start off with a clean wheezy chroot
sudo debootstrap wheezy debian-wheezy
sudo chroot debian-wheezy
##Install some build tools
apt-get update
apt-get install devscripts git
##Get git-annex (either by cloning or simply moving the source into the chroot)
mkdir /src
cd /src
git clone git://git-annex.branchable.com/source.git git-annex
cd git-annex
##Remove WebDAV dependency which can't be satisfied anywhere
sed '/libghc-dav-dev/d' -i debian/control
##Create dummy build-depends package and install all available Wheezy dependencies using it
mk-build-deps
dpkg -i git-annex-build-deps*.deb
apt-get install -f
(this will remove the build-depends package)
##Add Sid sources and install all available Sid dependencies
echo "deb http://http.debian.net/debian sid main" >>/etc/apt/sources.list
apt-get update
dpkg -i git-annex-build-deps*.deb
apt-get install -f
(the build-depends package should now be fully installed)
##Disable the 'make test' that fails due to missing hothasktags
echo >>debian/rules
echo "override_dh_auto_test:" >>debian/rules
##Build!
debuild -us -uc -Igit
#Cabal packages
##Start off with a clean Sid(/Wheezy) chroot
sudo debootstrap sid debian-sid
sudo chroot debian-sid
##Install a smaller set of tools and build-depends from Debian (cabal needs these to compile the Haskell stuff)
apt-get update
apt-get install ghc cabal-install devscripts libz-dev pkg-config c2hs libgsasl7-dev libxml2-dev libgnutls-dev c2hs git debhelper ikiwiki perlmagick uuid rsync openssh-client fakeroot
##Get git-annex (either by cloning or simply moving the source into the chroot)
mkdir /src
cd /src
git clone git://git-annex.branchable.com/source.git git-annex
cd git-annex
##Install the Haskell build-dependencies from cabal
cabal update
cabal install --only-dependencies
##Optional step which doesn't work (might in the future)
If we want to run the 'make test' after build we need hothasktags, which is only available via cabal
apt-get install happy
cabal install hothasktags
export PATH=$PATH:~/.cabal/bin
But this currently fails silently inside make test->fast->tags, and if you dig a bit (manually edit the makefile to be more verbose) you see
hothasktags: ./Command/AddUnused.hs: hGetContents: invalid argument (invalid byte sequence)
##Disable the 'make test' that fails
echo >>debian/rules
echo "override_dh_auto_test:" >>debian/rules
##Remove all Debian package haskell depends (taken care of by cabal instead)
sed '/\tlibghc/d' -i debian/control
## Build!
debuild -us -uc -Igit
|