Thomas Jarosch | 06023f3 | 2011-02-08 22:09:36 +0000 | [diff] [blame^] | 1 | #!/usr/bin/make -f |
| 2 | |
| 3 | CONFIGURE_OPTIONS := --platform=M --lcdwidth=800 --lcdheight=480 --target=application --ram=8 --rbdir=/.rockbox --type=N |
| 4 | DESKTOP_DIR := `pkg-config --variable=desktopentrydir osso-af-settings` |
| 5 | |
| 6 | export DH_VERBOSE=1 |
| 7 | |
| 8 | builddir: |
| 9 | test -d builddir || mkdir -p builddir |
| 10 | |
| 11 | builddir/Makefile: builddir |
| 12 | cd builddir && test -f Makefile || ../tools/configure $(CONFIGURE_OPTIONS) |
| 13 | |
| 14 | build: build-stamp |
| 15 | |
| 16 | build-stamp: builddir/Makefile |
| 17 | dh_testdir |
| 18 | cd builddir && $(MAKE) |
| 19 | touch $@ |
| 20 | |
| 21 | clean: |
| 22 | dh_testdir |
| 23 | dh_testroot |
| 24 | rm -f build-stamp |
| 25 | rm -rf builddir |
| 26 | dh_clean |
| 27 | install: build |
| 28 | dh_testdir |
| 29 | dh_testroot |
| 30 | dh_clean -k |
| 31 | dh_installdirs |
| 32 | |
| 33 | cd builddir && $(MAKE) PREFIX=$(CURDIR)/debian/rockbox/opt/rockbox fullinstall |
| 34 | |
| 35 | # Install icon and .desktop file |
| 36 | mkdir -p $(CURDIR)/debian/rockbox/usr/share/icons/hicolor/64x64/apps |
| 37 | cp -f debian/maemo/rockbox.png $(CURDIR)/debian/rockbox/usr/share/icons/hicolor/64x64/apps |
| 38 | mkdir -p $(CURDIR)/debian/rockbox$(DESKTOP_DIR) |
| 39 | cp -f debian/maemo/rockbox.desktop $(CURDIR)/debian/rockbox$(DESKTOP_DIR) |
| 40 | |
| 41 | # Ignore built in sounds |
| 42 | mkdir -p $(CURDIR)/debian/rockbox/usr/share/sounds |
| 43 | touch $(CURDIR)/debian/rockbox/usr/share/sounds/database.ignore |
| 44 | |
| 45 | # Build architecture-independent files here. |
| 46 | binary-indep: |
| 47 | # We have nothing to do by default. |
| 48 | |
| 49 | # Build architecture-dependent files here. |
| 50 | binary-arch: build install |
| 51 | dh_testdir |
| 52 | dh_testroot |
| 53 | dh_installdocs |
| 54 | dh_installexamples |
| 55 | dh_installman |
| 56 | dh_link |
| 57 | dh_strip --dbg-package=rockbox-dbg |
| 58 | dh_compress |
| 59 | dh_fixperms |
| 60 | dh_installdeb |
| 61 | dh_shlibdeps |
| 62 | dh_gencontrol |
| 63 | dh_md5sums |
| 64 | dh_builddeb |
| 65 | |
| 66 | binary: binary-indep binary-arch |
| 67 | .PHONY: build clean binary-indep binary-arch binary install configure |