Changeset 447 for trunk/debian/rules

Show
Ignore:
Timestamp:
05/18/10 16:02:07 (2 years ago)
Author:
mueller
Message:

Debian package build modified to use pysupport.

  • simplification of debian/rules
  • updated changelog
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/debian/rules

    r351 r447  
    11#!/usr/bin/make -f 
    22# -*- makefile -*- 
    3 # Sample debian/rules that uses debhelper. 
    4 # GNU copyright 1997 to 1999 by Joey Hess. 
    53 
    6 # Uncomment this to turn on verbose mode. 
    7 #export DH_VERBOSE=1 
     4DEB_PYTHON_SYSTEM := pysupport 
    85 
    9 PYTHON  := /usr/bin/python 
    10 PYVER   := $(shell $(PYTHON) -c 'import sys; print sys.version[:3]') 
     6include /usr/share/cdbs/1/rules/debhelper.mk 
     7include /usr/share/cdbs/1/class/python-distutils.mk 
    118 
    12 build: build-stamp 
    13  
    14 build-stamp: 
    15         dh_testdir 
    16         python setup.py build 
    17         touch build-stamp 
    18  
    19 clean: 
    20         dh_testdir 
    21         dh_testroot 
    22         rm -f build-stamp 
    23         rm -rf build 
    24         -find . -name '*.py[co]' | xargs rm -f 
     9clean:: 
     10        rm -rf build build-stamp configure-stamp build/ MANIFEST 
    2511        dh_clean 
    26  
    27 install: build 
    28         dh_testdir 
    29         dh_testroot 
    30         dh_clean -k  
    31         dh_installdirs 
    32         python setup.py install \ 
    33                 --root=$(CURDIR)/debian/python-neurotools 
    34  
    35 # Build architecture-independent files here. 
    36 binary-indep: build install 
    37         dh_testdir 
    38         dh_testroot 
    39         #dh_installchangelogs CHANGES.txt 
    40         dh_installdocs doc/ README AUTHORS LICENSE THANKS 
    41         dh_installexamples examples/ 
    42         dh_installman 
    43         : # Replace all '#!' calls to python with $(PYTHON) 
    44         : # and make them executable 
    45         for i in `find debian -mindepth 3 -type f`; do \ 
    46           sed '1s,#!.*python[^ ]*\(.*\),#! $(PYTHON)\1,' \ 
    47                 $$i > $$i.temp; \ 
    48           if cmp --quiet $$i $$i.temp; then \ 
    49             rm -f $$i.temp; \ 
    50           else \ 
    51             mv -f $$i.temp $$i; \ 
    52             chmod 755 $$i; \ 
    53             echo "fixed interpreter: $$i"; \ 
    54           fi; \ 
    55         done 
    56         : # and remove .svn directories 
    57         for i in `find debian -type d -name ".svn"`; do \ 
    58           echo "removing directory $$i"; \ 
    59           rm -rf $$i; \ 
    60         done 
    61         dh_pycentral 
    62         dh_compress -X.py 
    63         dh_fixperms 
    64         dh_installdeb 
    65         dh_gencontrol 
    66         dh_md5sums 
    67         dh_builddeb 
    68  
    69 # Build architecture-dependent files here. 
    70 binary-arch: build install 
    71 # We have nothing to do by default. 
    72  
    73 binary: binary-indep binary-arch 
    74 .PHONY: build clean binary-indep binary-arch binary install configure