summaryrefslogtreecommitdiff
path: root/debian/rules
blob: 1dc71f57e65425f631813358dac8c1ad321a7eb3 (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
#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

archplugins:=plugins-alternative/Themes/Clean \
	plugins-alternative/Themes/Supercopier \
	plugins-alternative/Themes/Windows \
	plugins-alternative/Themes/Teracopy \
	plugins-alternative/PluginLoader/keybinding \
	plugins/CopyEngine/Ultracopier \
	plugins/Listener/catchcopy-v0002 \
	plugins/Listener/dbus \
	plugins/PluginLoader/catchcopy-v0002 \
	plugins/SessionLoader/KDE4 \
	plugins/SessionLoader/Windows \
	plugins/Themes/Oxygen

debian/detect_arch: debian/detect_arch.cpp
	dh_auto_configure --buildsystem=qmake -- debian/detect_arch.pro
	make
	make install
	make distclean

override_dh_auto_configure: debian/detect_arch
	find plugins/Languages -name flag.png -exec chmod a-x {} +
	ucp_arch=$$(debian/detect_arch) ; \
		for pluginsxml in $(patsubst %,%/informations.xml,$(archplugins)) ; do \
			sed -i -r "s|(<architecture>).*(</architecture>)|\1$$ucp_arch\2|" $$pluginsxml; \
		done
	dh_auto_configure --buildsystem=qmake -- \
		QMAKE_CXXFLAGS_RELEASE="$(CXXFLAGS) $(CPPFLAGS)" \
		QMAKE_CXXFLAGS_DEBUG="$(CXXFLAGS) $(CPPFLAGS)" ultracopier-all-in-one-direct.pro

clean:
	rm -f build
	dh clean --buildsystem=qmake
	for pluginsxml in $(patsubst %,%/informations.xml,$(archplugins)) ; do \
		sed -i -r 's|(<architecture>).*(</architecture>)|\1windows-x86\2|' $$pluginsxml; \
	done
	rm -f debian/detect_arch
	for dir in $(exelang); do chmod go+x plugins/Languages/$$dir/flag.png ; done

build:
	dh build --buildsystem=qmake
	touch build

%:
	dh $@ --buildsystem=qmake