forked from meebey/smuxi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.am
327 lines (293 loc) · 9.57 KB
/
Makefile.am
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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
# Engines
if ENABLE_ENGINE_CAMPFIRE
PO_ENGINE_CAMPFIRE = po-Engine-Campfire
endif
if ENABLE_ENGINE_IRC
PO_ENGINE_IRC = po-Engine-IRC
endif
if ENABLE_ENGINE_JABBR
PO_ENGINE_JABBR = po-Engine-JabbR
endif
if ENABLE_ENGINE_TWITTER
PO_ENGINE_TWITTER = po-Engine-Twitter
endif
if ENABLE_ENGINE_XMPP
PO_ENGINE_XMPP = po-Engine-XMPP
endif
# Frontends
if ENABLE_FRONTEND_GNOME
PO_FRONTEND_GNOME = po-Frontend-GNOME
endif
if ENABLE_FRONTEND_GNOME_IRC
PO_FRONTEND_GNOME_IRC = po-Frontend-GNOME-IRC
endif
if ENABLE_FRONTEND_GNOME_TWITTER
PO_FRONTEND_GNOME_TWITTER = po-Frontend-GNOME-Twitter
endif
if ENABLE_FRONTEND_GNOME_XMPP
PO_FRONTEND_GNOME_XMPP = po-Frontend-GNOME-XMPP
endif
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
EXTRA_DIST = install-sh \
HACKING.md \
LICENSE \
README.md
# HACK: distclean in po/ does not work for some reason
DISTCLEANFILES = \
po/POTFILES \
po/Makefile \
po/stamp-it \
po/Makefile.in
PODIRS = po \
po-Engine \
po-Engine-MessageBuffer \
$(PO_ENGINE_CAMPFIRE) \
$(PO_ENGINE_IRC) \
$(PO_ENGINE_JABBR) \
$(PO_ENGINE_TWITTER) \
$(PO_ENGINE_XMPP) \
po-Server \
po-Frontend \
$(PO_FRONTEND_GNOME) \
$(PO_FRONTEND_GNOME_IRC) \
$(PO_FRONTEND_GNOME_TWITTER) \
$(PO_FRONTEND_GNOME_XMPP)
SUBDIRS = lib \
src \
$(PODIRS)
# forcely disable parallel builds
export MAKEFLAGS=-j1
update-po:
for PODIR in $(PODIRS); do \
echo $$PODIR; \
$(MAKE) -C $$PODIR $@ | egrep -e '(:$$|messages)'; \
done
update-pot:
for PODIR in $(PODIRS); do \
echo $$PODIR; \
$(MAKE) -C $$PODIR clean; \
$(MAKE) -C $$PODIR check 2>&1 | grep -v 'mismatched quotes at line' 2>&1; \
done
update-transifex:
tx pull -f -l ca,cs,da,de,en_GB,es,fa,fi,fr,hr,ko,lt,nb_NO,pl,pt_BR,ru,sk,sv,te,tr,ur,zh_CN
mail-po: update-po
for PODIR in $(PODIRS); do \
echo $$PODIR; \
podebconf-report-po \
--deadline=+14days \
--notdebconf \
--package="Smuxi ($$PODIR)" \
--utf8 \
--from="Mirco Bauer <[email protected]>" \
--smtp=booster.qnetp.net \
--podir=$$PODIR \
--langs=cs,es_AR,it,pt; \
done
call-po: update-po
for PODIR in $(PODIRS); do \
echo $$PODIR; \
podebconf-report-po \
--deadline=+14days \
--notdebconf \
--package="Smuxi ($$PODIR)" \
--utf8 \
--from="Mirco Bauer <[email protected]>" \
--smtp=booster.qnetp.net \
--podir=$$PODIR \
--call; \
done
install-po:
for PODIR in $(PODIRS); do \
$(MAKE) -C $$PODIR install itlocaledir=$(abs_top_builddir)/bin/$(PROFILE)/locale; \
done
LIB_DIR = $(top_builddir)/lib
BUILD_DIR = $(top_builddir)/bin/$(PROFILE)
WIN32_LIB_DIR = $(LIB_DIR)/win32
WIN32_BUILD_DIR = $(top_builddir)/bin-win32
WIN32_ICON_THEME_DIR = $(top_srcdir)/images/Smuxi-Symbolic
OSX_LIB_DIR = $(LIB_DIR)/osx
OSX_ICON_THEME_DIR = $(top_srcdir)/images/Smuxi-Symbolic
OSX_BUILD_DIR = $(top_builddir)/bin-osx
OSX_APP_DIR = $(OSX_BUILD_DIR)/Smuxi.app
OSX_CONTENTS_DIR = $(OSX_APP_DIR)/Contents
OSX_RESOURCES_DIR = $(OSX_CONTENTS_DIR)/Resources
OSX_BINARIES_DIR = $(OSX_CONTENTS_DIR)/MacOS
LINUX_STATIC_BUILD_DIR = $(top_builddir)/bin-linux-static
WIN32_EXE_FILES = \
$(BUILD_DIR)/smuxi-frontend-gnome.exe \
$(BUILD_DIR)/smuxi-server.exe \
$(BUILD_DIR)/smuxi-message-buffer.exe
WIN32_FILES = \
$(WIN32_EXE_FILES) \
$(LIB_DIR)/Mono.Data.Sqlite.dll \
$(LIB_DIR)/Mono.Posix.dll \
$(LIB_DIR)/Nini.dll \
$(LIB_DIR)/log4net.dll \
$(WIN32_LIB_DIR)/plink.exe \
$(WIN32_LIB_DIR)/sqlite3.dll \
$(WIN32_LIB_DIR)/fixedsys500c/Fixedsys500c.ttf \
$(BUILD_DIR)/smuxi-common.dll \
$(BUILD_DIR)/smuxi-engine.dll \
$(BUILD_DIR)/smuxi-engine-campfire.dll \
$(BUILD_DIR)/smuxi-engine-irc.dll \
$(BUILD_DIR)/smuxi-engine-jabbr.dll \
$(BUILD_DIR)/smuxi-engine-twitter.dll \
$(BUILD_DIR)/smuxi-engine-xmpp.dll \
$(BUILD_DIR)/smuxi-frontend-gnome-irc.dll \
$(BUILD_DIR)/smuxi-frontend-gnome-twitter.dll \
$(BUILD_DIR)/smuxi-frontend-gnome-xmpp.dll \
$(BUILD_DIR)/smuxi-frontend.dll \
$(BUILD_DIR)/Meebey.SmartIrc4net.dll \
$(BUILD_DIR)/Twitterizer2.dll \
$(BUILD_DIR)/Newtonsoft.Json.dll \
$(BUILD_DIR)/agsxmpp.dll \
$(BUILD_DIR)/StarkSoftProxy.dll \
$(BUILD_DIR)/Db4objects.Db4o.dll \
$(BUILD_DIR)/ServiceStack.Text.dll \
$(BUILD_DIR)/ServiceStack.Interfaces.dll \
$(BUILD_DIR)/ServiceStack.Common.dll \
$(BUILD_DIR)/Microsoft.AspNet.SignalR.Client.dll \
$(BUILD_DIR)/JabbR.Client.dll \
$(WIN32_LIB_DIR)/smuxi-frontend-gnome.exe.config \
$(WIN32_LIB_DIR)/smuxi-server.exe.config
OSX_FILES = \
$(LIB_DIR)/Nini.dll \
$(LIB_DIR)/log4net.dll \
$(BUILD_DIR)/smuxi-frontend-gnome.exe \
$(BUILD_DIR)/smuxi-frontend-gnome.exe.config \
$(BUILD_DIR)/smuxi-frontend-gnome-irc.dll \
$(BUILD_DIR)/smuxi-frontend-gnome-twitter.dll \
$(BUILD_DIR)/smuxi-frontend-gnome-xmpp.dll \
$(BUILD_DIR)/smuxi-server.exe \
$(BUILD_DIR)/smuxi-message-buffer.exe \
$(BUILD_DIR)/smuxi-common.dll \
$(BUILD_DIR)/smuxi-engine.dll \
$(BUILD_DIR)/smuxi-engine-campfire.dll \
$(BUILD_DIR)/smuxi-engine-irc.dll \
$(BUILD_DIR)/smuxi-engine-jabbr.dll \
$(BUILD_DIR)/smuxi-engine-twitter.dll \
$(BUILD_DIR)/smuxi-engine-xmpp.dll \
$(BUILD_DIR)/smuxi-frontend.dll \
$(BUILD_DIR)/Meebey.SmartIrc4net.dll \
$(BUILD_DIR)/Twitterizer2.dll \
$(BUILD_DIR)/Newtonsoft.Json.dll \
$(BUILD_DIR)/agsxmpp.dll \
$(BUILD_DIR)/StarkSoftProxy.dll \
$(BUILD_DIR)/Db4objects.Db4o.dll \
$(BUILD_DIR)/ServiceStack.Text.dll \
$(BUILD_DIR)/ServiceStack.Interfaces.dll \
$(BUILD_DIR)/ServiceStack.Common.dll \
$(BUILD_DIR)/Microsoft.AspNet.SignalR.Client.dll \
$(BUILD_DIR)/JabbR.Client.dll
LINUX_STATIC_FILES = \
$(LIB_DIR)/Mono.Data.Sqlite.dll \
$(LIB_DIR)/Mono.Posix.dll \
$(LIB_DIR)/Nini.dll \
$(LIB_DIR)/log4net.dll \
$(BUILD_DIR)/smuxi-common.dll \
$(BUILD_DIR)/smuxi-engine.dll \
$(BUILD_DIR)/smuxi-engine-campfire.dll \
$(BUILD_DIR)/smuxi-engine-irc.dll \
$(BUILD_DIR)/smuxi-engine-jabbr.dll \
$(BUILD_DIR)/smuxi-engine-twitter.dll \
$(BUILD_DIR)/smuxi-engine-xmpp.dll \
$(BUILD_DIR)/smuxi-server.exe.config \
$(BUILD_DIR)/Meebey.SmartIrc4net.dll \
$(BUILD_DIR)/Twitterizer2.dll \
$(BUILD_DIR)/Newtonsoft.Json.dll \
$(BUILD_DIR)/agsxmpp.dll \
$(BUILD_DIR)/StarkSoftProxy.dll \
$(BUILD_DIR)/Db4objects.Db4o.dll \
$(BUILD_DIR)/ServiceStack.Text.dll \
$(BUILD_DIR)/ServiceStack.Interfaces.dll \
$(BUILD_DIR)/ServiceStack.Common.dll \
$(BUILD_DIR)/Microsoft.AspNet.SignalR.Client.dll \
$(BUILD_DIR)/JabbR.Client.dll
dist-win32:
DIST_VERSION=$$(git describe); \
./autogen.sh --without-indicate --without-messaging-menu --without-notify --without-dbus \
--with-db4o=included \
--with-vendor-package-version="dist-win32 $$DIST_VERSION"
$(MAKE)
mkdir -p $(WIN32_BUILD_DIR)
for FILE in $(WIN32_FILES); do \
cp $$FILE $(WIN32_BUILD_DIR); \
done
for PODIR in $(PODIRS); do \
$(MAKE) -C $$PODIR install itlocaledir=$(abs_top_builddir)/$(WIN32_BUILD_DIR)/locale; \
done
mkdir -p $(WIN32_BUILD_DIR)/icons
cp -r $(WIN32_ICON_THEME_DIR) $(WIN32_BUILD_DIR)/icons
makensis $(top_srcdir)/src/smuxi-win32.nsis
dist-osx:
DIST_VERSION=$$(git describe); \
./autogen.sh --without-indicate --without-messaging-menu --without-notify --without-dbus \
--with-db4o=included \
--with-vendor-package-version="dist-osx $$DIST_VERSION"
$(MAKE)
mkdir -p $(OSX_BINARIES_DIR) $(OSX_RESOURCES_DIR)
cp $(OSX_LIB_DIR)/Info.plist $(OSX_CONTENTS_DIR)
cp $(OSX_LIB_DIR)/smuxi $(OSX_BINARIES_DIR)
cp $(OSX_LIB_DIR)/smuxi-server $(OSX_BINARIES_DIR)
cp $(OSX_LIB_DIR)/smuxi.icns $(OSX_RESOURCES_DIR)
for FILE in $(OSX_FILES); do \
cp $$FILE $(OSX_BINARIES_DIR); \
done
mkdir -p $(OSX_BINARIES_DIR)/icons
cp -r $(OSX_ICON_THEME_DIR) $(OSX_BINARIES_DIR)/icons
-rm smuxi-osx.zip
cd $(OSX_BUILD_DIR) && zip -r ../smuxi-osx.zip Smuxi.app
dist-linux-static:
DIST_VERSION=$$(git describe); \
./autogen.sh --without-indicate --without-messaging-menu --without-notify --without-dbus \
--with-db4o=included \
--with-vendor-package-version="dist-linux-static $$DIST_VERSION" \
--disable-frontend-gnome --disable-frontend-stfl
$(MAKE)
mkdir -p $(LINUX_STATIC_BUILD_DIR)
mkbundle --deps --static -z -L $(BUILD_DIR) \
-o $(LINUX_STATIC_BUILD_DIR)/smuxi-server \
$(BUILD_DIR)/smuxi-server.exe \
$(LIB_DIR)/log4net.dll \
$(LIB_DIR)/Nini.dll \
$(BUILD_DIR)/smuxi-common.dll \
$(BUILD_DIR)/smuxi-engine.dll \
$(BUILD_DIR)/Db4objects.Db4o.dll \
$(BUILD_DIR)/ServiceStack.Text.dll
for FILE in $(LINUX_STATIC_FILES); do \
cp $$FILE $(LINUX_STATIC_BUILD_DIR); \
done
tar -czf smuxi-server-$(VERSION)-linux-$$(uname -m)-static.tar.gz $(LINUX_STATIC_BUILD_DIR)
dist-linux-debs:
git checkout -- debian/changelog
dch -b \
-v "1:$(VERSION)+git-1~$$(date +%Y%m%d%H%M%S).$$(git rev-parse --short=8 HEAD)" \
-D "$$(lsb_release -r -s)" \
"Building git snapshot."
dpkg-buildpackage -b -us -uc
run: run-gnome
run-gnome: all
if [ "x$(shell uname)" = "xDarwin" ]; then \
export DYLD_FALLBACK_LIBRARY_PATH=/Library/Frameworks/Mono.framework/Versions/Current/lib:/lib:/usr/lib; \
fi; \
cd $(BUILD_DIR) && \
mono --debug ./smuxi-frontend-gnome.exe -d
run-stfl: all
cd $(BUILD_DIR) && \
mono --debug ./smuxi-frontend-stfl.exe -d 2> smuxi-frontend-stfl.err
run-server: all
cd $(BUILD_DIR) && \
mono --debug ./smuxi-server.exe -d
test: src/*-Tests/*.cs*
xbuild src/Common-Tests/Common-Tests.csproj
xbuild src/Engine-Tests/Engine-Tests.csproj
xbuild src/Frontend-Tests/Frontend-Tests.csproj
xbuild src/Frontend-GNOME-Tests/Frontend-GNOME-Tests.csproj
xbuild src/Frontend-STFL-Tests/Frontend-STFL-Tests.csproj
-nunit-console $(BUILD_DIR)/smuxi-common-tests.dll
-nunit-console $(BUILD_DIR)/smuxi-engine-tests.dll
-nunit-console $(BUILD_DIR)bin/debug/smuxi-frontend-tests.dll
-nunit-console $(BUILD_DIR)bin/debug/smuxi-frontend-gnome-tests.dll
-nunit-console $(BUILD_DIR)bin/debug/smuxi-frontend-stfl-tests.dll
.NOTPARALLEL:
.PHONY: test