Changeset 4223


Ignore:
Timestamp:
2006-07-23T00:53:26+02:00 (12 years ago)
Author:
nico
Message:

port libmad to buildroot-ng

Location:
packages/libs/libmad
Files:
2 deleted
1 edited
1 copied

Legend:

Unmodified
Added
Removed
  • packages/libs/libmad/Makefile

    r3112 r4223  
     1#  
     2# Copyright (C) 2006 OpenWrt.org 
     3# 
     4# This is free software, licensed under the GNU General Public License v2. 
     5# See /LICENSE for more information. 
     6# 
    17# $Id$ 
    28 
     
    612PKG_VERSION:=0.15.1b 
    713PKG_RELEASE:=1 
    8 PKG_MD5SUM:=1be543bc30c56fb6bea1d7bf6a64e66c 
    914 
     15PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) 
     16PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz 
    1017PKG_SOURCE_URL:=@SF/mad \ 
    1118        ftp://ftp.mars.org/pub/mpeg/ 
    12 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz 
     19PKG_MD5SUM:=1be543bc30c56fb6bea1d7bf6a64e66c 
    1320PKG_CAT:=zcat 
    1421 
    15 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) 
    1622PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install 
    1723 
    18 include $(TOPDIR)/package/rules.mk 
    19  
    20 $(eval $(call PKG_template,LIBMAD,libmad,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) 
     24include $(INCLUDE_DIR)/package.mk 
    2125 
    2226FPM:=default 
     
    2832endif 
    2933 
    30 $(PKG_BUILD_DIR)/.configured: 
    31         (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ 
     34define Package/libmad 
     35  SECTION:=libs 
     36  CATEGORY:=Libraries 
     37  TITLE:=An high-quality MPEG audio decoding library 
     38  DESCRIPTION:=An high-quality MPEG audio decoding library.\\\ 
     39    MAD is a high-quality MPEG audio decoder. It currently supports \\\ 
     40    MPEG-1 and the MPEG-2 extension to lower sampling frequencies, \\\ 
     41    as well as the de facto MPEG 2.5 format. All three audio layers - \\\ 
     42    Layer I, Layer II, and Layer III (i.e. MP3) - are fully implemented. 
     43  URL:=http://www.underbit.com/products/mad/ 
     44endef 
     45 
     46define Build/Configure 
     47        (cd $(PKG_BUILD_DIR); rm -f config.cache; \ 
    3248                $(TARGET_CONFIGURE_OPTS) \ 
    3349                CFLAGS="$(strip $(TARGET_CFLAGS))" \ 
     
    6379                        --enable-speed \ 
    6480        ); 
    65         touch $@ 
     81endef 
    6682 
    67 $(PKG_BUILD_DIR)/.built: 
     83define Build/Compile 
    6884        rm -rf $(PKG_INSTALL_DIR) 
    6985        mkdir -p $(PKG_INSTALL_DIR) 
     
    7187                DESTDIR="$(PKG_INSTALL_DIR)" \ 
    7288                all install 
    73         touch $@ 
     89endef 
    7490 
    75 $(IPKG_LIBMAD): 
    76         install -m0755 -d $(IDIR_LIBMAD)/usr/lib 
    77         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmad.so.* $(IDIR_LIBMAD)/usr/lib/ 
    78         $(RSTRIP) $(IDIR_LIBMAD) 
    79         $(IPKG_BUILD) $(IDIR_LIBMAD) $(PACKAGE_DIR) 
     91define Package/libmad/install 
     92        install -m0755 -d $(1)/usr/lib 
     93        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmad.so.* $(1)/usr/lib/ 
     94endef 
    8095 
    81 $(STAGING_DIR)/usr/lib/libmad.so: $(PKG_BUILD_DIR)/.built 
     96define Build/InstallDev 
    8297        mkdir -p $(STAGING_DIR)/usr/include 
    8398        $(CP) $(PKG_INSTALL_DIR)/usr/include/mad.h $(STAGING_DIR)/usr/include/ 
    8499        mkdir -p $(STAGING_DIR)/usr/lib 
    85         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmad.a $(STAGING_DIR)/usr/lib/ 
    86         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmad.so* $(STAGING_DIR)/usr/lib/ 
    87         touch $@ 
     100        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmad.{a,so*} $(STAGING_DIR)/usr/lib/ 
     101endef 
    88102 
    89 install-dev: $(STAGING_DIR)/usr/lib/libmad.so 
    90  
    91 uninstall-dev: 
     103define Build/UninstallDev 
    92104        rm -rf \ 
    93105                $(STAGING_DIR)/usr/include/mad.h \ 
    94                 $(STAGING_DIR)/usr/lib/libmad.a \ 
    95                 $(STAGING_DIR)/usr/lib/libmad.so* \ 
     106                $(STAGING_DIR)/usr/lib/libmad.{a,so*} 
     107endef 
    96108 
    97 compile-targets: install-dev 
    98 clean-targets: uninstall-dev 
    99  
    100 mostlyclean: 
    101         -$(MAKE) -C $(PKG_BUILD_DIR) clean 
    102         rm -f $(PKG_BUILD_DIR)/.built 
    103  
     109$(eval $(call BuildPackage,libmad)) 
Note: See TracChangeset for help on using the changeset viewer.