File _service:extract_file:debian.rules of Package LDView
#!/usr/bin/make -f
# Sample debian/rules that uses debhelper.
# GNU copyright 1997 to 1999 by Joey Hess.
# Uncomment this to turn on verbose mode.
export DH_VERBOSE=1
# This is the debhelper compatibility version to use.
# export DH_COMPAT=7
# Select Qt version 4 or 5
export QT_SELECT=4
#export QT_SELECT=5
CFLAGS = -g
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O2
endif
SPEC := $(shell if [ `uname -m` = "x86_64" ] ; then echo linux-g++-64 ; elif [ `uname -m` = i386 -o `uname -m` = i486 -o `uname -m` = i586 -o `uname -m` = i686 ] ; then echo linux-g++-32 ; else echo linux-g++ ; fi )
TESTING := $(shell if [ ! -f /usr/include/gl2ps.h ] ; then echo -I ../3rdParty/gl2ps -L ../3rdParty/gl2ps ; fi; if [ ! -f /usr/include/tinyxml.h ] ; then echo -I ../3rdParty/tinyxml ; fi) $(shell dpkg-buildflags --get CPPFLAGS)
DEST=$(shell if [ -f /usr/src/packages/BUILD/QT/LDView.pro ] ; then echo /usr/src/packages/BUILD/debian/ldview ; else echo $(shell pwd)/debian/ldview ; fi )
export Q_LDFLAGS="-Wl,-z,relro"
LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS)
build-arch: build
build-indep: build
build: build-stamp
build-stamp:
dh_testdir
# Add here commands to compile the package.
if [ -f LDView.pro ] ; then cd .. ; fi ; \
cd OSMesa ; \
export TESTING="$(TESTING)"; \
make STATIC="$(LDFLAGS)" USE_CPP11=YES all; \
cd ../QT ; \
if which lrelease-qt4 >/dev/null ; then \
lrelease-qt4 LDView.pro; \
elif which lrelease-qt5 >/dev/null ; then \
lrelease-qt5 LDView.pro; \
elif which lrelease >/dev/null ; then \
lrelease LDView.pro ; \
fi; \
if which qmake6 >/dev/null ; then \
qmake6 -config release \
-spec $(SPEC) \
USE_CPP11=YES; \
elif which qmake >/dev/null ; then \
qmake -config release \
-spec $(SPEC) \
USE_CPP11=YES; \
fi; \
make all ; \
if [ -x /usr/bin/kf5-config ] ; then \
cd kde5; mkdir -p build ; cd build ; \
(QT_SELECT=5;cmake -DCMAKE_INSTALL_PREFIX=`kf5-config --prefix` .. ;\
make all); \
elif [ -x /usr/bin/kde4-config ] ; then \
cd kde ; mkdir -p build ; cd build ; \
(QT_SELECT=4;cmake -DCMAKE_INSTALL_PREFIX=`kde4-config --prefix` .. ;\
make all) ; \
fi
# --- end custom part for compiling
touch build-stamp
clean:
dh_testdir
dh_testroot
rm -f build-stamp
# Add here commands to clean up after the build process.
if [ -f LDView.pro ] ; then cd .. ; fi ; \
cd 3rdParty/tinyxml ; make -f Makefile.pbartfai clean || true
if [ -f LDView.pro ] ; then cd .. ; fi ; \
cd QT ; make clean || true ; cd .. ;\
cd OSMesa ; make clean || true ; cd .. ; \
cd QT/kde ; if [ -d build ]; then rm -rf build ; fi ;\
cd ../kde5; if [ -d build ]; then rm -rf build ; fi
# --- end custom part for cleaning up
dh_clean
install: build
dh_testdir
dh_testroot
dh_prep
dh_installdirs
# Add here commands to install the package
# The DESTDIR Has To Be Exactly /usr/src/packages/BUILD/debian/<nameOfPackage>
if [ -f LDView.pro ] ; then cd .. ; fi ; \
cd QT ; make INSTALL_ROOT=$(DEST) install ;\
rm -f $(DEST)/usr/share/ldview/license.txt ;\
cd ../OSMesa ; make PREFIX=$(DEST)-osmesa install ;\
cd ../QT ;\
if [ -x /usr/bin/kf5-config ] ; then \
cd kde5/build ; make DESTDIR=$(DEST) install ;\
elif [ -x /usr/bin/kde4-config ] ; then \
cd kde/build ; make DESTDIR=$(DEST) install ;\
fi
# --- end custom part for installing
# Build architecture-independent files here.
binary-indep: build install
# We have nothing to do by default.
# Build architecture-dependent files here.
binary-arch: build install
dh_testdir
dh_testroot
# dh_installdebconf
dh_installdocs
dh_installexamples
dh_installmenu
# dh_installlogrotate
# dh_installemacsen
# dh_installpam
# dh_installmime
# dh_installinit
dh_installcron
dh_installman
dh_installinfo
# dh_gconf
# dh_undocumented
dh_installchangelogs
dh_link
dh_strip
dh_compress
dh_fixperms
# dh_makeshlibs
dh_installdeb
# dh_perl
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install