diff --git a/libdumb/Makefile b/libdumb/Makefile new file mode 100644 index 0000000..00b3a1f --- /dev/null +++ b/libdumb/Makefile @@ -0,0 +1,81 @@ +# +# Copyright (C) 2011 David Kuehling +# +# License GPLv2 or later. NO WARRANTY. +# +# OpenWRT package for the libdumb -- the Dynamic Universal Music Bibliotheque + +include $(TOPDIR)/rules.mk + +PKG_NAME:=libdumb +PKG_VERSION:=0.9.3 +PKG_RELEASE:=1 +PKG_SOURCE:=dumb-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/dumb +PKG_MD5SUM:=f48da5b990aa8aa822d3b6a951baf5c2 +PKG_BUILD_DIR:=$(BUILD_DIR)/dumb-$(PKG_VERSION) +PKG_INSTALL:=1 + +PKG_BUILD_DEPENDS:= + +include $(INCLUDE_DIR)/package.mk + +define Package/libdumb + SECTION:=libs + CATEGORY:=Libraries + TITLE:=Dynamic Universal Music Bibliotheque + URL:=http://www.ggi-project.org/packages/libdumb.html + DEPENDS:=liballegro +endef + +define Package/libdumb/description +DUMB is a library for playing back IT, XM, S3M and MOD audio files +endef + +TARGET_CPPFLAGS += -Iinclude +TARGET_LDFLAGS += +MAKE_FLAGS += \ + ALL_TARGETS="core core-headers allegro allegro-examples allegro-headers" \ + PREFIX=/usr \ + CFLAGS_RELEASE="$(TARGET_CFLAGS) $(EXTRA_CFLAGS) $(TARGET_CPPFLAGS)" \ + CFLAGS_DEBUG="$(TARGET_CFLAGS) $(EXTRA_CFLAGS) $(TARGET_CPPFLAGS)" \ + LINK_ALLEGRO="-L$(STAGING_DIR)/usr/lib -lalleg" + +define Build/Configure + echo "include make/unix.inc" > $(PKG_BUILD_DIR)/make/config.txt +endef + +define Build/Compile + $(call Build/Compile/Default) +endef + +define Build/Install + $(INSTALL_DIR) $(PKG_INSTALL_DIR)/usr/{bin,lib,include} + $(call Build/Install/Default) +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib + $(CP) \ + $(PKG_INSTALL_DIR)/usr/include/* \ + $(1)/usr/include/ + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/*.a \ + $(1)/usr/lib/ +endef + +# currently no .so in package, as only static lib produced :/ + +define Package/libdumb/install + $(INSTALL_DIR) $(1)/usr/bin +# $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,libdumb)) + + +# The following comments configure the Emacs editor. Just ignore them. +# Local Variables: +# compile-command: "make -C ~/h/src/qi/openwrt-xburst package/libdumb/compile -j2 V=99" +# End: diff --git a/libdumb/patches/010-makefile.patch b/libdumb/patches/010-makefile.patch new file mode 100644 index 0000000..93084c8 --- /dev/null +++ b/libdumb/patches/010-makefile.patch @@ -0,0 +1,26 @@ +Index: dumb-0.9.3/Makefile +=================================================================== +--- dumb-0.9.3.orig/Makefile 2011-06-07 10:30:24.000000000 +0200 ++++ dumb-0.9.3/Makefile 2011-06-07 10:57:15.000000000 +0200 +@@ -22,7 +22,7 @@ + # (Note that this is unable to delete the dumbask + # executable if the configuration is absent.) + +-MAKEFILE = Makefile.rdy ++MAKEFILE = Makefile + + .PHONY: all install uninstall clean veryclean distclean config config-if-necessary make-outdirs + +@@ -80,9 +80,9 @@ + DEFAULT_PREFIX := /usr/local + endif + export DEFAULT_PREFIX +-INCLUDE_INSTALL_PATH := $(PREFIX)/include +-LIB_INSTALL_PATH := $(PREFIX)/lib +-BIN_INSTALL_PATH := $(PREFIX)/bin ++INCLUDE_INSTALL_PATH := $(DESTDIR)$(PREFIX)/include ++LIB_INSTALL_PATH := $(DESTDIR)$(PREFIX)/lib ++BIN_INSTALL_PATH := $(DESTDIR)$(PREFIX)/bin + + endif +