--- newt.old/debian/rules Sat Jul 26 12:41:12 2008 +++ /opt/emdebian/trunk/n/newt/trunk/newt-0.52.2/debian/rules Sat Jul 26 12:41:23 2008 @@ -12,15 +12,25 @@ DEB_BUILD_GNU_SYSTEM = $(shell dpkg-architecture -qDEB_BUILD_GNU_SYSTEM) DEB_BUILD_GNU_CPU = $(shell dpkg-architecture -qDEB_BUILD_GNU_CPU) +DEB_HOST_GNU_TYPE=$(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) +DEB_BUILD_GNU_TYPE=$(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) +ifneq ($(DEB_HOST_GNU_TYPE), $(DEB_BUILD_GNU_TYPE)) +CROSS=--build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE) +CROSSCC=$(DEB_HOST_GNU_TYPE)-gcc +else +CROSS= +CROSSCC=gcc +endif + VERSION=0.52.2 SONAME=0.52 -PYVERS=$(shell pyversions -vr debian/control) +PYVERS= LIB_PKG=libnewt$(SONAME) DEV_PKG=libnewt-dev PIC_PKG=libnewt-pic -TCL_PKG=newt-tcl -PYTHON_PKG=python-newt +TCL_PKG= +PYTHON_PKG= WHIPTAIL_PKG=whiptail # This is the debhelper compatability version to use. @@ -37,7 +47,7 @@ # get the items created here. binarytarget=binary-devel binary-shared binary-runtime binary-tcl \ - binary-python binary-pic + binary-pic #target specific configurations come here: LIBCDEV=libc-dev @@ -72,14 +82,14 @@ cp newt.spec $(BUILD_TREE) rm -f $(BUILD_TREE)/.depend ( cd $(BUILD_TREE) && autoconf --force -i ) - ( cd $(BUILD_TREE) && ./configure $(GPMSUPPORT) $(NOSTRIP) ) + ( cd $(BUILD_TREE) && ./configure $(GPMSUPPORT) $(NOSTRIP) $(CROSS) ) touch $@ build: $(build-stamp) $(build-stamp): $(configure-stamp) dh_testdir ( cd $(BUILD_TREE) && sgmltools --backend html tutorial.sgml ) - $(MAKE) -C $(BUILD_TREE) + CC=$(CROSSCC) $(MAKE) -C $(BUILD_TREE) ( cd $(BUILD_TREE) && ar cqv libnewt_pic.a shared/*.o ) # build POT file for translators make -C $(BUILD_TREE)/po newt.pot @@ -88,107 +98,97 @@ clean: dh_testdir dh_testroot - dh_clean + dh_clean rm -rf $(SOURCE_DIR) $(STAMP_DIR) rm -f debian/python-newt.dirs debian/python-newt.install debian/python-newt.postinst - # rm -rf debian/substvars debian/*.bak debian/*~ *~ + ${RM} -r debian/newt-locale-* + # rm -rf debian/substvars debian/*.bak debian/*~ *~ binary: binary-indep binary-arch binary-indep: -binary-arch: $(LIB_PKG) $(DEV_PKG) $(PIC_PKG) $(TCL_PKG) $(PYTHON_PKG) $(WHIPTAIL_PKG) +binary-arch: $(LIB_PKG) $(DEV_PKG) $(PIC_PKG) $(TCL_PKG) $(WHIPTAIL_PKG) $(LIB_PKG): build dh_testdir - dh_testroot - dh_installdirs -p $@ + dh_testroot + dh_installdirs -p $@ dh_install -p $@ --sourcedir=$(BUILD_TREE) chmod +x $(BUILD_TREE)/mkinstalldirs - $(MAKE) -C $(BUILD_TREE)/po prefix=/usr \ + CC=$(CROSSCC) $(MAKE) -C $(BUILD_TREE)/po prefix=/usr \ DESTDIR=../../../debian/$@ HAVE_XGETTEXT=yes install + ${RM} -r debian/$(LIB_PKG)/usr/share/locale/ dh_strip -p $@ dh_makeshlibs -p $@ dh_shlibdeps -L $(LIB_PKG) -l debian/$@/usr/lib - dh_installdocs -p $@ -p $@ $(BUILD_TREE)/newt.spec dh_link -p $@ /usr/lib/libnewt.so.$(VERSION) /usr/lib/libnewt.so.$(SONAME) rm debian/$@/usr/lib/libnewt.so # Currently disabled, as debian-test has been removed. # chmod +x debian/whiptail/usr/lib/debian-test/tests/whiptail/test-newt.sh/test-newt.sh - dh_installchangelogs -p $@ dh_compress -p $@ dh_installdeb -p $@ dh_fixperms -p $@ - dh_gencontrol -p $@ + dh_gencontrol -p $@ dh_md5sums -p $@ dh_builddeb -p $@ $(PIC_PKG): build dh_testdir - dh_testroot + dh_testroot dh_installdirs -p $@ dh_install -p $@ --sourcedir=$(BUILD_TREE) cp $(BUILD_TREE)/newt*.ver debian/libnewt-pic/usr/lib/libnewt_pic.map dh_strip -p $@ dh_makeshlibs -p $@ - dh_installdocs -p $@ -p $@ $(BUILD_TREE)/newt.spec # Currently disabled, as debian-test has been removed. # chmod +x debian/whiptail/usr/lib/debian-test/tests/whiptail/test-newt.sh/test-newt.sh - dh_installchangelogs -p $@ dh_compress -p $@ dh_shlibdeps -p $@ -ldebian/$@/usr/lib dh_fixperms -p $@ dh_installdeb -p $@ - dh_gencontrol -p $@ + dh_gencontrol -p $@ dh_md5sums -p $@ dh_builddeb -p $@ $(DEV_PKG): build dh_testdir - dh_testroot + dh_testroot dh_installdirs -p $@ dh_install -p $@ --sourcedir=$(BUILD_TREE) dh_strip -p $@ dh_makeshlibs -p $@ - dh_installdocs -p $@ -p $@ $(BUILD_TREE)/newt.spec dh_link -p $@ /usr/lib/libnewt.so.$(VERSION) /usr/lib/libnewt.so - dh_link -p $@ \ - /usr/share/doc/libnewt-dev/tutorial.html/t1.html \ - /usr/share/doc/libnewt-dev/tutorial.html/index.html # Currently disabled, as debian-test has been removed. # chmod +x debian/whiptail/usr/lib/debian-test/tests/whiptail/test-newt.sh/test-newt.sh - dh_installchangelogs -p $@ - dh_installexamples -p $@ dh_compress -p $@ dh_shlibdeps -p $@ -ldebian/$@/usr/lib dh_fixperms -p $@ dh_installdeb -p $@ - dh_gencontrol -p $@ + dh_gencontrol -p $@ dh_md5sums -p $@ dh_builddeb -p $@ $(TCL_PKG): build dh_testdir - dh_testroot + dh_testroot dh_installdirs -p $@ dh_install -p $@ --sourcedir=$(BUILD_TREE) dh_strip -p $@ dh_makeshlibs -p $@ - dh_installdocs -p $@ -p $@ $(BUILD_TREE)/newt.spec # Currently disabled, as debian-test has been removed. # chmod +x debian/whiptail/usr/lib/debian-test/tests/whiptail/test-newt.sh/test-newt.sh - dh_installchangelogs -p $@ dh_compress -p $@ dh_shlibdeps -p $@ -ldebian/$@/usr/lib dh_fixperms -p $@ dh_installdeb -p $@ - dh_gencontrol -p $@ + dh_gencontrol -p $@ dh_md5sums -p $@ dh_builddeb -p $@ $(PYTHON_PKG): build dh_testdir - dh_testroot + dh_testroot for v in $(PYVERS); do \ echo usr/lib/python$$v/site-packages >> debian/$@.dirs; \ echo python$$v/_snackmodule.so usr/lib/python$$v/site-packages \ @@ -196,40 +196,34 @@ echo snack.py usr/lib/python$$v/site-packages \ >> debian/$@.install; \ done - dh_installdirs -p $@ + dh_installdirs -p $@ dh_install -p $@ --sourcedir=$(BUILD_TREE) dh_strip -p $@ DH_PYCENTRAL=nomove dh_pycentral -p $@ - dh_installdocs -p $@ $(BUILD_TREE)/newt.spec # Currently disabled, as debian-test has been removed. # chmod +x debian/whiptail/usr/lib/debian-test/tests/whiptail/test-newt.sh/test-newt.sh - dh_installchangelogs -p $@ - dh_installexamples -p $@ dh_compress -p $@ dh_shlibdeps -p $@ -ldebian/$@/usr/lib dh_fixperms -p $@ dh_installdeb -p $@ - dh_gencontrol -p $@ + dh_gencontrol -p $@ dh_md5sums -p $@ dh_builddeb -p $@ $(WHIPTAIL_PKG): build dh_testdir - dh_testroot + dh_testroot dh_installdirs -p $@ dh_install -p $@ --sourcedir=$(BUILD_TREE) dh_strip -p $@ dh_makeshlibs -V - dh_installdocs -p $@ -p $@ $(BUILD_TREE)/newt.spec debian/README.whiptail - dh_installman -p $@ $(BUILD_TREE)/whiptail.1 # Currently disabled, as debian-test has been removed. # chmod +x debian/whiptail/usr/lib/debian-test/tests/whiptail/test-newt.sh/test-newt.sh - dh_installchangelogs -p $@ dh_compress -p $@ dh_shlibdeps -p $@ -L $(LIB_PKG) -l debian/$(LIB_PKG)/usr/lib dh_fixperms -p $@ dh_installdeb -p $@ - dh_gencontrol -p $@ + dh_gencontrol -p $@ dh_md5sums -p $@ dh_builddeb -p $@