#!/usr/bin/make -f include /usr/share/cdbs/1/rules/debhelper.mk package = macosx-intel64-cctools package32 = macosx-intel32-cctools target = x86_64-apple-darwin10 target32 = i686-apple-darwin10 prefix = /usr/$(target) prefix32 = /usr/$(target32) docdir = debian/$(package)/usr/share/doc/$(package) builddir = build builddir32 = build32 DESTDIR = $(shell /bin/pwd)/debian/$(package) DESTDIR32 = $(shell /bin/pwd)/debian/$(package32) DEB_INSTALL_DOCS_ALL := DEB_SHLIBDEPS_INCLUDE := DEB_DH_ALWAYS_EXCLUDE := .svn # do not strip anything. # call 'strip' on a mingw lib*.a file causes the ranlib information to # be discarded rendering the libraries useless. DEB_DH_STRIP_ARGS := -Xlib INSTALL_PROGRAM = install common-build-indep:: rm -rf debian/$(package) mkdir debian/$(package) rm -rf $(builddir) mkdir $(builddir) cd $(builddir) && CFLAGS="-m32" LDFLAGS="-m32" ../src/configure --prefix=$(prefix)/usr --target=$(target) --with-sysroot=$(prefix) cd $(builddir) && make rm -rf debian/$(package32) mkdir debian/$(package32) rm -rf $(builddir32) mkdir $(builddir32) cd $(builddir32) && CFLAGS="-m32" LDFLAGS="-m32" ../src/configure --prefix=$(prefix32)/usr --target=$(target32) --with-sysroot=$(prefix32) cd $(builddir32) && make clean:: rm -f compile common-install-indep common-build-indep rm -rf *~ debian/$(package) debian/$(package32) debian/*~ debian/files* debian/substvars debian/compat rm -rf $(builddir) $(builddir32) # # info pages, locale data and static libraries may conflict with # already installed binutils packages. # common-install-indep:: rm -rf debian/$(package) mkdir debian/$(package) cd $(builddir) && make DESTDIR=$(DESTDIR) install cd $(builddir32) && make DESTDIR=$(DESTDIR32) install cd $(DESTDIR) && mkdir usr/bin cd $(DESTDIR) && for file in $$(ls usr/$(target)/usr/bin); do (cd usr/bin && ln -s ../$(target)/usr/bin/$$file); done cd $(DESTDIR32) && mkdir usr/bin cd $(DESTDIR32) && for file in $$(ls usr/$(target32)/usr/bin); do (cd usr/bin && ln -s ../$(target32)/usr/bin/$$file); done touch common-install-indep