Changeset 1839

Show
Ignore:
Timestamp:
04/25/07 11:54:05
Author:
djcb
Message:

* moved to more readable rules file for maemo (consistent with other maemo packages)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/debian/rules.maemo

    r1525 r1839  
    11#!/usr/bin/make -f 
     2# -*- makefile -*- 
     3# Sample debian/rules that uses debhelper. 
     4# GNU copyright 1997 to 1999 by Joey Hess. 
    25 
    3 include /usr/share/cdbs/1/rules/debhelper.mk 
    4 include /usr/share/cdbs/1/class/autotools.mk 
     6# Uncomment this to turn on verbose mode. 
     7#export DH_VERBOSE=1 
    58 
    6 DEB_CONFIGURE_EXTRA_FLAGS := --with-platform=maemo 
    79 
    8 make-orig-source: TMPNAME:=$(shell mktemp -d) 
    9 make-orig-source: DATE:=$(shell date --iso) 
    10 make-orig-source: UPSTREAMVER:=0~svn-$(DATE) 
    11 make-orig-source: 
    12         -make -f debian/rules make-orig-source-internal TMPNAME=$(TMPNAME) DATE=$(DATE) UPSTREAMVER=$(UPSTREAMVER) 
    13         -rm -rf $(TMPNAME) 
    14         rm $(CURDIR)/debian/make-orig-source-internal-temp.stamp \ 
    15           || (echo "Making the Debian source package failed, see above" ; \ 
    16               false) 
     10# These are used for cross-compiling and for saving the configure script 
     11# from having to guess our platform (since we know it already) 
     12DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) 
     13DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) 
    1714 
    18 make-orig-source-internal: 
    19         echo -e "Source: tinymail\nBuild-Depends: subversion, autoconf, automake1.9, autotools-dev, libtool, gtk-doc-tools (>= 1.0), libglib2.0-dev (>= 2.6), gnome-common, devscripts, fakeroot\n\nPackage: tinymail\n" | dpkg-checkbuilddeps - 
    20         svn export . $(TMPNAME)/tinymail-$(UPSTREAMVER) 
    21         cd $(TMPNAME)/tinymail-$(UPSTREAMVER) && NOCONFIGURE=1 ./autogen.sh 
    22         cd $(TMPNAME) && tar czf tinymail_$(UPSTREAMVER).orig.tar.gz --exclude tinymail-$(UPSTREAMVER)/debian tinymail-$(UPSTREAMVER) 
    23         cd $(TMPNAME)/tinymail-$(UPSTREAMVER) && dch -bv $(UPSTREAMVER)-1 "Exported from SVN on $(DATE)" 
    24         cd $(TMPNAME)/tinymail-$(UPSTREAMVER) && dpkg-buildpackage -rfakeroot -S -uc -us && \ 
    25         cd $(TMPNAME) && mv *.diff.gz *.dsc *.orig.tar.gz $(CURDIR)/ 
    26         touch $(CURDIR)/debian/make-orig-source-internal-temp.stamp 
    2715 
    28 .PHONY: make-orig-source make-orig-source-internal 
     16CFLAGS = -Wall -Wno-format -g 
     17 
     18ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) 
     19        CFLAGS += -O0 
     20else 
     21        CFLAGS += -O2 
     22endif 
     23ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) 
     24        INSTALL_PROGRAM += -s 
     25endif 
     26ifneq (,$(findstring thumb,$(DEB_BUILD_OPTIONS))) 
     27        CFLAGS += -mthumb 
     28endif 
     29 
     30config.status: 
     31        if [ ! -x configure ]; then ./autogen.sh; fi 
     32        dh_testdir 
     33        # Add here commands to configure the package. 
     34        CFLAGS="$(CFLAGS)" ./configure --with-platform=maemo --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --sysconfdir=/etc --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info 
     35 
     36 
     37build: build-stamp 
     38 
     39build-stamp:  config.status 
     40        dh_testdir 
     41 
     42        # Add here commands to compile the package. 
     43        $(MAKE) 
     44 
     45        touch build-stamp 
     46 
     47clean: 
     48        dh_testdir 
     49        dh_testroot 
     50        rm -f build-stamp  
     51 
     52        # Add here commands to clean up after the build process. 
     53        -$(MAKE) distclean 
     54ifneq "$(wildcard /usr/share/misc/config.sub)" "" 
     55        cp -f /usr/share/misc/config.sub config.sub 
     56endif 
     57ifneq "$(wildcard /usr/share/misc/config.guess)" "" 
     58        cp -f /usr/share/misc/config.guess config.guess 
     59endif 
     60 
     61 
     62        dh_clean  
     63 
     64install: build 
     65        dh_testdir 
     66        dh_testroot 
     67        dh_clean -k  
     68        dh_installdirs 
     69 
     70        # Add here commands to install the package into debian/tinymail 
     71        $(MAKE) install DESTDIR=$(CURDIR)/debian/tinymail 
     72 
     73 
     74# Build architecture-independent files here. 
     75binary-indep: build install 
     76# We have nothing to do by default. 
     77 
     78# Build architecture-dependent files here. 
     79binary-arch: build install 
     80        dh_testdir 
     81        dh_testroot 
     82#       dh_installchangelogs ChangeLog 
     83#       dh_installdocs 
     84#       dh_installexamples 
     85#       dh_install 
     86#       dh_installmenu 
     87#       dh_installdebconf        
     88#       dh_installlogrotate 
     89#       dh_installemacsen 
     90#       dh_installpam 
     91#       dh_installmime 
     92#       dh_installinit 
     93#       dh_installcron 
     94#       dh_installinfo 
     95#       dh_installman 
     96        dh_link 
     97        dh_strip 
     98        dh_compress 
     99        dh_fixperms 
     100#       dh_perl 
     101#       dh_python 
     102#       dh_makeshlibs 
     103        dh_installdeb 
     104        dh_shlibdeps 
     105        dh_gencontrol 
     106        dh_md5sums 
     107        dh_builddeb 
     108 
     109binary: binary-indep binary-arch 
     110.PHONY: build clean binary-indep binary-arch binary install