You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
173 lines
4.9 KiB
173 lines
4.9 KiB
13 years ago
|
#!/usr/bin/make -f
|
||
|
# -*- makefile -*-
|
||
|
|
||
|
# Uncomment this to turn on verbose mode.
|
||
|
#export DH_VERBOSE=1
|
||
|
|
||
13 years ago
|
DEB_CONFIGURE_INCLUDEDIR := /opt/trinity/include
|
||
13 years ago
|
DEB_CONFIGURE_MANDIR := /opt/trinity/share/man
|
||
|
DEB_CONFIGURE_PREFIX := /opt/trinity
|
||
|
DEB_CONFIGURE_INFODIR := /opt/trinity/share/info
|
||
|
|
||
|
cdbs_configure_flags := --with-qt-dir=/usr/share/qt3 --disable-rpath --with-xinerama $(cdbs_kde_enable_final) $(cdbs_kde_enable_debug)
|
||
|
|
||
12 years ago
|
DEB_DH_BUILDDEB_ARGS += -- -Z$(shell dpkg-deb --help | grep -q ":.* xz[,.]" \
|
||
|
&& echo xz || echo bzip2)
|
||
|
|
||
13 years ago
|
# This has to be exported to make some magic below work.
|
||
|
export DH_OPTIONS
|
||
|
export QTDIR=/usr/share/qt3
|
||
|
export QMAKESPEC=$(QTDIR)/mkspecs/linux-g++
|
||
|
|
||
|
CXXFLAGS = -Wall -g
|
||
|
|
||
|
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
|
||
|
CXXFLAGS += -O0
|
||
|
else
|
||
|
CXXFLAGS += -O2
|
||
|
endif
|
||
|
|
||
|
PYTHONS := $(shell pyversions -vr debian/control)
|
||
|
DBG_PYTHONS := $(shell pyversions -vd)
|
||
|
|
||
11 years ago
|
DH_PYTHON2 = $(if $(wildcard /usr/bin/dh_python2),dh_python2,dh_python)
|
||
11 years ago
|
|
||
13 years ago
|
GCCVER := $(shell gcc --version | sed -n '/^gcc (GCC)/s/.*(GCC) \(...\).*/\1/p')
|
||
|
ifneq (,$(filter $(GCCVER),4.2 4.3))
|
||
|
SPLIT=20
|
||
|
else
|
||
|
SPLIT=4
|
||
|
endif
|
||
|
|
||
|
.PRECIOUS: build-%/configure-stamp dbg-build-%/configure-stamp
|
||
|
|
||
|
configure: $(PYTHONS:%=build-%/configure-stamp) $(DBG_PYTHONS:%=dbg-build-%/configure-stamp)
|
||
|
|
||
11 years ago
|
build-%/configure-stamp:
|
||
13 years ago
|
dh_testdir
|
||
|
mkdir -p build-$*
|
||
|
cd build-$* && python$* ../configure.py \
|
||
13 years ago
|
-c -u -k /opt/trinity -o /opt/trinity/include -n /opt/trinity/lib \
|
||
10 years ago
|
-e python$* \
|
||
13 years ago
|
-v /opt/trinity/share/sip/trinity -j $(SPLIT)
|
||
|
touch $@
|
||
|
|
||
11 years ago
|
dbg-build-%/configure-stamp:
|
||
13 years ago
|
dh_testdir
|
||
|
mkdir -p dbg-build-$*
|
||
|
cd dbg-build-$* && python$*-dbg ../configure.py \
|
||
13 years ago
|
-c -u -k /opt/trinity -o /opt/trinity/include -n /opt/trinity/lib \
|
||
10 years ago
|
-e python$* \
|
||
13 years ago
|
-v /opt/trinity/share/sip/trinity -j $(SPLIT)
|
||
|
touch $@
|
||
|
|
||
8 years ago
|
build build-arch: $(PYTHONS:%=build-%/build-stamp) $(DBG_PYTHONS:%=dbg-build-%/build-stamp)
|
||
|
build-indep:
|
||
13 years ago
|
|
||
|
build-%/build-stamp: build-%/configure-stamp
|
||
|
dh_testdir
|
||
|
$(MAKE) -C build-$*
|
||
|
touch $@
|
||
|
|
||
|
dbg-build-%/build-stamp: dbg-build-%/configure-stamp
|
||
|
dh_testdir
|
||
|
$(MAKE) -C dbg-build-$*
|
||
|
touch $@
|
||
|
|
||
11 years ago
|
clean:
|
||
13 years ago
|
dh_testdir
|
||
|
dh_testroot
|
||
|
rm -f *-stamp
|
||
|
rm -rf $(PYTHONS:%=build-%) $(DBG_PYTHONS:%=dbg-build-%)
|
||
|
|
||
|
# remove autogenerated *mod.sip files and clean up sources
|
||
|
for moddir in sip/*;\
|
||
|
do\
|
||
|
if [ -d $$moddir ]; then\
|
||
|
rm -f $$moddir/` basename $${moddir}`mod.sip;\
|
||
|
fi;\
|
||
|
done
|
||
|
dh_clean
|
||
|
|
||
|
install: install-indep install-arch
|
||
|
|
||
|
install-indep:
|
||
|
dh_testdir
|
||
|
dh_testroot
|
||
|
dh_clean -k -i
|
||
|
dh_installdirs -i
|
||
|
dh_install -i -X'\.diff$$' -X'\.in$$' -X'\.html$$'
|
||
|
for version in ${PYTHONS};\
|
||
|
do\
|
||
|
mkdir -p debian/python-trinity-trinity-dev/opt/trinity/lib/python-$$version/site-packages;\
|
||
13 years ago
|
cp debian/pytdeconfig.py debian/python-trinity-trinity-dev/opt/trinity/lib/python-$$version/site-packages/;\
|
||
|
cp build-$$version/pytdeconfig.py debian/python-trinity-trinity-dev/opt/trinity/lib/python-$$version/site-packages/pytdeconfig_nd.py;\
|
||
13 years ago
|
done
|
||
|
for version in ${DBG_PYTHONS};\
|
||
|
do\
|
||
13 years ago
|
cp dbg-build-$$version/pytdeconfig.py debian/python-trinity-trinity-dev/opt/trinity/lib/python-$$version/site-packages/pytdeconfig_d.py;\
|
||
13 years ago
|
done
|
||
|
|
||
|
install-arch:
|
||
|
dh_testdir
|
||
|
dh_testroot
|
||
|
dh_clean -k -a
|
||
|
dh_installdirs -a
|
||
|
set -e; \
|
||
|
for version in ${PYTHONS};\
|
||
|
do\
|
||
|
$(MAKE) -C build-$$version install DESTDIR=$(CURDIR)/debian/tmp;\
|
||
|
done
|
||
|
|
||
|
set -e; \
|
||
|
for version in ${DBG_PYTHONS}; do \
|
||
|
$(MAKE) -C dbg-build-$$version install DESTDIR=$(CURDIR)/debian/python-trinity-trinity-dbg;\
|
||
|
done
|
||
|
|
||
|
dh_install -a --sourcedir=$(CURDIR)/debian/tmp
|
||
|
|
||
|
mkdir -p $(CURDIR)/debian/python-trinity-trinity/opt/trinity/lib/
|
||
13 years ago
|
ln -s /opt/trinity/lib/trinity/libkonsolepart.so $(CURDIR)/debian/python-trinity-trinity/opt/trinity/lib/
|
||
13 years ago
|
for i in $$(find debian/python-*-dbg -name '*.so'); do \
|
||
|
b=$$(basename $$i .so); \
|
||
|
mv $$i $$(dirname $$i)/$${b}_d.so; \
|
||
|
done
|
||
|
find debian/python-*-dbg ! -type d \
|
||
|
! \( -name '*.so' -o -name '*config_d.py' \) | xargs rm -f
|
||
|
|
||
|
find debian/python-*-dbg -depth -type d -empty -exec rmdir {} \;
|
||
|
|
||
|
|
||
|
# Must not depend on anything. This is to be called by
|
||
|
# binary-arch/binary-indep
|
||
|
# in another 'make' thread.
|
||
|
binary-common:
|
||
|
dh_testdir
|
||
|
dh_testroot
|
||
|
dh_installchangelogs ChangeLog
|
||
|
dh_installdocs -A THANKS
|
||
|
dh_installexamples
|
||
|
dh_link
|
||
|
ifeq (,$(findstring -i, $(DH_OPTIONS)))
|
||
|
DH_OPTIONS= dh_strip -ppython-trinity-trinity #--dbg-package=python-trinity-trinity-dbg
|
||
|
endif
|
||
|
dh_compress -X.py -X.ui -X.dtd
|
||
|
dh_fixperms
|
||
11 years ago
|
${DH_PYTHON2}
|
||
13 years ago
|
dh_installdeb
|
||
|
dh_shlibdeps -l /opt/trinity/lib
|
||
|
dh_gencontrol
|
||
|
dh_md5sums
|
||
12 years ago
|
dh_builddeb $(DEB_DH_BUILDDEB_ARGS)
|
||
13 years ago
|
|
||
|
# Build architecture independant packages using the common target.
|
||
|
binary-indep: install-indep
|
||
|
$(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
|
||
|
|
||
|
# Build architecture dependant packages using the common target.
|
||
|
binary-arch: build install-arch
|
||
|
$(MAKE) -f debian/rules DH_OPTIONS=-a binary-common
|
||
|
|
||
|
binary: binary-arch binary-indep
|
||
8 years ago
|
.PHONY: build build-arch clean binary-indep binary-arch binary install install-indep install-arch configure
|