| b.liu | e958203 | 2025-04-17 19:18:16 +0800 | [diff] [blame] | 1 | # |
| 2 | # Copyright (C) 2006-2014 OpenWrt.org |
| 3 | # |
| 4 | # This is free software, licensed under the GNU General Public License v2. |
| 5 | # See /LICENSE for more information. |
| 6 | # |
| 7 | |
| 8 | include $(TOPDIR)/rules.mk |
| 9 | |
| 10 | PKG_NAME:=libmad |
| 11 | PKG_VERSION:=0.16.4 |
| 12 | PKG_RELEASE:=3 |
| 13 | |
| 14 | PKG_SOURCE_PROTO:=git |
| 15 | PKG_SOURCE_VERSION:=$(PKG_VERSION) |
| 16 | PKG_SOURCE_URL:=https://codeberg.org/tenacityteam/libmad |
| 17 | PKG_MIRROR_HASH:=6a9cca07873ed6e7ace90652cc681d825260bd2866f2f92673b39dcd99523c3c |
| 18 | |
| 19 | PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net> |
| 20 | PKG_LICENSE:=GPL-2.0-or-later |
| 21 | PKG_LICENSE_FILES:=COPYING |
| 22 | PKG_CPE_ID:=cpe:/a:underbit:mad_libmad |
| 23 | |
| 24 | CMAKE_INSTALL:=1 |
| 25 | PKG_BUILD_FLAGS:=no-mips16 |
| 26 | |
| 27 | include $(INCLUDE_DIR)/package.mk |
| 28 | include $(INCLUDE_DIR)/cmake.mk |
| 29 | |
| 30 | define Package/libmad |
| 31 | SECTION:=libs |
| 32 | CATEGORY:=Libraries |
| 33 | TITLE:=An high-quality MPEG audio decoding library |
| 34 | URL:=http://www.underbit.com/products/mad/ |
| 35 | endef |
| 36 | |
| 37 | define Package/libmad/description |
| 38 | MAD is a high-quality MPEG audio decoder. It currently supports |
| 39 | MPEG-1 and the MPEG-2 extension to lower sampling frequencies, |
| 40 | as well as the de facto MPEG 2.5 format. All three audio layers - |
| 41 | Layer I, Layer II, and Layer III (i.e. MP3) - are fully implemented. |
| 42 | endef |
| 43 | |
| 44 | CMAKE_OPTIONS += \ |
| 45 | -DOPTIMIZE=SPEED |
| 46 | |
| 47 | TARGET_CFLAGS:= $(filter-out -O%,$(TARGET_CFLAGS)) -O2 |
| 48 | |
| 49 | define Package/libmad/install |
| 50 | $(INSTALL_DIR) $(1)/usr/lib |
| 51 | $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmad.so.* $(1)/usr/lib/ |
| 52 | endef |
| 53 | |
| 54 | $(eval $(call BuildPackage,libmad)) |