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
|
#!/usr/bin/make -f
export DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
build: build-stamp
build-stamp:
dh_testdir
./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \
--prefix=/usr --enable-devel=no \
--mandir=/usr/share/man --enable-vdkxdb=yes --enable-gnome=yes\
--libdir=/usr/lib/vdkbuilder2
$(MAKE)
touch build-stamp
clean:
dh_testdir
dh_testroot
rm -f build-stamp install-stamp
# autotools-dev stuff
-test -r /usr/share/misc/config.sub && \
cp -f /usr/share/misc/config.sub config.sub
-test -r /usr/share/misc/config.guess && \
cp -f /usr/share/misc/config.guess config.guess
# Add here commands to clean up after the build process.
-$(MAKE) distclean
find . -name '*.o' -o -name '_libs' -o -name '*.lo' -o -name '*.a' -o -name '.deps' | xargs rm -rf
dh_clean
install: install-stamp
install-stamp: build
dh_testdir
dh_testroot
dh_clean
$(MAKE) DESTDIR=`pwd`/debian/vdkbuilder2 install
touch install-stamp
# Build architecture-independent files here.
binary-indep:
# We have nothing to do by default.
# Build architecture-dependent files here.
binary-arch: build install libvdkbuilder2-dev libvdkbuilder2 vdkbuilder2
vdkbuilder2: build
dh_testdir -pvdkbuilder2
dh_testroot -pvdkbuilder2
dh_installdirs -pvdkbuilder2
dh_installdocs -pvdkbuilder2
dh_installmenu -pvdkbuilder2
# start copying the examples
# here we do something not very clean, but it is working
# aka, we sometimes try to install -m 644 some directories
# the final thing works anyhow
files="\
hello " ;\
working_dir=`pwd`; \
for file in $$files; do \
install -d debian/vdkbuilder2/usr/share/doc/vdkbuilder2/examples/$$file; \
cd $$working_dir; \
install -m 644 example/$$file/* \
debian/vdkbuilder2/usr/share/doc/vdkbuilder2/examples/$$file/; \
done
# remove unwanted stuff
# this includes the static libs of the builder part of the pluggins
rm -rf debian/vdkbuilder2/usr/lib/*.la \
debian/vdkbuilder2/usr/lib/*.a
rm -f debian/vdkbuilder2/usr/share/vdkb2/res/COPYING
# fix permissions
chmod +x debian/vdkbuilder2/usr/share/vdkb2/res/autogen.sh
# rename the ChangeLog
cd debian/vdkbuilder2/usr/share/doc/vdkbuilder2/; \
mv ChangeLog changelog
# install by hand the man page of vdkb
install -d debian/vdkbuilder2/usr/share/man/man1
install -m 644 debian/vdkb2.1 debian/vdkbuilder2/usr/share/man/man1
# dh_installmanpages
dh_installchangelogs -pvdkbuilder2
dh_strip -pvdkbuilder2
dh_compress -pvdkbuilder2
dh_fixperms -pvdkbuilder2
dh_installdeb -pvdkbuilder2
dh_shlibdeps -pvdkbuilder2
dh_gencontrol -pvdkbuilder2
dh_md5sums -pvdkbuilder2
dh_builddeb -pvdkbuilder2
libvdkbuilder2: build
dh_testdir -plibvdkbuilder2
dh_testroot -plibvdkbuilder2
dh_clean -v -k -plibvdkbuilder2
dh_installdirs -plibvdkbuilder2
dh_movefiles --sourcedir=debian/vdkbuilder2 -plibvdkbuilder2
dh_installdocs -plibvdkbuilder2
dh_installchangelogs -plibvdkbuilder2
dh_strip -plibvdkbuilder2
dh_compress -plibvdkbuilder2
dh_fixperms -plibvdkbuilder2
dh_installdeb -plibvdkbuilder2
dh_shlibdeps -plibvdkbuilder2
dh_gencontrol -plibvdkbuilder2
dh_md5sums -plibvdkbuilder2
dh_builddeb -plibvdkbuilder2
libvdkbuilder2-dev: build
dh_testdir -plibvdkbuilder2-dev
dh_testroot -plibvdkbuilder2-dev
dh_clean -v -k -plibvdkbuilder2-dev
dh_installdirs -plibvdkbuilder2-dev
dh_movefiles --sourcedir=debian/vdkbuilder2 -plibvdkbuilder2-dev
dh_installdocs -plibvdkbuilder2-dev
dh_installchangelogs -plibvdkbuilder2-dev
dh_strip -plibvdkbuilder2-dev
dh_compress -plibvdkbuilder2-dev
dh_fixperms -plibvdkbuilder2-dev
dh_installdeb -plibvdkbuilder2-dev
dh_shlibdeps -plibvdkbuilder2-dev
dh_gencontrol -plibvdkbuilder2-dev
dh_md5sums -plibvdkbuilder2-dev
dh_builddeb -plibvdkbuilder2-dev
source diff:
@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary
|