libdumb/Makefile |
| 1 | # |
| 2 | # Copyright (C) 2011 David Kuehling <dvdkhlng TA gmx TOD de> |
| 3 | # |
| 4 | # License GPLv2 or later. NO WARRANTY. |
| 5 | # |
| 6 | # OpenWRT package for the libdumb -- the Dynamic Universal Music Bibliotheque |
| 7 | |
| 8 | include $(TOPDIR)/rules.mk |
| 9 | |
| 10 | PKG_NAME:=libdumb |
| 11 | PKG_VERSION:=0.9.3 |
| 12 | PKG_RELEASE:=1 |
| 13 | PKG_SOURCE:=dumb-$(PKG_VERSION).tar.gz |
| 14 | PKG_SOURCE_URL:=@SF/dumb |
| 15 | PKG_MD5SUM:=f48da5b990aa8aa822d3b6a951baf5c2 |
| 16 | PKG_BUILD_DIR:=$(BUILD_DIR)/dumb-$(PKG_VERSION) |
| 17 | PKG_INSTALL:=1 |
| 18 | |
| 19 | PKG_BUILD_DEPENDS:= |
| 20 | |
| 21 | include $(INCLUDE_DIR)/package.mk |
| 22 | |
| 23 | define Package/libdumb |
| 24 | SECTION:=libs |
| 25 | CATEGORY:=Libraries |
| 26 | TITLE:=Dynamic Universal Music Bibliotheque |
| 27 | URL:=http://www.ggi-project.org/packages/libdumb.html |
| 28 | DEPENDS:=liballegro |
| 29 | endef |
| 30 | |
| 31 | define Package/libdumb/description |
| 32 | DUMB is a library for playing back IT, XM, S3M and MOD audio files |
| 33 | endef |
| 34 | |
| 35 | TARGET_CPPFLAGS += -Iinclude |
| 36 | TARGET_LDFLAGS += |
| 37 | MAKE_FLAGS += \ |
| 38 | ALL_TARGETS="core core-headers allegro allegro-examples allegro-headers" \ |
| 39 | PREFIX=/usr \ |
| 40 | CFLAGS_RELEASE="$(TARGET_CFLAGS) $(EXTRA_CFLAGS) $(TARGET_CPPFLAGS)" \ |
| 41 | CFLAGS_DEBUG="$(TARGET_CFLAGS) $(EXTRA_CFLAGS) $(TARGET_CPPFLAGS)" \ |
| 42 | LINK_ALLEGRO="-L$(STAGING_DIR)/usr/lib -lalleg" |
| 43 | |
| 44 | define Build/Configure |
| 45 | echo "include make/unix.inc" > $(PKG_BUILD_DIR)/make/config.txt |
| 46 | endef |
| 47 | |
| 48 | define Build/Compile |
| 49 | $(call Build/Compile/Default) |
| 50 | endef |
| 51 | |
| 52 | define Build/Install |
| 53 | $(INSTALL_DIR) $(PKG_INSTALL_DIR)/usr/{bin,lib,include} |
| 54 | $(call Build/Install/Default) |
| 55 | endef |
| 56 | |
| 57 | define Build/InstallDev |
| 58 | $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib |
| 59 | $(CP) \ |
| 60 | $(PKG_INSTALL_DIR)/usr/include/* \ |
| 61 | $(1)/usr/include/ |
| 62 | $(CP) \ |
| 63 | $(PKG_INSTALL_DIR)/usr/lib/*.a \ |
| 64 | $(1)/usr/lib/ |
| 65 | endef |
| 66 | |
| 67 | # currently no .so in package, as only static lib produced :/ |
| 68 | |
| 69 | define Package/libdumb/install |
| 70 | $(INSTALL_DIR) $(1)/usr/bin |
| 71 | # $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/ |
| 72 | $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/ |
| 73 | endef |
| 74 | |
| 75 | $(eval $(call BuildPackage,libdumb)) |
| 76 | |
| 77 | |
| 78 | # The following comments configure the Emacs editor. Just ignore them. |
| 79 | # Local Variables: |
| 80 | # compile-command: "make -C ~/h/src/qi/openwrt-xburst package/libdumb/compile -j2 V=99" |
| 81 | # End: |
libdumb/patches/010-makefile.patch |
| 1 | Index: dumb-0.9.3/Makefile |
| 2 | =================================================================== |
| 3 | --- dumb-0.9.3.orig/Makefile 2011-06-07 10:30:24.000000000 +0200 |
| 4 | @@ -22,7 +22,7 @@ |
| 5 | # (Note that this is unable to delete the dumbask |
| 6 | # executable if the configuration is absent.) |
| 7 | |
| 8 | -MAKEFILE = Makefile.rdy |
| 9 | +MAKEFILE = Makefile |
| 10 | |
| 11 | .PHONY: all install uninstall clean veryclean distclean config config-if-necessary make-outdirs |
| 12 | |
| 13 | @@ -80,9 +80,9 @@ |
| 14 | DEFAULT_PREFIX := /usr/local |
| 15 | endif |
| 16 | export DEFAULT_PREFIX |
| 17 | -INCLUDE_INSTALL_PATH := $(PREFIX)/include |
| 18 | -LIB_INSTALL_PATH := $(PREFIX)/lib |
| 19 | -BIN_INSTALL_PATH := $(PREFIX)/bin |
| 20 | +INCLUDE_INSTALL_PATH := $(DESTDIR)$(PREFIX)/include |
| 21 | +LIB_INSTALL_PATH := $(DESTDIR)$(PREFIX)/lib |
| 22 | +BIN_INSTALL_PATH := $(DESTDIR)$(PREFIX)/bin |
| 23 | |
| 24 | endif |
| 25 | |