summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorThomas Preud'homme <robotux@celest.fr>2013-03-21 19:06:05 +0100
committerThomas Preud'homme <robotux@celest.fr>2017-11-24 22:57:49 +0000
commit54e2237d50f16ed8f75df4dce718d37e0d4e71a7 (patch)
treee5a43e205da43eda711da48531657cc28c2752c7 /debian
parent36bdbcee50f59bb2fc85fcad3f5b571710d17bcb (diff)
Fix ultracopier platform value
Diffstat (limited to 'debian')
-rw-r--r--debian/changelog1
-rw-r--r--debian/detect_arch.cpp8
-rw-r--r--debian/detect_arch.pro7
-rwxr-xr-xdebian/rules26
4 files changed, 41 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog
index 33b6a53..d857ab0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -9,6 +9,7 @@ ultracopier (0.3.1.0-1) unstable; urgency=low
+ Stop creating player_pause.png resource for Teracopy theme since it is
now in upstream tarball.
+ Drop executable permissions on flag.png images at build time.
+ + Fix ultracopier platform value in source code before building it.
* Drop hardening-no-fortify-functions lintian override since it is a false
positive (thanks Paul Tagliamonte).
diff --git a/debian/detect_arch.cpp b/debian/detect_arch.cpp
new file mode 100644
index 0000000..8a2ff5b
--- /dev/null
+++ b/debian/detect_arch.cpp
@@ -0,0 +1,8 @@
+#include <iostream>
+#include <PlatformMacro.h>
+
+int main(void)
+{
+ std::cout << ULTRACOPIER_PLATFORM_CODE;
+ return 0;
+}
diff --git a/debian/detect_arch.pro b/debian/detect_arch.pro
new file mode 100644
index 0000000..504b46f
--- /dev/null
+++ b/debian/detect_arch.pro
@@ -0,0 +1,7 @@
+TEMPLATE = app
+
+TARGET = detect_arch
+target.path = .
+INSTALLS += target
+HEADERS += PlatformMacro.h
+SOURCES += debian/detect_arch.cpp
diff --git a/debian/rules b/debian/rules
index 2ac9856..85c2083 100755
--- a/debian/rules
+++ b/debian/rules
@@ -4,9 +4,29 @@
#export DH_VERBOSE=1
exelang:=de it el ja pl zh tr
+archplugins:=plugins-alternative/CopyEngine/Rsync \
+ plugins-alternative/Themes/Clean \
+ plugins-alternative/Themes/Teracopy \
+ plugins/CopyEngine/Ultracopier-0.3 \
+ plugins/Listener/catchcopy-v0002 \
+ plugins/Listener/dbus \
+ plugins/PluginLoader/catchcopy-v0002 \
+ plugins/SessionLoader/KDE4 \
+ plugins/SessionLoader/Windows \
+ plugins/Themes/Oxygen
-override_dh_auto_configure:
+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)" build.pro
@@ -14,6 +34,10 @@ override_dh_auto_configure:
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: