Hello Jonas, Sorry for not replying, your mail mysteriously didn't make it into my mailbox. I'll reply inline:
On Mon, Apr 11, 2011 at 12:56:16PM +0200, Jonas Gorski wrote: > On 11 April 2011 12:27, Johannes Weißl <[email protected]> wrote: > > Another question regarding the Makefile: The current version depends on > > libmad, libvorbisidec and libflac. Cmus supports many more input/output > > plugins. What is the best way to handle that? > > 1. Just depend on the most common ones (current version). > > 2. Depend on no library, but set PKG_BUILD_DEPENDS. This way all plugins > > are installed (really small .so files, 4-20KiB), and the user can > > decide which libraries to install (like Recommends in apt) for > > himself. > > 3. Use Config.in like for libffmpeg. > > > > What do you suggest? > > If these are indeed plugins and cmus also runs without them, then you > could pack the indivial plugins in extra packages, and let the plugin > packages depend on the libraries they use. I know that this is possible, but none of the similar packages (libffmpeg, sox and mpd) handle it this way. I thought it is not common (or wanted) in OpenWrt to have so many packages. > Also generally, can you make this a patch against packages/ instead of > single files? It makes testing easier. See > https://dev.openwrt.org/wiki/SubmittingPatches :) Ok, thanks for the advice! I made the patch against packages.git, and updated the version of cmus to 2.4.0 while at it. Do you think it is suitable for inclusion? Johannes
From 6d493e196bca64144bb70dcf9034e579c8d6270f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20Wei=C3=9Fl?= <[email protected]> Date: Mon, 25 Apr 2011 16:57:46 +0200 Subject: [PATCH] add cmus package --- sound/cmus/Makefile | 96 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 96 insertions(+), 0 deletions(-) create mode 100644 sound/cmus/Makefile diff --git a/sound/cmus/Makefile b/sound/cmus/Makefile new file mode 100644 index 0000000..d90940e --- /dev/null +++ b/sound/cmus/Makefile @@ -0,0 +1,96 @@ +# +# Copyright (C) 2011 Johannes Weißl <[email protected]> +# Copyright (C) 2006-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=cmus +PKG_VERSION:=2.4.0 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-v$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=@SF/cmus +PKG_MD5SUM:=0c5a9f4032e632e5f6b6a49f53df1e7e + +PKG_INSTALL:=1 +PKG_BUILD_DIR:=$(BUILD_DIR)/cmus-v$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/nls.mk + +define Package/cmus + SECTION:=sound + CATEGORY:=Sound + DEPENDS:= \ + +libpthread +librt +libncurses $(ICONV_DEPENDS) \ + +AUDIO_SUPPORT:alsa-lib \ + +BUILD_PATENTED:libmad +libvorbisidec +libflac + TITLE:=C* Music Player + URL:=http://cmus.sourceforge.net/ +endef + +define Package/cmus/description + C* Music Player is a modular and very configurable ncurses-based + audio player. It has some interesting features like configurable + colorscheme, mp3 and ogg streaming, it can be controlled with an + UNIX socket, filters, album/artists sorting and a vi-like + configuration interface. +endef + +define Build/Configure + # this is *NOT* GNU configure + ( cd $(PKG_BUILD_DIR); \ + CROSS="$(TARGET_CROSS)" \ + CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) -I$(ICONV_PREFIX)/include" \ + LDFLAGS="$(TARGET_LDFLAGS) -Wl,-rpath-link=$(STAGING_DIR)/usr/lib -L$(ICONV_PREFIX)/lib" \ + PKG_CONFIG_PATH="$(STAGING_DIR)/usr/lib/pkgconfig" \ + PKG_CONFIG_LIBDIR="$(STAGING_DIR)/usr/lib/pkgconfig" \ + ./configure \ + prefix="/usr" \ + CONFIG_FLAC=a \ + CONFIG_MAD=$(if $(CONFIG_BUILD_PATENTED),a,n) \ + CONFIG_MODPLUG=n \ + CONFIG_MIKMOD=n \ + CONFIG_MPC=n \ + CONFIG_VORBIS=a \ + CONFIG_TREMOR=y \ + CONFIG_WAVPACK=n \ + CONFIG_MP4=n \ + CONFIG_AAC=n \ + CONFIG_FFMPEG=n \ + CONFIG_ROAR=n \ + CONFIG_PULSE=n \ + CONFIG_ALSA=$(if $(CONFIG_AUDIO_SUPPORT),a,n) \ + CONFIG_AO=n \ + CONFIG_ARTS=n \ + CONFIG_OSS=y \ + CONFIG_SUN=n \ + CONFIG_WAVEOUT=n \ + DEBUG=0 \ + ) +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + V=$(V) \ + install +endef + +define Package/cmus/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_DIR) $(1)/usr/lib/cmus/ip + $(INSTALL_DIR) $(1)/usr/lib/cmus/op + $(INSTALL_DIR) $(1)/usr/share/cmus + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/cmus $(1)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/cmus/ip/*.so $(1)/usr/lib/cmus/ip/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/cmus/op/*.so $(1)/usr/lib/cmus/op/ + $(CP) $(PKG_INSTALL_DIR)/usr/share/cmus/{rc,default.theme} $(1)/usr/share/cmus/ +endef + +$(eval $(call BuildPackage,cmus)) + -- 1.7.5.rc3
_______________________________________________ openwrt-devel mailing list [email protected] https://lists.openwrt.org/mailman/listinfo/openwrt-devel
