Source: python-lightmediascanner
Priority: optional
Maintainer: Gustavo Sverzut Barbieri <gustavo.barbieri@openbossa.org>
-Build-Depends: debhelper, cdbs, liblightmediascanner0-dev (>= 0.1.10-maemo2), python-setuptools (>= 0.6c3) | python2.5-setuptools (>= 0.6c3), python2.5-dev (>= 2.5.1-1osso6), python2.5-pyrex, python2.5-cython-dev
+Build-Depends: debhelper, cdbs, liblightmediascanner0-dev (>= 0.1.10-maemo3), python-setuptools (>= 0.6c3) | python2.5-setuptools (>= 0.6c3), python2.5-dev (>= 2.5.1-1osso6), python2.5-pyrex, python2.5-cython-dev, libsqlite3-dev
Standards-Version: 3.6.1
Package: python2.5-lightmediascanner
Section: python
Priority: optional
Architecture: any
-Depends: ${shlibs:Depends}, python2.5 (>= 2.5.1-1osso6), liblightmediascanner0 (>= 0.1.10-maemo2)
+Depends: ${shlibs:Depends}, python2.5 (>= 2.5.1-1osso6), liblightmediascanner0 (>= 0.1.10-maemo3)
Description: Lightweight library to scan media.
Light Media Scanner scans media, parsing and storing data in
a SQLite3 database. Provides safe execution by executing the
#!/usr/bin/make -f
+DEB_DESTDIR=$(CURDIR)/debian/tmp
+
PYVER=2.5
PYTHON=python$(PYVER)
-p_base=$(PYTHON)-lightmediascanner
-d_base=debian/$(p_base)
-
-DEB_BUILD_ARCH ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH)
+DEB_BUILD_ARCH?=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
-ifneq (,$(findstring armel,$(DEB_BUILD_ARCH)))
- CFLAGS += -DNDEBUG=1 -fomit-frame-pointer -O2 -ffast-math -funsafe-math-optimizations -fno-math-errno -fsingle-precision-constant
- ifneq (,$(findstring n8x0,$(DEB_BUILD_OPTIONS)))
- CFLAGS += -mfpu=vfp -mfloat-abi=softfp -mcpu=arm1136jf-s
- endif
- ifneq (,$(findstring n770,$(DEB_BUILD_OPTIONS)))
- CFLAGS += -mcpu=arm926ej-s
+ifeq ($(DEB_BUILD_ARCH),armel)
+ COMMON_CFLAGS=-DNDEBUG=1 -fomit-frame-pointer -O2 -ffast-math -funsafe-math-optimizations -fno-math-errno -fsingle-precision-constant
+ N770_CFLAGS=-mcpu=arm926ej-s
+ N8x0_CFLAGS=-mfpu=vfp -mfloat-abi=softfp -mcpu=arm1136jf-s
+ ifneq ($(DEB_BUILD_OPTIONS),)
+ ifneq (,$(findstring n8x0,$(DEB_BUILD_OPTIONS)))
+ SPECIFIC_CFLAGS=$(N8x0_CFLAGS)
+ else
+ ifneq (,$(findstring n770,$(DEB_BUILD_OPTIONS)))
+ SPECIFIC_CFLAGS=$(N770_CFLAGS)
+ endif
+ endif
+ endif
+ ifeq ($(SPECIFIC_CFLAGS),)
+ ifeq (0,$(shell test -e /etc/osso_software_version; echo $$?))
+ SW_VERSION?=$(shell cat /etc/osso_software_version|cut -d_ -f2)
+ ifneq (,$(findstring $(SW_VERSION),OSSO1.1 2008SE DIABLO))
+ SPECIFIC_CFLAGS=$(N8x0_CFLAGS)
+ endif
+ endif
+ ifeq ($(SPECIFIC_CFLAGS),)
+ # Our last hope is to look at the value returned by `sb-conf current`
+ SB_CURRENT?=$(shell sb-conf current|cut -d_ -f1)
+ ifneq (,$(findstring $(SB_CURRENT),GREGALE BORA CHINOOK DIABLO))
+ ifeq ($(SB_CURRENT),GREGALE)
+ SPECIFIC_CFLAGS=$(N770_CFLAGS)
+ else
+ SPECIFIC_CFLAGS=$(N8x0_CFLAGS)
+ endif
+ else
+ COMMON_CFLAGS=
+ endif
+ endif
endif
endif
+CFLAGS+=$(COMMON_CFLAGS) $(SPECIFIC_CFLAGS)
+
build: build-stamp
build-stamp:
dh_testdir
touch lightmediascanner/lightmediascanner.*.pyx
- CFLAGS="$(CFLAGS)" $(PYTHON) setup.py build_ext build install --prefix /usr install_headers
+ CFLAGS="$(CFLAGS)" $(PYTHON) setup.py build_ext build
touch build-stamp
clean:
dh_testdir
dh_testroot
- $(PYTHON) setup.py clean
+ CFLAGS="$(CFLAGS)" $(PYTHON) setup.py clean
-rm -f build-stamp
-rm -rf build dist python_lightmediascanner.egg-info
-rm -f lightmediascanner/*.py[co]
dh_testdir
dh_testroot
dh_installdirs
- $(PYTHON) setup.py install --root=$(d_base)
+ CFLAGS="$(CFLAGS)" $(PYTHON) setup.py install --root=$(DEB_DESTDIR)
if [ "x$(DEB_BUILD_ARCH)" = "xarmel" ]; then \
- rm -rf $(d_base)/usr/lib/$(PYTHON)/site-packages/etk/*.py; \
- rm -rf $(d_base)/usr/lib/$(PYTHON)/site-packages/etk/*.pyc; \
+ rm -rf $(DEB_DESTDIR)/usr/lib/$(PYTHON)/site-packages/ligthmediascanner/*.py; \
+ rm -rf $(DEB_DESTDIR)/usr/lib/$(PYTHON)/site-packages/ligthmediascanner/*.pyc; \
fi
+ dh_install --sourcedir=$(DEB_DESTDIR) --fail-missing
-
-binary: binary-indep binary-arch
-binary-indep: install
-binary-arch: install
+binary: binary-arch
+binary-arch: build install
dh_testdir
dh_testroot
+ dh_installdocs
+ dh_installdebconf
+ dh_installchangelogs
dh_strip
+ dh_compress
dh_fixperms
dh_makeshlibs
dh_installdeb
dh_md5sums
dh_builddeb
-.PHONY: build install clean binary binary-indep binary-arch
+.PHONY: build install clean binary binary-arch