summaryrefslogtreecommitdiffstats
path: root/dilos/core/tdebindings/debian/rules
blob: a43bbff91f6be06d62444a187b351cc6087bf7a5 (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
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
#! /usr/bin/make -f

DEB_QUILT_PATCHDIR_LINK :=
export QUILT_PATCHES=debian/patches

DEB_PYTHON_SYSTEM = $(if $(wildcard /usr/bin/dh_python2),,pysupport)
DH_PYTHON2 = $(if $(wildcard /usr/bin/dh_python2),dh_python2,dh_pysupport)


include /usr/share/cdbs/1/rules/debhelper.mk
override DEB_BUILDDIR := $(DEB_SRCDIR)
include debian/cdbs/debian-tde.mk
DEB_BUILDDIR := $(DEB_SRCDIR)

DEB_CONFIGURE_INCLUDEDIR := /usr/include/tde
DEB_CONFIGURE_MANDIR := /usr/share/man
DEB_CONFIGURE_PREFIX := /usr
DEB_CONFIGURE_INFODIR := /usr/share/info

cdbs_configure_flags := --with-qt-dir=/usr/share/qt3 --disable-rpath --with-xinerama $(cdbs_kde_enable_final) $(cdbs_kde_enable_debug)

export CPPFLAGS+= -D__dilos__

###

#ifneq (,$(shell dh_listpackages -s | grep libqt3-jni-trinity))
    WITH_JAVA := --with-java=/usr/lib/jvm/oracle-default-jdk
#else
#    WITH_JAVA    := --without-java
#    WITHOUT_JAVA := 1
#endif

###

DEB_CONFIGURE_EXTRA_FLAGS = $(WITH_JAVA) --prefix=/usr  \
	--libdir=/usr/lib/$(DEB_HOST_MULTIARCH) \
	--enable-libsuffix=/$(DEB_HOST_MULTIARCH) \
	--with-tqt-libraries=/usr/lib/$(DEB_HOST_MULTIARCH) \
	--with-extra-includes=/usr/include/tqt \
	DO_NOT_COMPILE='dcopc dcopperl kalyptus qtsharp xparts python'

DEB_COMPRESS_EXCLUDE += .java .ui .js .rb .map .wav .bmp .cpp .sk

# These are not all the packages with libraries, but only those that
# need to be in DEB_SHLIBDEPS_INCLUDE...
PACKAGES_WITH_LIBS = libqt3-jni-trinity libsmoketqt1-trinity libsmoketde1-trinity libkjsembed1-trinity
DEB_DH_SHLIBDEPS_ARGS += --dpkg-shlibdeps-params=--ignore-missing-info


###

clean::
	rm -f kjsembed/docs/embedding/simple-embed/Makefile
	rm -f debian/stamp-install-dcopjava
	[ ! -f Makefile ] || $(MAKE) -C dcopjava distclean
	find . -name 'Makefile' -exec rm {} \;
	# Just in case
	rm -f $(DEB_SRCDIR)/dcopjava/dcopidl2java/dcopidl2java
	rm -f $(DEB_SRCDIR)/dcopjava/dcopidl2java/dcopidl2java.all_cpp.o
	rm -f $(DEB_SRCDIR)/dcopjava/binding/org/trinitydesktop/DCOP/*.class
	rm -rf $(DEB_SRCDIR)/dcopjava/binding/.libs
	rm -f dcopjava/binding/client.lo
	rm -f dcopjava/binding/libjavadcop.la
	rm -f dcopjava/binding/org_trinitydesktop_DCOP_Client.h
	rm -f dcopjava/dcopidl2java/dcopidl2java.all_cpp.cpp
	rm -f smoke/tde/qtdefines
	rm -f smoke/tde/smokedata.cpp.diff
	rm -f smoke/tqt/qtdefines
	rm -f smoke/tqt/smokedata.cpp.diff


common-build-indep:: stamp-build-dcopjava
stamp-build-dcopjava:
ifndef WITHOUT_JAVA
	# build dcopjava even though it's disabled upstream.
	cd $(DEB_BUILDDIR) && \
	$(MAKE) -C dcopjava 
endif
	touch debian/$@

stamp-install-dcopjava:
ifndef WITHOUT_JAVA
	cd $(DEB_BUILDDIR) && \
	$(MAKE) -C dcopjava install DESTDIR=$(CURDIR)/debian/tmp
endif
	touch debian/$@

upstream_version=$(shell head -1 $(CURDIR)/debian/changelog | sed -e "s,.*:\([^-\+]*\).*,\1,")

common-install-arch::
	# Move the python and ruby bindings to the correct directory
#	cp -Rp debian/tmp/usr/lib/* debian/tmp/usr/lib/
#	rm -rf debian/tmp/usr/lib/*

common-install-indep:: stamp-install-dcopjava
	dh_link -i
ifndef WITHOUT_JAVA
	# Fix up the Java packages so they conform to policy
	mkdir -p debian/tmp/usr/share/java
	(cd debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/java ; jar cvf ../../../share/java/dcopjava-$(upstream_version).jar org/ )
	cd debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/java; rm -rf org
	ln -s dcopjava-$(upstream_version).jar debian/tmp/usr/share/java/dcopjava.jar

	mv debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/java/qtjava.jar debian/tmp/usr/share/java/qtjava-$(upstream_version).jar
	ln -s qtjava-$(upstream_version).jar debian/tmp/usr/share/java/qtjava.jar

	mv debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/java/koala.jar debian/tmp/usr/share/java/koala-$(upstream_version).jar
	ln -s koala-$(upstream_version).jar debian/tmp/usr/share/java/koala.jar
endif

common-install-arch:: stamp-install-dcopjava
	dh_link -s
	
	# Provide a Makefile for the example
	$(if $(call cdbs_streq,$(DEB_BUILDDIR),$(DEB_SRCDIR)),,\
	    cp $(DEB_BUILDDIR)/kjsembed/docs/embedding/simple-embed/Makefile kjsembed/docs/embedding/simple-embed)

###

binary-install/juic-trinity::
#	DilOS dirty hack
#	mv debian/$(cdbs_curpkg)/usr/share/man debian/$(cdbs_curpkg)/usr/share/
	sed -i "s|UIXSLDIR=/usr|UIXSLDIR=/usr|" debian/$(cdbs_curpkg)/usr/bin/juic

binary-install/libdcop3-java-trinity-dev::
#	mv debian/$(cdbs_curpkg)/usr/share/man debian/$(cdbs_curpkg)/usr/share/

binary-install/libkorundum0-ruby-trinity::
#	mv debian/$(cdbs_curpkg)/usr/share/man debian/$(cdbs_curpkg)/usr/share/

binary-install/libqt0-ruby-trinity::
#	mv debian/$(cdbs_curpkg)/usr/share/man debian/$(cdbs_curpkg)/usr/share/

binary-install/python-dcop-trinity::
	${DH_PYTHON2} -p$(cdbs_curpkg)

###

common-binary-post-install-arch::
	for p in $(PACKAGES_WITH_USD_SYMLINK); do \
	  rm -f debian/$$p/usr/share/doc/$$p/copyright; \
	  rm -f debian/$$p/usr/share/doc/$$p/changelog.Debian; \
	  rm -f debian/$$p/usr/share/doc/$$p/changelog; \
	done

common-binary-post-install-indep::
	for p in $(PACKAGES_WITH_USD_SYMLINK); do \
	  rm -f debian/$$p/usr/share/doc/$$p/copyright; \
	  rm -f debian/$$p/usr/share/doc/$$p/changelog.Debian; \
	  rm -f debian/$$p/usr/share/doc/$$p/changelog; \
	done

PACKAGES_WITH_USD_SYMLINK = tdebindings-java-trinity libtrinity-java-trinity libqt3-java-trinity \
			    libdcop3-java-trinity-dev libdcop3-java-trinity \
			    libsmoketde-trinity-dev libsmoketqt-trinity-dev \
			    kjscmd-trinity libkjsembed-trinity-dev