Ruby binding
[lms] / packages / ruby-lightmediascanner / debian / rules
1 #!/usr/bin/make -f
2
3 #PYVER=2.5
4 #PYTHON=python$(PYVER)
5 #
6 #p_base=$(PYTHON)-lightmediascanner
7 #d_base=debian/$(p_base)
8 #
9 DEB_BUILD_ARCH  ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH)
10
11 ifneq (,$(findstring armel,$(DEB_BUILD_ARCH)))
12     CFLAGS += -DNDEBUG=1 -fomit-frame-pointer -O2 -ffast-math -funsafe-math-optimizations -fno-math-errno -fsingle-precision-constant
13     ifneq (,$(findstring n8x0,$(DEB_BUILD_OPTIONS)))
14         CFLAGS += -mfpu=vfp -mfloat-abi=softfp -mcpu=arm1136jf-s
15     endif
16     ifneq (,$(findstring n770,$(DEB_BUILD_OPTIONS)))
17          CFLAGS += -mcpu=arm926ej-s
18     endif
19 endif
20
21 configure: configure-stamp
22 configure-stamp:
23         ./extconf.rb
24
25 build: configure build-stamp
26 build-stamp:
27         dh_testdir
28         CFLAGS="$(CFLAGS)" $(MAKE)
29         touch build-stamp
30 clean:
31         dh_testdir
32         dh_testroot
33         if test -f Makefile ; then $(MAKE) clean; rm Makefile; fi
34         -rm -f build-stamp
35         -rm -rf build dist
36         dh_clean
37
38 install: build
39         dh_testdir
40         dh_testroot
41         dh_installdirs
42         $(MAKE) install DESTDIR=$(CURDIR)/debian/ruby1.8-lightmediascanner
43
44         #$(PYTHON) setup.py install --root=$(d_base)
45
46 binary: binary-indep binary-arch
47 binary-indep: install
48 binary-arch: install
49         dh_testdir
50         dh_testroot
51         dh_strip
52         dh_fixperms
53         dh_makeshlibs
54         dh_installdeb
55         dh_shlibdeps
56         dh_gencontrol
57         dh_md5sums
58         dh_builddeb
59
60 .PHONY: build install clean binary binary-indep binary-arch