~ubuntu-branches/ubuntu/jaunty/ecasound2.2/jaunty

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Bazaar Package Importer
  • Author(s): Junichi Uekawa
  • Date: 2005-04-14 09:15:48 UTC
  • Revision ID: james.westby@ubuntu.com-20050414091548-vwu2de2157xq1hcm
Tags: 2.4.1-1
* New upstream version
- 01_ecasoundrc-location-fix: included in upstream
- 07_configure_in_maintainer_mode: updated
* removed refererence to artsc-dev
* [debian/control, debian/rules] Use automake1.9
* documentation is now in rst
- add Build-Depends: python-docutils
* debian/menu: quote
* debian/watch: add

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/make -f
 
2
# Sample debian/rules that uses debhelper.
 
3
# GNU copyright 1997 to 1999 by Joey Hess.
 
4
 
 
5
# Uncomment this to turn on verbose mode.
 
6
#export DH_VERBOSE=1
 
7
 
 
8
include /usr/share/dpatch/dpatch.make
 
9
 
 
10
#specify the changeable names here...
 
11
 
 
12
LIBECASOUND=libecasound7
 
13
LIBECASOUNDDEV=libecasound2.2-dev
 
14
LIBKVUTILS=libkvutils2
 
15
LIBKVUTILSDEV=libkvutils2.2-dev
 
16
LIBECASOUNDC=libecasoundc0
 
17
LIBECASOUNDCDEV=libecasoundc2.2-dev
 
18
PYTHONECASOUND=python-ecasound2.2
 
19
RUBYECASOUND=libecasound-ruby1.8
 
20
ECASOUND=ecasound
 
21
 
 
22
CONFIGURE_OPTIONS=--prefix=/usr --mandir=/usr/share/man --enable-pyecasound=python --enable-python-force-site-packages --enable-sys-readline --with-largefile --datadir=/usr/share/ecasound2.2 --disable-shared --disable-arts
 
23
 
 
24
ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
 
25
# debug is found... debug version
 
26
CONFIGURE_OPTIONS+= --enable-debug=yes
 
27
else
 
28
# debug is not found, do not need to do anything really.
 
29
#CONFIGURE_OPTIONS+=--enable-debug=no # there was a bug in configure.in
 
30
endif
 
31
 
 
32
 
 
33
COMPILER_FLAGS=CXX=g++ CC=gcc
 
34
 
 
35
COMPILER_FLAGS+= CFLAGS="-g -O2 -D_REENTRANT -DNDEBUG -ffast-math -fstrict-aliasing -funroll-loops" CXXFLAGS="-g -O2 -D_REENTRANT -DNDEBUG -ffast-math -fstrict-aliasing -funroll-loops"
 
36
 
 
37
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
 
38
  COMPILER_FLAGS+= CFLAGS="-O0 -D_REENTRANT" CXXFLAGS="-O0 -D_REENTRANT"
 
39
endif
 
40
 
 
41
#  RUBY related configs.
 
42
RUBYVER=1.8
 
43
RUBY_FLAGS= ECA_S_RUBY_SITEDIR="/usr/lib/ruby/${RUBYVER}/"
 
44
 
 
45
configure: configure-stamp
 
46
configure-stamp: patch-stamp
 
47
        dh_testdir
 
48
        libtoolize --force
 
49
        aclocal-1.9
 
50
        autoheader
 
51
        autoconf
 
52
        automake-1.9 --add-missing
 
53
        ( ${COMPILER_FLAGS} ./configure ${CONFIGURE_OPTIONS} )
 
54
        touch configure-stamp
 
55
 
 
56
build: configure-stamp build-stamp
 
57
build-stamp:
 
58
        dh_testdir
 
59
        $(MAKE)
 
60
        $(MAKE) -C Documentation docs 
 
61
        touch build-stamp
 
62
 
 
63
clean: unpatch
 
64
        dh_testdir
 
65
        dh_testroot
 
66
        rm -f build-stamp configure-stamp 
 
67
 
 
68
        # Add here commands to clean up after the build process.
 
69
        -$(MAKE) clean
 
70
        -$(MAKE) -C Documentation clean
 
71
        -$(MAKE) -C Documentation clean-docs
 
72
        -$(MAKE) -C Documentation/programmers_guide clean-docs
 
73
        -$(MAKE) -C Documentation/users_guide clean-docs
 
74
        -$(MAKE) -C Documentation distclean
 
75
        -$(MAKE) distclean
 
76
        -rm depcomp
 
77
        -rm -f aclocal.m4 configure stamp-h.in config.guess config.sub ltmain.sh readline-4.0/config.log readline-4.0/config.status Makefile
 
78
        -for a in . Documentation/users_guide Documentation/programmers_guide Documentation contrib ecasound ecatools examples kvutils libecasound libecasound/plugins libecasoundc pyecasound ; do rm -f $$a/Makefile.in; done 
 
79
        -rm -f Documentation/users_guide/users_guide.dvi Documentation/users_guide/ecasound_users_guide.pdf Documentation/programmers_guide/programmers_guide.dvi Documentation/programmers_guide/ecasound_programmers_guide.pdf Documentation/programmers_guide/eci_doc.dvi Documentation/programmers_guide/ecasound_eci_doc.pdf
 
80
 
 
81
        dh_clean
 
82
 
 
83
install: build
 
84
        dh_testdir
 
