The darcs repository web UI and hosting app. This is the latest darcsden trunk, which runs hub.darcs.net. (fork of simon's darcsden)
(http://hub.darcs.net)
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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
| # darcsden developer builds and tasks
HOSTNAME=localhost
HTTPPORT=8901
SSHPORT=2222
ENV=\
GOOGLE_CLIENT_ID= \
GOOGLE_CLIENT_SECRET= \
GITHUB_CLIENT_ID= \
GITHUB_CLIENT_SECRET= \
#SOURCEFILES:=`find src -name '*.hs' -print`
SOURCEFILES=\
src/*.hs \
src/*/*.hs \
src/*/*/*.hs \
src/*/*/*/*.hs \
# http://www.haskell.org/ghc/docs/7.4.2/html/users_guide/flag-reference.html
# http://hackage.haskell.org/trac/ghc/wiki/Building/Using#HowtomakeGHCbuildquickly
SP=~simon/bin/sp
GHC=ghc
SSHGHCFLAGS=\
-i../ssh/src
DARCSGHCFLAGS1=\
-DHAVE_HTTP \
-XCPP \
-XBangPatterns \
-XPatternGuards \
-XGADTs \
-XTypeOperators \
-XFlexibleContexts \
-XFlexibleInstances \
-XScopedTypeVariables \
-XKindSignatures \
-XRankNTypes \
-XTypeFamilies \
-XNoMonoLocalBinds \
-i../darcs/src \
-I../darcs/src \
-i../darcs/dist/build \
-i../darcs/dist/build/autogen
DARCSGHCFLAGS2= \
../darcs/src/atomic_create.c \
../darcs/src/fpstring.c \
../darcs/src/h_iconv.c \
../darcs/src/maybe_relink.c \
../darcs/src/system_encoding.c \
../darcs/src/umask.c \
# Flags for three build scenarios:
# 1. build with installed darcs 2.8
# DARCSDENGHCFLAGS=\
# -Wall -fno-warn-unused-do-bind \
# -threaded \
# -isrc \
# -DDEBUG -DHIGHLIGHTINGKATE -DSSH_FLAG -DCLOSING \
# -DDARCS28 \
# 2. build with installed darcs 2.9
DARCSDENGHCFLAGS=\
-Wall -fno-warn-unused-do-bind \
-threaded \
-isrc \
-DDEBUG -DHUB -DHIGHLIGHTINGKATE -DSSH_FLAG -DCLOSING \
# 3. build with latest ../darcs and ../ssh
# DARCSDENGHCFLAGS=\
# -Wall -fno-warn-unused-do-bind \
# -threaded \
# -isrc \
# -DDEBUG -DHIGHLIGHTINGKATE -DSSH_FLAG -DCLOSING \
# $(DARCSGHCFLAGS1) \
# $(DARCSGHCFLAGS2) \
# $(SSHGHCFLAGS)
# Flags for ghci, XXX duplication
# 1.
# DARCSDENGHCIFLAGS=\
# -Wall -fno-warn-unused-do-bind \
# -threaded \
# -isrc \
# -DDEBUG -DHIGHLIGHTINGKATE -DSSH_FLAG -DCLOSING \
# -DDARCS28 \
# 2.
DARCSDENGHCIFLAGS=\
-Wall -fno-warn-unused-do-bind \
-threaded \
-isrc \
-DDEBUG -DHIGHLIGHTINGKATE -DSSH_FLAG -DCLOSING \
# 3.
# DARCSDENGHCIFLAGS=\
# -Wall -fno-warn-unused-do-bind \
# -threaded \
# -isrc \
# -DDEBUG -DHIGHLIGHTINGKATE -DSSH_FLAG -DCLOSING \
# $(DARCSGHCFLAGS1) \
# $(SSHGHCFLAGS)
auto:
$(ENV) $(SP) --no-exts --no-default-map -o darcsden $(GHC) $(DARCSDENGHCFLAGS) WebServer.hs --run --port $(HTTPPORT) --hostname $(HOSTNAME) --path /
# run as darcsden user to have right permissions and avoid messing up production file ownership
auto2:
sudo -Hu darcsden $(ENV) $(SP) --no-exts --no-default-map -o darcsden $(GHC) $(DARCSDENGHCFLAGS) WebServer.hs --run --port $(HTTPPORT) --hostname $(HOSTNAME) --path /
auto-ssh:
$(SP) --no-exts --no-default-map -o darcsden-ssh $(GHC) $(DARCSDENGHCFLAGS) SSHServer.hs --run $(SSHPORT)
darcsden: $(SOURCEFILES)
$(GHC) $(DARCSDENGHCFLAGS) src/WebServer.hs -o darcsden
darcsden-ssh: $(SOURCEFILES)
$(GHC) $(DARCSDENGHCFLAGS) src/SSHServer.hs -o darcsden-ssh
sudo setcap cap_net_bind_service=ep darcsden-ssh
run: darcsden
sudo -Hu darcsden ./darcsden --port $(HTTPPORT) --hostname $(HOSTNAME) --path /
ghci:
$(GHC) $(DARCSDENGHCIFLAGS) src/WebServer.hs --interactive
tag:
rm -f TAGS; hasktags -e $(SOURCEFILES)
# don't nuke things in a .virthualenv
clean:
rm -f darcsden
find src -name "*.hi" -delete
find src -name "*.o" -delete
VERSION=1.1.98
sdistbuild:
cabal sdist \
&& rm -rf darcsden-$(VERSION) \
&& tar xzvf dist/darcsden-$(VERSION).tar.gz \
&& cd darcsden-$(VERSION) \
&& cabal configure \
&& cabal build \
sdistinstall:
cabal sdist \
&& rm -rf darcsden-$(VERSION) \
&& tar xzvf dist/darcsden-$(VERSION).tar.gz \
&& cd darcsden-$(VERSION) \
&& cabal install \
sdistrun:
cd darcsden-$(VERSION) \
&& dist/build/darcsden/darcsden --port $(HTTPPORT)
-include Makefile.local
|