| 1 | #!/usr/bin/make -f |
|---|
| 2 | # -*- makefile -*- |
|---|
| 3 | # Sample debian/rules that uses debhelper. |
|---|
| 4 | # This file was originally written by Joey Hess and Craig Small. |
|---|
| 5 | # As a special exception, when this file is copied by dh-make into a |
|---|
| 6 | # dh-make output file, you may use that output file without restriction. |
|---|
| 7 | # This special exception was added by Craig Small in version 0.37 of dh-make. |
|---|
| 8 | |
|---|
| 9 | # Uncomment this to turn on verbose mode. |
|---|
| 10 | #export DH_VERBOSE=1 |
|---|
| 11 | |
|---|
| 12 | include /usr/share/quilt/quilt.make |
|---|
| 13 | |
|---|
| 14 | export GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 |
|---|
| 15 | |
|---|
| 16 | PACKAGE = compiz |
|---|
| 17 | |
|---|
| 18 | CFLAGS = -Wall -g |
|---|
| 19 | ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) |
|---|
| 20 | CFLAGS += -O0 |
|---|
| 21 | else |
|---|
| 22 | CFLAGS += -O2 |
|---|
| 23 | endif |
|---|
| 24 | ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) |
|---|
| 25 | INSTALL_PROGRAM += -s |
|---|
| 26 | endif |
|---|
| 27 | |
|---|
| 28 | DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH) |
|---|
| 29 | DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) |
|---|
| 30 | DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) |
|---|
| 31 | ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE)) |
|---|
| 32 | confflags += --build=$(DEB_HOST_GNU_TYPE) |
|---|
| 33 | else |
|---|
| 34 | confflags += --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE) |
|---|
| 35 | endif |
|---|
| 36 | |
|---|
| 37 | INSTALL = /usr/bin/install |
|---|
| 38 | |
|---|
| 39 | PLUGINS = gconf,png,svg,decoration,wobbly,fade,minimize,cube,rotate,zoom,scale,move,resize,place,dbus,switcher,screenshot |
|---|
| 40 | |
|---|
| 41 | confflags += --disable-static \ |
|---|
| 42 | --enable-librsvg \ |
|---|
| 43 | --disable-kde \ |
|---|
| 44 | --enable-gconf-dump \ |
|---|
| 45 | --with-default-plugins="$(PLUGINS)" |
|---|
| 46 | |
|---|
| 47 | build: patch build-stamp |
|---|
| 48 | build-stamp: |
|---|
| 49 | dh_testdir |
|---|
| 50 | |
|---|
| 51 | mkdir obj-$(DEB_BUILD_GNU_TYPE) |
|---|
| 52 | cd obj-$(DEB_BUILD_GNU_TYPE) && \ |
|---|
| 53 | ../configure --prefix=/usr --sysconfdir=\$${prefix}/share $(confflags) \ |
|---|
| 54 | CFLAGS="$(CFLAGS)" |
|---|
| 55 | cd obj-$(DEB_BUILD_GNU_TYPE) && $(MAKE) |
|---|
| 56 | |
|---|
| 57 | touch $@ |
|---|
| 58 | |
|---|
| 59 | prune: |
|---|
| 60 | rm -f autogen.sh |
|---|
| 61 | find -name .cvsignore | xargs rm -f |
|---|
| 62 | rm -f po/*.gmo |
|---|
| 63 | |
|---|
| 64 | clean: prune unpatch |
|---|
| 65 | dh_testdir |
|---|
| 66 | dh_testroot |
|---|
| 67 | rm -f build-stamp |
|---|
| 68 | |
|---|
| 69 | rm -f config.cache config.log config.status |
|---|
| 70 | rm -f */config.cache */config.log */config.status |
|---|
| 71 | rm -f conftest* */conftest* |
|---|
| 72 | rm -rf autom4te.cache */autom4te.cache |
|---|
| 73 | rm -rf obj-* |
|---|
| 74 | |
|---|
| 75 | dh_clean |
|---|
| 76 | |
|---|
| 77 | install: build |
|---|
| 78 | dh_testdir |
|---|
| 79 | dh_testroot |
|---|
| 80 | dh_clean -k |
|---|
| 81 | dh_installdirs |
|---|
| 82 | |
|---|
| 83 | # the upstream build system needs this |
|---|
| 84 | ln -sf config/mkinstalldirs |
|---|
| 85 | cd obj-$(DEB_BUILD_GNU_TYPE) && $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install |
|---|
| 86 | rm mkinstalldirs |
|---|
| 87 | |
|---|
| 88 | mv $(CURDIR)/debian/tmp/usr/bin/compiz $(CURDIR)/debian/tmp/usr/bin/compiz.real |
|---|
| 89 | $(INSTALL) --mode 0755 debian/compiz.wrapper $(CURDIR)/debian/tmp/usr/bin/compiz |
|---|
| 90 | |
|---|
| 91 | # remove unneeded .la files |
|---|
| 92 | find $(CURDIR)/debian/tmp/usr/lib -type f -name '*.la' | xargs rm -f |
|---|
| 93 | |
|---|
| 94 | # Build architecture-dependent files here. |
|---|
| 95 | binary-arch: build install |
|---|
| 96 | dh_testdir |
|---|
| 97 | dh_testroot |
|---|
| 98 | |
|---|
| 99 | dh_installdocs |
|---|
| 100 | dh_installchangelogs ChangeLog |
|---|
| 101 | dh_install --sourcedir=debian/tmp --list-missing |
|---|
| 102 | dh_installman |
|---|
| 103 | dh_link |
|---|
| 104 | dh_gconf |
|---|
| 105 | dh_strip |
|---|
| 106 | dh_compress |
|---|
| 107 | dh_fixperms |
|---|
| 108 | dh_makeshlibs |
|---|
| 109 | dh_shlibdeps -L libdecoration0 -l debian/libdecoration0/usr/lib |
|---|
| 110 | dh_installdeb |
|---|
| 111 | dh_gencontrol |
|---|
| 112 | dh_md5sums |
|---|
| 113 | dh_builddeb |
|---|
| 114 | |
|---|
| 115 | # Build architecture-independent files here. |
|---|
| 116 | binary-indep: build install |
|---|
| 117 | # Nothing to do |
|---|
| 118 | |
|---|
| 119 | binary: binary-indep binary-arch |
|---|
| 120 | .PHONY: build clean binary-indep binary-arch binary install |
|---|
| 121 | |
|---|