85
        dh_testroot
 
86
        dh_clean -k
 
87
        dh_installdirs 
 
88
 
 
89
        # Add here commands to install the package into debian/tmp.
 
90
        # $(MAKE) install prefix=`pwd`/debian/tmp/usr 
 
91
        $(MAKE) install DESTDIR=`pwd`/debian/${ECASOUND} ${RUBY_FLAGS}
 
92
        for A in a la ; do \
 
93
        rm -f `pwd`/debian/${ECASOUND}/usr/lib/ecasound-plugins/*.$$A \
 
94
         `pwd`/debian/${ECASOUND}/usr/lib/python*/site-packages/*.$$A; done
 
95
 
 
96
        #dh_movefiles is removed. Do the mving myself.
 
97
        # libecasound-dev
 
98
        for FILES in usr/bin/libecasound-config \
 
99
                usr/lib/libecasound.a usr/lib/libecasound.la usr/include/libecasound; do \
 
100
                mv $(CURDIR)/debian/${ECASOUND}/$$FILES $(CURDIR)/debian/$(LIBECASOUNDDEV)/$$FILES; \
 
101
        done
 
102
        # libkvutils-dev
 
103
        for FILES in usr/lib/libkvutils.a usr/lib/libkvutils.la usr/include/kvutils ; do \
 
104
                mv $(CURDIR)/debian/${ECASOUND}/$$FILES $(CURDIR)/debian/$(LIBKVUTILSDEV)/$$FILES; \
 
105
        done
 
106
        # python
 
107
        mv $(CURDIR)/debian/${ECASOUND}/usr/lib/python* $(CURDIR)/debian/$(PYTHONECASOUND)/usr/lib/
 
108
        chmod 644 $(CURDIR)/debian/$(PYTHONECASOUND)/usr/lib/python2.3/site-packages/pyeca.py
 
109
        # ruby
 
110
        mv $(CURDIR)/debian/${ECASOUND}/usr/lib/ruby/1.8/ecasound.rb $(CURDIR)/debian/$(RUBYECASOUND)/usr/lib/ruby/1.8/
 
111
        chmod 644 $(CURDIR)/debian/$(RUBYECASOUND)/usr/lib/ruby/1.8/ecasound.rb
 
112
        # libecasoundc-dev
 
113
        mv $(CURDIR)/debian/${ECASOUND}/usr/lib/libecasoundc.a $(CURDIR)/debian/$(LIBECASOUNDCDEV)/usr/lib
 
114
        mv $(CURDIR)/debian/${ECASOUND}/usr/lib/libecasoundc.la $(CURDIR)/debian/$(LIBECASOUNDCDEV)/usr/lib
 
115
        mv $(CURDIR)/debian/${ECASOUND}/usr/bin/libecasoundc-config $(CURDIR)/debian/$(LIBECASOUNDCDEV)/usr/bin
 
116
        mv $(CURDIR)/debian/${ECASOUND}/usr/include/libecasoundc/ $(CURDIR)/debian/$(LIBECASOUNDCDEV)/usr/include/
 
117
 
 
118
# Build architecture-independent files here.
 
119
binary-indep: build install
 
120
        dh_testdir -i
 
121
        dh_testroot -i
 
122
        dh_installdocs -i
 
123
        dh_installdirs -i
 
124
        install -m644 -o root -g root ecatools/ecasound.el debian/ecasound-el/usr/share/emacs/site-lisp/ecasound-el/ecasound.el
 
125
        dh_installemacsen -p ecasound-el --priority=60 
 
126
        dh_installchangelogs  -i
 
127
        dh_compress -i
 
128
        dh_fixperms -i
 
129
        dh_installdeb -i
 
130
        dh_gencontrol -i
 
131
        dh_md5sums -i
 
132
        dh_builddeb -i
 
133
 
 
134
# Build architecture-dependent files here.
 
135
binary-arch: build install
 
136
        dh_testdir -a
 
137
        dh_testroot -a
 
138
        dh_installdocs -a
 
139
        sed 's/\.pdf\"/\.pdf.gz\"/' < Documentation/index.html \
 
140
          > debian/${ECASOUND}/usr/share/doc/${ECASOUND}/index.html
 
141
        cp -a Documentation/users_guide debian/${ECASOUND}/usr/share/doc/${ECASOUND}/
 
142
        cp -a Documentation/programmers_guide debian/${ECASOUND}/usr/share/doc/${ECASOUND}/
 
143
        dh_installexamples -a
 
144
        dh_installmenu -a
 
145
        dh_installcron -a
 
146
        dh_installman -a 
 
147
        dh_installman -p$(LIBECASOUNDDEV) debian/libecasound-config.1
 
148
        dh_installman -p$(LIBECASOUNDCDEV) debian/libecasoundc-config.1
 
149
        dh_installinfo -a
 
150
        dh_installchangelogs  -a
 
151
        dh_link -a
 
152
        dh_python -a 
 
153
        dh_strip -a
 
154
        dh_shlibdeps -a
 
155
        dh_compress -a
 
156
        dh_fixperms -a
 
157
        dh_gencontrol -a
 
158
        dh_installdeb -a
 
159
        dh_md5sums -a
 
160
        dh_builddeb -a
 
161
 
 
162
binary: binary-indep binary-arch
 
163
.PHONY: build clean binary-indep binary-arch binary install