2
# Sample debian/rules that uses debhelper.
3
# GNU copyright 1997 to 1999 by Joey Hess.
5
# Uncomment this to turn on verbose mode.
8
include /usr/share/dpatch/dpatch.make
10
#specify the changeable names here...
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
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
24
ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
25
# debug is found... debug version
26
CONFIGURE_OPTIONS+= --enable-debug=yes
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
33
COMPILER_FLAGS=CXX=g++ CC=gcc
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"
37
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
38
COMPILER_FLAGS+= CFLAGS="-O0 -D_REENTRANT" CXXFLAGS="-O0 -D_REENTRANT"
41
# RUBY related configs.
43
RUBY_FLAGS= ECA_S_RUBY_SITEDIR="/usr/lib/ruby/${RUBYVER}/"
45
configure: configure-stamp
46
configure-stamp: patch-stamp
52
automake-1.9 --add-missing
53
( ${COMPILER_FLAGS} ./configure ${CONFIGURE_OPTIONS} )
56
build: configure-stamp build-stamp
60
$(MAKE) -C Documentation docs
66
rm -f build-stamp configure-stamp
68
# Add here commands to clean up after the build process.
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
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
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}
93
rm -f `pwd`/debian/${ECASOUND}/usr/lib/ecasound-plugins/*.$$A \
94
`pwd`/debian/${ECASOUND}/usr/lib/python*/site-packages/*.$$A; done
96
#dh_movefiles is removed. Do the mving myself.
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; \
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; \
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
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
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/
118
# Build architecture-independent files here.
119
binary-indep: build install
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
134
# Build architecture-dependent files here.
135
binary-arch: build install
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
147
dh_installman -p$(LIBECASOUNDDEV) debian/libecasound-config.1
148
dh_installman -p$(LIBECASOUNDCDEV) debian/libecasoundc-config.1
150
dh_installchangelogs -a
162
binary: binary-indep binary-arch
163
.PHONY: build clean binary-indep binary-arch binary install