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
|
#!/usr/bin/make -f
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
CFLAGS = -Wall -g
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O2
endif
ifeq (hppa,$(DEB_BUILD_ARCH))
ARCH_C_FLAGS=-mlong-calls
ARCH_CXX_FLAGS=${ARCH_C_FLAGS}
endif
configure: configure-stamp
configure-stamp:
QUILT_PATCHES=debian/patches quilt push -a || test $$? = 2
dh_testdir
mkdir -p debian/build-area
cd debian/build-area && cmake --debug-output \
-D CMAKE_BUILD_TYPE:STRING=RelWithDebInfo \
-D CMAKE_CXX_FLAGS_RELWITHDEBINFO="${CFLAGS} ${ARCH_CXX_FLAGS}" \
-D CMAKE_C_FLAGS_RELWITHDEBINFO="${CFLAGS} ${ARCH_C_FLAGS}" \
-DCMAKE_INSTALL_PREFIX=/usr $(CURDIR)
touch configure-stamp
build: configure-stamp build-stamp
build-stamp:
dh_testdir
cd debian/build-area && make
#fix path errors with CMake and kde
sed -i "s:\ /usr:\ ../../debian/tmp/usr:" debian/build-area/boson/data/install_icons.cmake
# generate manpages
for i in debian/*.sgml; do \
docbook-to-man $$i > `dirname $$i`/`basename $$i .sgml`.6 ;\
done
ls debian/*.6 > debian/boson.manpages
touch build-stamp
clean:
dh_testdir
dh_testroot
rm -rf debian/build-area
for i in debian/*.sgml; do \
rm -f `echo $$i| sed 's/sgml/6/'` ;\
done
dh_clean build-stamp \
configure-stamp \
debian/boson.substvars \
debian/boson.manpages \
debian/stamp-cmake-build \
CMakeFiles \
CMakeCache.txt
QUILT_PATCHES=debian/patches quilt pop -a -R || test $$? = 2
install: build
dh_testdir
dh_testroot
dh_clean -k
cd debian/build-area && make install DESTDIR=$(CURDIR)/debian/tmp
install -D -p -m0644 debian/boson.xpm debian/tmp/usr/share/pixmaps/boson.xpm
mv debian/tmp/usr/bin debian/tmp/usr/games
binary-indep: build install
binary-arch: build install
dh_testdir
dh_testroot
dh_install
dh_installchangelogs ChangeLog
dh_installdocs
dh_installman
dh_installmenu
dh_link
dh_strip
dh_compress
dh_fixperms
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install
|