Thomas Jarosch | 06023f3 | 2011-02-08 22:09:36 +0000 | [diff] [blame] | 1 | #!/usr/bin/make -f |
| 2 | |
Dave Chapman | 9e638c7 | 2011-02-11 19:51:29 +0000 | [diff] [blame] | 3 | # We deduce the target based on the available version of the Maemo SDK |
| 4 | ifeq (1,$(shell pkg-config --atleast-version=5 maemo-version && echo 1)) |
| 5 | TARGET=nokian900 |
| 6 | else |
| 7 | TARGET=nokian8xx |
| 8 | endif |
| 9 | |
Thomas Jarosch | 2d5d304 | 2011-02-27 16:15:59 +0000 | [diff] [blame] | 10 | CONFIGURE_OPTIONS := --target=$(TARGET) --ram=8 --rbdir=/.rockbox --type=N |
Thomas Jarosch | 06023f3 | 2011-02-08 22:09:36 +0000 | [diff] [blame] | 11 | DESKTOP_DIR := `pkg-config --variable=desktopentrydir osso-af-settings` |
| 12 | |
| 13 | export DH_VERBOSE=1 |
| 14 | |
| 15 | builddir: |
| 16 | test -d builddir || mkdir -p builddir |
| 17 | |
| 18 | builddir/Makefile: builddir |
| 19 | cd builddir && test -f Makefile || ../tools/configure $(CONFIGURE_OPTIONS) |
| 20 | |
| 21 | build: build-stamp |
| 22 | |
| 23 | build-stamp: builddir/Makefile |
| 24 | dh_testdir |
| 25 | cd builddir && $(MAKE) |
| 26 | touch $@ |
| 27 | |
| 28 | clean: |
| 29 | dh_testdir |
| 30 | dh_testroot |
| 31 | rm -f build-stamp |
| 32 | rm -rf builddir |
| 33 | dh_clean |
| 34 | install: build |
| 35 | dh_testdir |
| 36 | dh_testroot |
| 37 | dh_clean -k |
| 38 | dh_installdirs |
| 39 | |
| 40 | cd builddir && $(MAKE) PREFIX=$(CURDIR)/debian/rockbox/opt/rockbox fullinstall |
| 41 | |
Thomas Jarosch | 1bd2ac5 | 2012-12-26 19:21:14 +0100 | [diff] [blame] | 42 | # Remove broken plugins (keymap missing) |
| 43 | # Note: Credits and f.e. mikmod are included and working |
| 44 | rm -f $(CURDIR)/debian/rockbox/opt/rockbox/lib/rockbox/rocks/apps/* |
| 45 | rm -f $(CURDIR)/debian/rockbox/opt/rockbox/lib/rockbox/rocks/demos/* |
| 46 | rm -f $(CURDIR)/debian/rockbox/opt/rockbox/lib/rockbox/rocks/games/* |
| 47 | |
Thomas Jarosch | 06023f3 | 2011-02-08 22:09:36 +0000 | [diff] [blame] | 48 | # Install icon and .desktop file |
| 49 | mkdir -p $(CURDIR)/debian/rockbox/usr/share/icons/hicolor/64x64/apps |
| 50 | cp -f debian/maemo/rockbox.png $(CURDIR)/debian/rockbox/usr/share/icons/hicolor/64x64/apps |
| 51 | mkdir -p $(CURDIR)/debian/rockbox$(DESKTOP_DIR) |
| 52 | cp -f debian/maemo/rockbox.desktop $(CURDIR)/debian/rockbox$(DESKTOP_DIR) |
| 53 | |
| 54 | # Ignore built in sounds |
| 55 | mkdir -p $(CURDIR)/debian/rockbox/usr/share/sounds |
| 56 | touch $(CURDIR)/debian/rockbox/usr/share/sounds/database.ignore |
| 57 | |
| 58 | # Build architecture-independent files here. |
| 59 | binary-indep: |
| 60 | # We have nothing to do by default. |
| 61 | |
| 62 | # Build architecture-dependent files here. |
| 63 | binary-arch: build install |
| 64 | dh_testdir |
| 65 | dh_testroot |
| 66 | dh_installdocs |
| 67 | dh_installexamples |
| 68 | dh_installman |
| 69 | dh_link |
| 70 | dh_strip --dbg-package=rockbox-dbg |
| 71 | dh_compress |
| 72 | dh_fixperms |
| 73 | dh_installdeb |
| 74 | dh_shlibdeps |
| 75 | dh_gencontrol |
| 76 | dh_md5sums |
| 77 | dh_builddeb |
| 78 | |
| 79 | binary: binary-indep binary-arch |
| 80 | .PHONY: build clean binary-indep binary-arch binary install configure |