diff options
| author | Igor Pashev <pashev.igor@gmail.com> | 2012-11-03 23:49:45 +0400 |
|---|---|---|
| committer | Igor Pashev <pashev.igor@gmail.com> | 2012-11-03 23:49:45 +0400 |
| commit | 296eb3acb557cc592527aad4bb1d4890c35a6c6e (patch) | |
| tree | 5268ab10dd9778705d4b0b9047708d9932129012 /libbrand/debian/rules | |
| parent | 55c57b69271af5e4c09edd18ef7580e6ebee347f (diff) | |
| download | illumos-packaging-296eb3acb557cc592527aad4bb1d4890c35a6c6e.tar.gz | |
libbrand
Diffstat (limited to 'libbrand/debian/rules')
| -rwxr-xr-x | libbrand/debian/rules | 96 |
1 files changed, 96 insertions, 0 deletions
diff --git a/libbrand/debian/rules b/libbrand/debian/rules new file mode 100755 index 0000000..40abddb --- /dev/null +++ b/libbrand/debian/rules @@ -0,0 +1,96 @@ +#!/usr/bin/make -f + +include /usr/share/dpkg/architecture.mk +export DH_VERBOSE = 1 + +# libs having "install_h" target to install headers: +libs_headers := \ +libbrand \ + +# All libraries to build and to package. +# Order is important: +libs := $(libs_headers) \ + + +unpack: unpack-stamp +unpack-stamp: + dh_testdir + dh_illumos_gate --build \ + $(libs:%=usr/src/lib/%) \ + + # Not used and buggy: + echo > usr/src/Makefile.msg.targ + echo "export LIBPOOL_DTD_DIR='$(LIBPOOL_DTD_DIR)'" >> usr/env.sh + touch $@ + +patch: patch-stamp +patch-stamp: unpack-stamp + dh_testdir + [ ! -f debian/patches/series ] || QUILT_PATCHES=debian/patches quilt push -a || test $$? = 2 + touch $@ + +unpatch: + dh_testdir + [ ! -f debian/patches/series ] || QUILT_PATCHES=debian/patches quilt pop -a -f || test $$? = 2 + rm -f patch-stamp + +dirs-stamp: + . usr/env.sh; mkdir -p \ + debian/tmp/usr/include \ + debian/tmp/usr/share/xml/schema/brandz \ + debian/tmp$$DEB_LIBDIR_32 \ + debian/tmp$$DEB_LIBDIR_64 \ + debian/tmp$$DEB_USRLIBDIR_32 \ + debian/tmp$$DEB_USRLIBDIR_64 + +headers-stamp: patch-stamp dirs-stamp + dh_illumos_make $(libs_headers:%=usr/src/lib/%) -t install_h + # Public Morozov: + cp usr/src/lib/libbrand/common/libbrand_impl.h \ + debian/tmp/usr/include/ + touch $@ + +install build build-arch build-indep: build-stamp +build-stamp: patch-stamp dirs-stamp headers-stamp + dh_illumos_make $(libs:%=usr/src/lib/%) + # Move dev symlink from /lib into /usr/lib: + for l in `find debian/tmp/lib32 -maxdepth 1 -type l -name \*.so`; do \ + ln -sf `readlink -f $$l` debian/tmp/usr/lib32/`basename $$l`; \ + rm $$l; \ + done + for l in `find debian/tmp/lib/$(DEB_HOST_MULTIARCH) -maxdepth 1 -type l -name \*.so`; do \ + ln -sf `readlink -f $$l` debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/`basename $$l`; \ + rm $$l; \ + done + # Make symlinks relative: + symlinks -c debian/tmp/usr/lib32 + symlinks -c debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH) + touch $@ + +binary binary-arch binary-indep: binary-stamp +binary-stamp: build-stamp + dh_testdir + dh_testroot + dh_installdirs + dh_install + dh_installman + dh_installdocs + dh_installexamples + dh_installchangelogs + dh_link + dh_compress + dh_fixperms + dh_makeshlibs -- -c4 + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + touch $@ + +clean: unpatch + dh_testdir + dh_testroot + dh_clean + rm -rf usr + |
