PageRenderTime 24ms CodeModel.GetById 2ms app.highlight 18ms RepoModel.GetById 2ms app.codeStats 0ms

/debian/rules

http://scim-python.googlecode.com/
Makefile | 106 lines | 73 code | 12 blank | 21 comment | 1 complexity | c93cd7e79ac4274685d8992194b5513f MD5 | raw file
  1#!/usr/bin/make -f
  2# -*- makefile -*-
  3
  4# Uncomment this to turn on verbose mode.
  5#export DH_VERBOSE=1
  6
  7
  8# These are used for cross-compiling and for saving the configure script
  9# from having to guess our platform (since we know it already)
 10DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
 11DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 12
 13#DEB_MAKE_INSTALL_TARGET := install debroot=$(CURDIR)/debian/tmp prefix=$(CURDIR)/debian/tmp/usr
 14
 15# Get supported python version and destdir
 16PYVERS  = $(shell pyversions -rv)
 17
 18clean:
 19	dh_testdir
 20	dh_testroot
 21	rm -f *-stamp
 22	[ ! -f Makefile ] || $(MAKE) distclean
 23	rm -f config.sub config.guess
 24	dh_clean
 25
 26config-common: 
 27	dh_testdir
 28	# Add here commands to configure the package.
 29ifneq "$(wildcard /usr/share/misc/config.sub)" ""
 30	cp -f /usr/share/misc/config.sub config.sub
 31endif
 32ifneq "$(wildcard /usr/share/misc/config.guess)" ""
 33	cp -f /usr/share/misc/config.guess config.guess
 34endif
 35config-ext-%: config-common configure
 36	dh_testdir
 37	env PYTHON=python$* ./configure \
 38		--disable-static \
 39		--enable-debian-dpkg \
 40		--enable-english-writer=force \
 41		--enable-pinyin \
 42		--host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \
 43		--prefix=/usr \
 44		CFLAGS="$(CFLAGS)" LDFLAGS="-Wl,-z,defs"
 45	#mv -f config.status $@	
 46	touch $@
 47
 48build: build-stamp
 49build-stamp: $(PYVERS:%=build-ext-%)
 50build-ext-%: config-ext-%
 51	dh_testdir
 52	# Add here commands to compile the package.
 53	$(MAKE)
 54	touch $@
 55
 56install: build
 57	dh_testdir
 58	dh_testroot
 59	dh_clean -k 
 60	dh_installdirs
 61	# Add here commands to install the package into debian/python-scim.
 62	$(MAKE) DESTDIR=$(CURDIR)/debian/tmp NO_INDEX=true install
 63	dh_install --sourcedir=debian/tmp --fail-missing
 64
 65# Build architecture-independent files here.
 66binary-indep: build install
 67	dh_testdir -i
 68	dh_testroot -i
 69	dh_installchangelogs -i ChangeLog
 70	dh_installdocs -i
 71	dh_pycentral -i
 72#	dh_python
 73#	dh_installman
 74	dh_link -i
 75	dh_compress -i -X.py
 76	dh_fixperms -i
 77	dh_installdeb -i
 78	dh_shlibdeps -i
 79	dh_gencontrol -i
 80	dh_md5sums -i
 81	dh_builddeb -i
 82
 83# Build architecture-dependent files here.
 84binary-arch: build install
 85	dh_testdir -a
 86	dh_testroot -a
 87	dh_installchangelogs -a ChangeLog
 88	dh_installdocs -a
 89	dh_pycentral
 90#	dh_pycentral -pscim-python-chinese
 91#	dh_pycentral -pscim-python-english
 92#	dh_python
 93#	dh_installman
 94	dh_link -a
 95	dh_strip -ppython-scim
 96	dh_compress -a -X.py
 97	dh_fixperms -a
 98#	dh_makeshlibs
 99	dh_installdeb -a
100	dh_shlibdeps -a
101	dh_gencontrol -a
102	dh_md5sums -a
103	dh_builddeb -a
104
105binary: binary-indep binary-arch
106.PHONY: build clean binary-indep binary-arch binary install